import { a as e, c as t, g as a } from "./alasql-f60045ee.js";
import r from "react";
import { a as o } from "./react-joyride-9d1372fa.js";
import { C as n } from "./antd-2abdded3.js";
import { p as i } from "./fontawesome-3904a214.js";
function l(e2, t2) {
  for (var a2 = 0; a2 < t2.length; a2++) {
    const r2 = t2[a2];
    if ("string" != typeof r2 && !Array.isArray(r2)) {
      for (const t3 in r2)
        if ("default" !== t3 && !(t3 in e2)) {
          const a3 = Object.getOwnPropertyDescriptor(r2, t3);
          a3 && Object.defineProperty(e2, t3, a3.get ? a3 : { enumerable: true, get: () => r2[t3] });
        }
    }
  }
  return Object.freeze(Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }));
}
function s(e2, t2) {
  e2.onload = function() {
    this.onerror = this.onload = null, t2(null, e2);
  }, e2.onerror = function() {
    this.onerror = this.onload = null, t2(new Error("Failed to load " + this.src), e2);
  };
}
function u(e2, t2) {
  e2.onreadystatechange = function() {
    "complete" != this.readyState && "loaded" != this.readyState || (this.onreadystatechange = null, t2(null, e2));
  };
}
var p = Object.create, d = Object.defineProperty, c = Object.getOwnPropertyDescriptor, y = Object.getOwnPropertyNames, h = Object.getPrototypeOf, f = Object.prototype.hasOwnProperty, m = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of y(t2))
      f.call(e2, o2) || o2 === a2 || d(e2, o2, { get: () => t2[o2], enumerable: !(r2 = c(t2, o2)) || r2.enumerable });
  return e2;
}, P = (e2, t2, a2) => (a2 = null != e2 ? p(h(e2)) : {}, m(!t2 && e2 && e2.__esModule ? a2 : d(a2, "default", { value: e2, enumerable: true }), e2)), b = {};
((e2, t2) => {
  for (var a2 in t2)
    d(e2, a2, { get: t2[a2], enumerable: true });
})(b, { callPlayer: () => N, getConfig: () => z, getSDK: () => x, isBlobUrl: () => V, isMediaStream: () => H, lazy: () => k, omit: () => U, parseEndTime: () => R, parseStartTime: () => E, queryString: () => A, randomString: () => M, supportsWebKitPresentationMode: () => $ });
var g, w = (g = b, m(d({}, "__esModule", { value: true }), g)), v = P(r), O = P(function(e2, t2, a2) {
  var r2 = document.head || document.getElementsByTagName("head")[0], o2 = document.createElement("script");
  "function" == typeof t2 && (a2 = t2, t2 = {}), t2 = t2 || {}, a2 = a2 || function() {
  }, o2.type = t2.type || "text/javascript", o2.charset = t2.charset || "utf8", o2.async = !("async" in t2) || !!t2.async, o2.src = e2, t2.attrs && function(e3, t3) {
    for (var a3 in t3)
      e3.setAttribute(a3, t3[a3]);
  }(o2, t2.attrs), t2.text && (o2.text = "" + t2.text), ("onload" in o2 ? s : u)(o2, a2), o2.onload || s(o2, a2), r2.appendChild(o2);
}), _ = P(o);
const k = (e2) => v.default.lazy(async () => {
  const t2 = await e2();
  return "function" == typeof t2.default ? t2 : t2.default;
}), j = /[?&#](?:start|t)=([0-9hms]+)/, T = /[?&#]end=([0-9hms]+)/, S = /(\d+)(h|m|s)/g, C = /^\d+$/;
function I(e2, t2) {
  if (e2 instanceof Array)
    return;
  const a2 = e2.match(t2);
  if (a2) {
    const e3 = a2[1];
    if (e3.match(S))
      return function(e4) {
        let t3 = 0, a3 = S.exec(e4);
        for (; null !== a3; ) {
          const [, r2, o2] = a3;
          "h" === o2 && (t3 += 60 * parseInt(r2, 10) * 60), "m" === o2 && (t3 += 60 * parseInt(r2, 10)), "s" === o2 && (t3 += parseInt(r2, 10)), a3 = S.exec(e4);
        }
        return t3;
      }(e3);
    if (C.test(e3))
      return parseInt(e3);
  }
}
function E(e2) {
  return I(e2, j);
}
function R(e2) {
  return I(e2, T);
}
function M() {
  return Math.random().toString(36).substr(2, 5);
}
function A(e2) {
  return Object.keys(e2).map((t2) => `${t2}=${e2[t2]}`).join("&");
}
function L(e2) {
  return window[e2] ? window[e2] : window.exports && window.exports[e2] ? window.exports[e2] : window.module && window.module.exports && window.module.exports[e2] ? window.module.exports[e2] : null;
}
const D = {}, x = function(e2, t2, a2 = null, r2 = () => true, o2 = O.default) {
  const n2 = L(t2);
  return n2 && r2(n2) ? Promise.resolve(n2) : new Promise((r3, n3) => {
    if (D[e2])
      return void D[e2].push({ resolve: r3, reject: n3 });
    D[e2] = [{ resolve: r3, reject: n3 }];
    const i2 = (t3) => {
      D[e2].forEach((e3) => e3.resolve(t3));
    };
    if (a2) {
      const e3 = window[a2];
      window[a2] = function() {
        e3 && e3(), i2(L(t2));
      };
    }
    o2(e2, (r4) => {
      r4 ? (D[e2].forEach((e3) => e3.reject(r4)), D[e2] = null) : a2 || i2(L(t2));
    });
  });
};
function z(e2, t2) {
  return (0, _.default)(t2.config, e2.config);
}
function U(e2, ...t2) {
  const a2 = [].concat(...t2), r2 = {}, o2 = Object.keys(e2);
  for (const t3 of o2)
    -1 === a2.indexOf(t3) && (r2[t3] = e2[t3]);
  return r2;
}
function N(e2, ...t2) {
  if (!this.player || !this.player[e2]) {
    let t3 = `ReactPlayer: ${this.constructor.displayName} player could not call %c${e2}%c – `;
    return this.player ? this.player[e2] || (t3 += "The method was not available") : t3 += "The player was not available", null;
  }
  return this.player[e2](...t2);
}
function H(e2) {
  return "undefined" != typeof window && void 0 !== window.MediaStream && e2 instanceof window.MediaStream;
}
function V(e2) {
  return /^blob:/.test(e2);
}
function $(e2 = document.createElement("video")) {
  const t2 = false === /iPhone|iPod/.test(navigator.userAgent);
  return e2.webkitSupportsPresentationMode && "function" == typeof e2.webkitSetPresentationMode && t2;
}
var F = Object.defineProperty, B = Object.getOwnPropertyDescriptor, W = Object.getOwnPropertyNames, K = Object.prototype.hasOwnProperty, X = {};
((e2, t2) => {
  for (var a2 in t2)
    F(e2, a2, { get: t2[a2], enumerable: true });
})(X, { AUDIO_EXTENSIONS: () => pe, DASH_EXTENSIONS: () => ye, FLV_EXTENSIONS: () => he, HLS_EXTENSIONS: () => ce, MATCH_URL_DAILYMOTION: () => ie, MATCH_URL_FACEBOOK: () => ee, MATCH_URL_FACEBOOK_WATCH: () => te, MATCH_URL_KALTURA: () => ue, MATCH_URL_MIXCLOUD: () => le, MATCH_URL_MUX: () => G, MATCH_URL_SOUNDCLOUD: () => Q, MATCH_URL_STREAMABLE: () => ae, MATCH_URL_TWITCH_CHANNEL: () => ne, MATCH_URL_TWITCH_VIDEO: () => oe, MATCH_URL_VIDYARD: () => se, MATCH_URL_VIMEO: () => J, MATCH_URL_WISTIA: () => re, MATCH_URL_YOUTUBE: () => q, VIDEO_EXTENSIONS: () => de, canPlay: () => me });
var Y = ((e2) => ((e3, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of W(t2))
      K.call(e3, o2) || o2 === a2 || F(e3, o2, { get: () => t2[o2], enumerable: !(r2 = B(t2, o2)) || r2.enumerable });
  return e3;
})(F({}, "__esModule", { value: true }), e2))(X), Z = w;
const q = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, Q = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/, J = /vimeo\.com\/(?!progressive_redirect).+/, G = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, ee = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/, te = /^https?:\/\/fb\.watch\/.+$/, ae = /streamable\.com\/([a-z0-9]+)$/, re = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, oe = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/, ne = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/, ie = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/, le = /mixcloud\.com\/([^/]+\/[^/]+)/, se = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/, ue = /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/, pe = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, de = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, ce = /\.(m3u8)($|\?)/i, ye = /\.(mpd)($|\?)/i, he = /\.(flv)($|\?)/i, fe = (e2) => {
  if (e2 instanceof Array) {
    for (const t2 of e2) {
      if ("string" == typeof t2 && fe(t2))
        return true;
      if (fe(t2.src))
        return true;
    }
    return false;
  }
  return !(!(0, Z.isMediaStream)(e2) && !(0, Z.isBlobUrl)(e2)) || (pe.test(e2) || de.test(e2) || ce.test(e2) || ye.test(e2) || he.test(e2));
}, me = { youtube: (e2) => e2 instanceof Array ? e2.every((e3) => q.test(e3)) : q.test(e2), soundcloud: (e2) => Q.test(e2) && !pe.test(e2), vimeo: (e2) => J.test(e2) && !de.test(e2) && !ce.test(e2), mux: (e2) => G.test(e2), facebook: (e2) => ee.test(e2) || te.test(e2), streamable: (e2) => ae.test(e2), wistia: (e2) => re.test(e2), twitch: (e2) => oe.test(e2) || ne.test(e2), dailymotion: (e2) => ie.test(e2), mixcloud: (e2) => le.test(e2), vidyard: (e2) => se.test(e2), kaltura: (e2) => ue.test(e2), file: fe };
var Pe = Object.defineProperty, be = Object.getOwnPropertyDescriptor, ge = Object.getOwnPropertyNames, we = Object.prototype.hasOwnProperty, ve = {};
((e2, t2) => {
  for (var a2 in t2)
    Pe(e2, a2, { get: t2[a2], enumerable: true });
})(ve, { default: () => je });
var Oe = ((e2) => ((e3, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of ge(t2))
      we.call(e3, o2) || o2 === a2 || Pe(e3, o2, { get: () => t2[o2], enumerable: !(r2 = be(t2, o2)) || r2.enumerable });
  return e3;
})(Pe({}, "__esModule", { value: true }), e2))(ve), _e = w, ke = Y, je = [{ key: "youtube", name: "YouTube", canPlay: ke.canPlay.youtube, lazyPlayer: (0, _e.lazy)(() => import("./YouTube-ff49afba.js").then((e2) => e2.Y)) }, { key: "soundcloud", name: "SoundCloud", canPlay: ke.canPlay.soundcloud, lazyPlayer: (0, _e.lazy)(() => import("./SoundCloud-47759158.js").then((e2) => e2.S)) }, { key: "vimeo", name: "Vimeo", canPlay: ke.canPlay.vimeo, lazyPlayer: (0, _e.lazy)(() => import("./Vimeo-e9dbe248.js").then((e2) => e2.V)) }, { key: "mux", name: "Mux", canPlay: ke.canPlay.mux, lazyPlayer: (0, _e.lazy)(() => import("./Mux-732f36f7.js").then((e2) => e2.M)) }, { key: "facebook", name: "Facebook", canPlay: ke.canPlay.facebook, lazyPlayer: (0, _e.lazy)(() => import("./Facebook-64025dfd.js").then((e2) => e2.F)) }, { key: "streamable", name: "Streamable", canPlay: ke.canPlay.streamable, lazyPlayer: (0, _e.lazy)(() => import("./Streamable-707999bf.js").then((e2) => e2.S)) }, { key: "wistia", name: "Wistia", canPlay: ke.canPlay.wistia, lazyPlayer: (0, _e.lazy)(() => import("./Wistia-8adec853.js").then((e2) => e2.W)) }, { key: "twitch", name: "Twitch", canPlay: ke.canPlay.twitch, lazyPlayer: (0, _e.lazy)(() => import("./Twitch-70dcb9cd.js").then((e2) => e2.T)) }, { key: "dailymotion", name: "DailyMotion", canPlay: ke.canPlay.dailymotion, lazyPlayer: (0, _e.lazy)(() => import("./DailyMotion-18d17a0f.js").then((e2) => e2.D)) }, { key: "mixcloud", name: "Mixcloud", canPlay: ke.canPlay.mixcloud, lazyPlayer: (0, _e.lazy)(() => import("./Mixcloud-1d33e39b.js").then((e2) => e2.M)) }, { key: "vidyard", name: "Vidyard", canPlay: ke.canPlay.vidyard, lazyPlayer: (0, _e.lazy)(() => import("./Vidyard-2d41ac70.js").then((e2) => e2.V)) }, { key: "kaltura", name: "Kaltura", canPlay: ke.canPlay.kaltura, lazyPlayer: (0, _e.lazy)(() => import("./Kaltura-fb5259f0.js").then((e2) => e2.K)) }, { key: "file", name: "FilePlayer", canPlay: ke.canPlay.file, canEnablePIP: (e2) => ke.canPlay.file(e2) && (document.pictureInPictureEnabled || (0, _e.supportsWebKitPresentationMode)()) && !ke.AUDIO_EXTENSIONS.test(e2), lazyPlayer: (0, _e.lazy)(() => import("./FilePlayer-da72968f.js").then((e2) => e2.F)) }], Te = Number.isNaN || function(e2) {
  return "number" == typeof e2 && e2 != e2;
};
function Se(e2, t2) {
  if (e2.length !== t2.length)
    return false;
  for (var a2 = 0; a2 < e2.length; a2++)
    if (r2 = e2[a2], o2 = t2[a2], !(r2 === o2 || Te(r2) && Te(o2)))
      return false;
  var r2, o2;
  return true;
}
const Ce = Object.freeze(Object.defineProperty({ __proto__: null, default: function(e2, t2) {
  var a2;
  void 0 === t2 && (t2 = Se);
  var r2, o2 = [], n2 = false;
  return function() {
    for (var i2 = [], l2 = 0; l2 < arguments.length; l2++)
      i2[l2] = arguments[l2];
    return n2 && a2 === this && t2(i2, o2) || (r2 = e2.apply(this, i2), n2 = true, a2 = this, o2 = i2), r2;
  };
} }, Symbol.toStringTag, { value: "Module" })), Ie = e(Ce);
var Ee = Object.create, Re = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, Ae = Object.getOwnPropertyNames, Le = Object.getPrototypeOf, De = Object.prototype.hasOwnProperty, xe = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of Ae(t2))
      De.call(e2, o2) || o2 === a2 || Re(e2, o2, { get: () => t2[o2], enumerable: !(r2 = Me(t2, o2)) || r2.enumerable });
  return e2;
}, ze = {};
((e2, t2) => {
  for (var a2 in t2)
    Re(e2, a2, { get: t2[a2], enumerable: true });
})(ze, { defaultProps: () => Qe, propTypes: () => Ze });
var Ue = ((e2) => xe(Re({}, "__esModule", { value: true }), e2))(ze), Ne = ((e2, t2, a2) => (a2 = null != e2 ? Ee(Le(e2)) : {}, xe(!t2 && e2 && e2.__esModule ? a2 : Re(a2, "default", { value: e2, enumerable: true }), e2)))(i);
const { string: He, bool: Ve, number: $e, array: Fe, oneOfType: Be, shape: We, object: Ke, func: Xe, node: Ye } = Ne.default, Ze = { url: Be([He, Fe, Ke]), playing: Ve, loop: Ve, controls: Ve, volume: $e, muted: Ve, playbackRate: $e, width: Be([He, $e]), height: Be([He, $e]), style: Ke, progressInterval: $e, playsinline: Ve, pip: Ve, stopOnUnmount: Ve, light: Be([Ve, He, Ke]), playIcon: Ye, previewTabIndex: $e, previewAriaLabel: He, fallback: Ye, oEmbedUrl: He, wrapper: Be([He, Xe, We({ render: Xe.isRequired })]), config: We({ soundcloud: We({ options: Ke }), youtube: We({ playerVars: Ke, embedOptions: Ke, onUnstarted: Xe }), facebook: We({ appId: He, version: He, playerId: He, attributes: Ke }), dailymotion: We({ params: Ke }), vimeo: We({ playerOptions: Ke, title: He }), mux: We({ attributes: Ke, version: He }), file: We({ attributes: Ke, tracks: Fe, forceVideo: Ve, forceAudio: Ve, forceHLS: Ve, forceSafariHLS: Ve, forceDisableHls: Ve, forceDASH: Ve, forceFLV: Ve, hlsOptions: Ke, hlsVersion: He, dashVersion: He, flvVersion: He }), wistia: We({ options: Ke, playerId: He, customControls: Fe }), mixcloud: We({ options: Ke }), twitch: We({ options: Ke, playerId: He }), vidyard: We({ options: Ke }) }), onReady: Xe, onStart: Xe, onPlay: Xe, onPause: Xe, onBuffer: Xe, onBufferEnd: Xe, onEnded: Xe, onError: Xe, onDuration: Xe, onSeek: Xe, onPlaybackRateChange: Xe, onPlaybackQualityChange: Xe, onProgress: Xe, onClickPreview: Xe, onEnablePIP: Xe, onDisablePIP: Xe }, qe = () => {
}, Qe = { playing: false, loop: false, controls: false, volume: null, muted: false, playbackRate: 1, width: "640px", height: "360px", style: {}, progressInterval: 1e3, playsinline: false, pip: false, stopOnUnmount: true, light: false, fallback: null, wrapper: "div", previewTabIndex: 0, previewAriaLabel: "", oEmbedUrl: "https://noembed.com/embed?url={url}", config: { soundcloud: { options: { visual: true, buying: false, liking: false, download: false, sharing: false, show_comments: false, show_playcount: false } }, youtube: { playerVars: { playsinline: 1, showinfo: 0, rel: 0, iv_load_policy: 3, modestbranding: 1 }, embedOptions: {}, onUnstarted: qe }, facebook: { appId: "1309697205772819", version: "v3.3", playerId: null, attributes: {} }, dailymotion: { params: { api: 1, "endscreen-enable": false } }, vimeo: { playerOptions: { autopause: false, byline: false, portrait: false, title: false }, title: null }, mux: { attributes: {}, version: "2" }, file: { attributes: {}, tracks: [], forceVideo: false, forceAudio: false, forceHLS: false, forceDASH: false, forceFLV: false, hlsOptions: {}, hlsVersion: "1.1.4", dashVersion: "3.1.3", flvVersion: "1.5.0", forceDisableHls: false }, wistia: { options: {}, playerId: null, customControls: null }, mixcloud: { options: { hide_cover: 1 } }, twitch: { options: {}, playerId: null }, vidyard: { options: {} } }, onReady: qe, onStart: qe, onPlay: qe, onPause: qe, onBuffer: qe, onBufferEnd: qe, onEnded: qe, onError: qe, onDuration: qe, onSeek: qe, onPlaybackRateChange: qe, onPlaybackQualityChange: qe, onProgress: qe, onClickPreview: qe, onEnablePIP: qe, onDisablePIP: qe };
var Je = Object.create, Ge = Object.defineProperty, et = Object.getOwnPropertyDescriptor, tt = Object.getOwnPropertyNames, at = Object.getPrototypeOf, rt = Object.prototype.hasOwnProperty, ot = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of tt(t2))
      rt.call(e2, o2) || o2 === a2 || Ge(e2, o2, { get: () => t2[o2], enumerable: !(r2 = et(t2, o2)) || r2.enumerable });
  return e2;
}, nt = (e2, t2, a2) => (a2 = null != e2 ? Je(at(e2)) : {}, ot(!t2 && e2 && e2.__esModule ? a2 : Ge(a2, "default", { value: e2, enumerable: true }), e2)), it = (e2, t2, a2) => (((e3, t3, a3) => {
  t3 in e3 ? Ge(e3, t3, { enumerable: true, configurable: true, writable: true, value: a3 }) : e3[t3] = a3;
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, a2), a2), lt = {};
((e2, t2) => {
  for (var a2 in t2)
    Ge(e2, a2, { get: t2[a2], enumerable: true });
})(lt, { default: () => yt });
var st = ((e2) => ot(Ge({}, "__esModule", { value: true }), e2))(lt), ut = nt(r), pt = nt(n), dt = Ue, ct = w;
class yt extends ut.Component {
  constructor() {
    super(...arguments), it(this, "mounted", false), it(this, "isReady", false), it(this, "isPlaying", false), it(this, "isLoading", true), it(this, "loadOnReady", null), it(this, "startOnPlay", true), it(this, "seekOnPlay", null), it(this, "onDurationCalled", false), it(this, "handlePlayerMount", (e2) => {
      this.player || (this.player = e2, this.player.load(this.props.url)), this.progress();
    }), it(this, "getInternalPlayer", (e2) => this.player ? this.player[e2] : null), it(this, "progress", () => {
      if (this.props.url && this.player && this.isReady) {
        const e2 = this.getCurrentTime() || 0, t2 = this.getSecondsLoaded(), a2 = this.getDuration();
        if (a2) {
          const r2 = { playedSeconds: e2, played: e2 / a2 };
          null !== t2 && (r2.loadedSeconds = t2, r2.loaded = t2 / a2), r2.playedSeconds === this.prevPlayed && r2.loadedSeconds === this.prevLoaded || this.props.onProgress(r2), this.prevPlayed = r2.playedSeconds, this.prevLoaded = r2.loadedSeconds;
        }
      }
      this.progressTimeout = setTimeout(this.progress, this.props.progressFrequency || this.props.progressInterval);
    }), it(this, "handleReady", () => {
      if (!this.mounted)
        return;
      this.isReady = true, this.isLoading = false;
      const { onReady: e2, playing: t2, volume: a2, muted: r2 } = this.props;
      e2(), r2 || null === a2 || this.player.setVolume(a2), this.loadOnReady ? (this.player.load(this.loadOnReady, true), this.loadOnReady = null) : t2 && this.player.play(), this.handleDurationCheck();
    }), it(this, "handlePlay", () => {
      this.isPlaying = true, this.isLoading = false;
      const { onStart: e2, onPlay: t2, playbackRate: a2 } = this.props;
      this.startOnPlay && (this.player.setPlaybackRate && 1 !== a2 && this.player.setPlaybackRate(a2), e2(), this.startOnPlay = false), t2(), this.seekOnPlay && (this.seekTo(this.seekOnPlay), this.seekOnPlay = null), this.handleDurationCheck();
    }), it(this, "handlePause", (e2) => {
      this.isPlaying = false, this.isLoading || this.props.onPause(e2);
    }), it(this, "handleEnded", () => {
      const { activePlayer: e2, loop: t2, onEnded: a2 } = this.props;
      e2.loopOnEnded && t2 && this.seekTo(0), t2 || (this.isPlaying = false, a2());
    }), it(this, "handleError", (...e2) => {
      this.isLoading = false, this.props.onError(...e2);
    }), it(this, "handleDurationCheck", () => {
      clearTimeout(this.durationCheckTimeout);
      const e2 = this.getDuration();
      e2 ? this.onDurationCalled || (this.props.onDuration(e2), this.onDurationCalled = true) : this.durationCheckTimeout = setTimeout(this.handleDurationCheck, 100);
    }), it(this, "handleLoaded", () => {
      this.isLoading = false;
    });
  }
  componentDidMount() {
    this.mounted = true;
  }
  componentWillUnmount() {
    clearTimeout(this.progressTimeout), clearTimeout(this.durationCheckTimeout), this.isReady && this.props.stopOnUnmount && (this.player.stop(), this.player.disablePIP && this.player.disablePIP()), this.mounted = false;
  }
  componentDidUpdate(e2) {
    if (!this.player)
      return;
    const { url: t2, playing: a2, volume: r2, muted: o2, playbackRate: n2, pip: i2, loop: l2, activePlayer: s2, disableDeferredLoading: u2 } = this.props;
    if (!(0, pt.default)(e2.url, t2)) {
      if (this.isLoading && !s2.forceLoad && !u2 && !(0, ct.isMediaStream)(t2))
        return void (this.loadOnReady = t2);
      this.isLoading = true, this.startOnPlay = true, this.onDurationCalled = false, this.player.load(t2, this.isReady);
    }
    e2.playing || !a2 || this.isPlaying || this.player.play(), e2.playing && !a2 && this.isPlaying && this.player.pause(), !e2.pip && i2 && this.player.enablePIP && this.player.enablePIP(), e2.pip && !i2 && this.player.disablePIP && this.player.disablePIP(), e2.volume !== r2 && null !== r2 && this.player.setVolume(r2), e2.muted !== o2 && (o2 ? this.player.mute() : (this.player.unmute(), null !== r2 && setTimeout(() => this.player.setVolume(r2)))), e2.playbackRate !== n2 && this.player.setPlaybackRate && this.player.setPlaybackRate(n2), e2.loop !== l2 && this.player.setLoop && this.player.setLoop(l2);
  }
  getDuration() {
    return this.isReady ? this.player.getDuration() : null;
  }
  getCurrentTime() {
    return this.isReady ? this.player.getCurrentTime() : null;
  }
  getSecondsLoaded() {
    return this.isReady ? this.player.getSecondsLoaded() : null;
  }
  seekTo(e2, t2, a2) {
    if (!this.isReady)
      return void (0 !== e2 && (this.seekOnPlay = e2, setTimeout(() => {
        this.seekOnPlay = null;
      }, 5e3)));
    if (t2 ? "fraction" === t2 : e2 > 0 && e2 < 1) {
      const t3 = this.player.getDuration();
      if (!t3)
        return;
      this.player.seekTo(t3 * e2, a2);
    } else
      this.player.seekTo(e2, a2);
  }
  render() {
    const e2 = this.props.activePlayer;
    return e2 ? ut.default.createElement(e2, { ...this.props, onMount: this.handlePlayerMount, onReady: this.handleReady, onPlay: this.handlePlay, onPause: this.handlePause, onEnded: this.handleEnded, onLoaded: this.handleLoaded, onError: this.handleError }) : null;
  }
}
it(yt, "displayName", "Player"), it(yt, "propTypes", dt.propTypes), it(yt, "defaultProps", dt.defaultProps);
var ht = Object.create, ft = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, Pt = Object.getOwnPropertyNames, bt = Object.getPrototypeOf, gt = Object.prototype.hasOwnProperty, wt = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of Pt(t2))
      gt.call(e2, o2) || o2 === a2 || ft(e2, o2, { get: () => t2[o2], enumerable: !(r2 = mt(t2, o2)) || r2.enumerable });
  return e2;
}, vt = (e2, t2, a2) => (a2 = null != e2 ? ht(bt(e2)) : {}, wt(!t2 && e2 && e2.__esModule ? a2 : ft(a2, "default", { value: e2, enumerable: true }), e2)), Ot = (e2, t2, a2) => (((e3, t3, a3) => {
  t3 in e3 ? ft(e3, t3, { enumerable: true, configurable: true, writable: true, value: a3 }) : e3[t3] = a3;
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, a2), a2), _t = {};
((e2, t2) => {
  for (var a2 in t2)
    ft(e2, a2, { get: t2[a2], enumerable: true });
})(_t, { createReactPlayer: () => Ut });
var kt = ((e2) => wt(ft({}, "__esModule", { value: true }), e2))(_t), jt = vt(r), Tt = vt(o), St = vt(Ie), Ct = vt(n), It = Ue, Et = w, Rt = vt(st);
const Mt = (0, Et.lazy)(() => import("./Preview-d1b682b5.js").then((e2) => e2.P)), At = "undefined" != typeof window && window.document && "undefined" != typeof document, Lt = void 0 !== t && t.window && t.window.document, Dt = Object.keys(It.propTypes), xt = At || Lt ? jt.Suspense : () => null, zt = [], Ut = (e2, t2) => {
  var a2;
  return a2 = class extends jt.Component {
    constructor() {
      super(...arguments), Ot(this, "state", { showPreview: !!this.props.light }), Ot(this, "references", { wrapper: (e3) => {
        this.wrapper = e3;
      }, player: (e3) => {
        this.player = e3;
      } }), Ot(this, "handleClickPreview", (e3) => {
        this.setState({ showPreview: false }), this.props.onClickPreview(e3);
      }), Ot(this, "showPreview", () => {
        this.setState({ showPreview: true });
      }), Ot(this, "getDuration", () => this.player ? this.player.getDuration() : null), Ot(this, "getCurrentTime", () => this.player ? this.player.getCurrentTime() : null), Ot(this, "getSecondsLoaded", () => this.player ? this.player.getSecondsLoaded() : null), Ot(this, "getInternalPlayer", (e3 = "player") => this.player ? this.player.getInternalPlayer(e3) : null), Ot(this, "seekTo", (e3, t3, a3) => {
        if (!this.player)
          return null;
        this.player.seekTo(e3, t3, a3);
      }), Ot(this, "handleReady", () => {
        this.props.onReady(this);
      }), Ot(this, "getActivePlayer", (0, St.default)((a3) => {
        for (const t3 of [...zt, ...e2])
          if (t3.canPlay(a3))
            return t3;
        return t2 || null;
      })), Ot(this, "getConfig", (0, St.default)((e3, t3) => {
        const { config: a3 } = this.props;
        return Tt.default.all([It.defaultProps.config, It.defaultProps.config[t3] || {}, a3, a3[t3] || {}]);
      })), Ot(this, "getAttributes", (0, St.default)((e3) => (0, Et.omit)(this.props, Dt))), Ot(this, "renderActivePlayer", (e3) => {
        if (!e3)
          return null;
        const t3 = this.getActivePlayer(e3);
        if (!t3)
          return null;
        const a3 = this.getConfig(e3, t3.key);
        return jt.default.createElement(Rt.default, { ...this.props, key: t3.key, ref: this.references.player, config: a3, activePlayer: t3.lazyPlayer || t3, onReady: this.handleReady });
      });
    }
    shouldComponentUpdate(e3, t3) {
      return !(0, Ct.default)(this.props, e3) || !(0, Ct.default)(this.state, t3);
    }
    componentDidUpdate(e3) {
      const { light: t3 } = this.props;
      !e3.light && t3 && this.setState({ showPreview: true }), e3.light && !t3 && this.setState({ showPreview: false });
    }
    renderPreview(e3) {
      if (!e3)
        return null;
      const { light: t3, playIcon: a3, previewTabIndex: r2, oEmbedUrl: o2, previewAriaLabel: n2 } = this.props;
      return jt.default.createElement(Mt, { url: e3, light: t3, playIcon: a3, previewTabIndex: r2, previewAriaLabel: n2, oEmbedUrl: o2, onClick: this.handleClickPreview });
    }
    render() {
      const { url: e3, style: t3, width: a3, height: r2, fallback: o2, wrapper: n2 } = this.props, { showPreview: i2 } = this.state, l2 = this.getAttributes(e3), s2 = "string" == typeof n2 ? this.references.wrapper : void 0;
      return jt.default.createElement(n2, { ref: s2, style: { ...t3, width: a3, height: r2 }, ...l2 }, jt.default.createElement(xt, { fallback: o2 }, i2 ? this.renderPreview(e3) : this.renderActivePlayer(e3)));
    }
  }, Ot(a2, "displayName", "ReactPlayer"), Ot(a2, "propTypes", It.propTypes), Ot(a2, "defaultProps", It.defaultProps), Ot(a2, "addCustomPlayer", (e3) => {
    zt.push(e3);
  }), Ot(a2, "removeCustomPlayers", () => {
    zt.length = 0;
  }), Ot(a2, "canPlay", (t3) => {
    for (const a3 of [...zt, ...e2])
      if (a3.canPlay(t3))
        return true;
    return false;
  }), Ot(a2, "canEnablePIP", (t3) => {
    for (const a3 of [...zt, ...e2])
      if (a3.canEnablePIP && a3.canEnablePIP(t3))
        return true;
    return false;
  }), a2;
};
var Nt = Object.create, Ht = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, $t = Object.getOwnPropertyNames, Ft = Object.getPrototypeOf, Bt = Object.prototype.hasOwnProperty, Wt = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of $t(t2))
      Bt.call(e2, o2) || o2 === a2 || Ht(e2, o2, { get: () => t2[o2], enumerable: !(r2 = Vt(t2, o2)) || r2.enumerable });
  return e2;
}, Kt = {};
((e2, t2) => {
  for (var a2 in t2)
    Ht(e2, a2, { get: t2[a2], enumerable: true });
})(Kt, { default: () => Qt });
var Xt = ((e2) => Wt(Ht({}, "__esModule", { value: true }), e2))(Kt), Yt = ((e2, t2, a2) => (a2 = null != e2 ? Nt(Ft(e2)) : {}, Wt(!t2 && e2 && e2.__esModule ? a2 : Ht(a2, "default", { value: e2, enumerable: true }), e2)))(Oe), Zt = kt;
const qt = Yt.default[Yt.default.length - 1];
var Qt = (0, Zt.createReactPlayer)(Yt.default, qt);
const Jt = l({ __proto__: null, default: a(Xt) }, [Xt]);
export {
  Jt as i,
  Y as p,
  w as u
};
