/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/index.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/axios/index.js":
/*!*************************************!*\
  !*** ./node_modules/axios/index.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"./node_modules/axios/lib/axios.js\");\n\n//# sourceURL=webpack:///./node_modules/axios/index.js?");

/***/ }),

/***/ "./node_modules/axios/lib/adapters/xhr.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/adapters/xhr.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"./node_modules/axios/lib/core/settle.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"./node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"./node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"./node_modules/axios/lib/core/createError.js\");\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(/*! ./../helpers/btoa */ \"./node_modules/axios/lib/helpers/btoa.js\");\n\nmodule.exports = function xhrAdapter(config) {\n  return new Promise(function dispatchXhrRequest(resolve, reject) {\n    var requestData = config.data;\n    var requestHeaders = config.headers;\n\n    if (utils.isFormData(requestData)) {\n      delete requestHeaders['Content-Type']; // Let the browser set it\n    }\n\n    var request = new XMLHttpRequest();\n    var loadEvent = 'onreadystatechange';\n    var xDomain = false;\n\n    // For IE 8/9 CORS support\n    // Only supports POST and GET calls and doesn't returns the response headers.\n    // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n    if (!window.XMLHttpRequest &&\n        \"development\" !== 'test' &&\n        typeof window !== 'undefined' &&\n        window.XDomainRequest && !('withCredentials' in request) &&\n        !isURLSameOrigin(config.url)) {\n      request = new window.XDomainRequest();\n      loadEvent = 'onload';\n      xDomain = true;\n      request.onprogress = function handleProgress() {};\n      request.ontimeout = function handleTimeout() {};\n    }\n\n    // HTTP basic authentication\n    if (config.auth) {\n      var username = config.auth.username || '';\n      var password = config.auth.password || '';\n      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n    }\n\n    request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n    // Set the request timeout in MS\n    request.timeout = config.timeout;\n\n    // Listen for ready state\n    request[loadEvent] = function handleLoad() {\n      if (!request || (request.readyState !== 4 && !xDomain)) {\n        return;\n      }\n\n      // The request errored out and we didn't get a response, this will be\n      // handled by onerror instead\n      // With one exception: request that using file: protocol, most browsers\n      // will return status as 0 even though it's a successful request\n      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n        return;\n      }\n\n      // Prepare the response\n      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n      var response = {\n        data: responseData,\n        // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n        status: request.status === 1223 ? 204 : request.status,\n        statusText: request.status === 1223 ? 'No Content' : request.statusText,\n        headers: responseHeaders,\n        config: config,\n        request: request\n      };\n\n      settle(resolve, reject, response);\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle low level network errors\n    request.onerror = function handleError() {\n      // Real errors are hidden from us by the browser\n      // onerror should only fire if it's a network error\n      reject(createError('Network Error', config, null, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle timeout\n    request.ontimeout = function handleTimeout() {\n      reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n        request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Add xsrf header\n    // This is only done if running in a standard browser environment.\n    // Specifically not if we're in a web worker, or react-native.\n    if (utils.isStandardBrowserEnv()) {\n      var cookies = __webpack_require__(/*! ./../helpers/cookies */ \"./node_modules/axios/lib/helpers/cookies.js\");\n\n      // Add xsrf header\n      var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n          cookies.read(config.xsrfCookieName) :\n          undefined;\n\n      if (xsrfValue) {\n        requestHeaders[config.xsrfHeaderName] = xsrfValue;\n      }\n    }\n\n    // Add headers to the request\n    if ('setRequestHeader' in request) {\n      utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n          // Remove Content-Type if data is undefined\n          delete requestHeaders[key];\n        } else {\n          // Otherwise add header to the request\n          request.setRequestHeader(key, val);\n        }\n      });\n    }\n\n    // Add withCredentials to request if needed\n    if (config.withCredentials) {\n      request.withCredentials = true;\n    }\n\n    // Add responseType to request if needed\n    if (config.responseType) {\n      try {\n        request.responseType = config.responseType;\n      } catch (e) {\n        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n        if (config.responseType !== 'json') {\n          throw e;\n        }\n      }\n    }\n\n    // Handle progress if needed\n    if (typeof config.onDownloadProgress === 'function') {\n      request.addEventListener('progress', config.onDownloadProgress);\n    }\n\n    // Not all browsers support upload events\n    if (typeof config.onUploadProgress === 'function' && request.upload) {\n      request.upload.addEventListener('progress', config.onUploadProgress);\n    }\n\n    if (config.cancelToken) {\n      // Handle cancellation\n      config.cancelToken.promise.then(function onCanceled(cancel) {\n        if (!request) {\n          return;\n        }\n\n        request.abort();\n        reject(cancel);\n        // Clean up request\n        request = null;\n      });\n    }\n\n    if (requestData === undefined) {\n      requestData = null;\n    }\n\n    // Send the request\n    request.send(requestData);\n  });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/adapters/xhr.js?");

/***/ }),

/***/ "./node_modules/axios/lib/axios.js":
/*!*****************************************!*\
  !*** ./node_modules/axios/lib/axios.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  var context = new Axios(defaultConfig);\n  var instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context);\n\n  // Copy context to instance\n  utils.extend(instance, context);\n\n  return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n  return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/axios.js?");

/***/ }),

/***/ "./node_modules/axios/lib/cancel/Cancel.js":
/*!*************************************************!*\
  !*** ./node_modules/axios/lib/cancel/Cancel.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n  this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n  return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/Cancel.js?");

/***/ }),

/***/ "./node_modules/axios/lib/cancel/CancelToken.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n  if (typeof executor !== 'function') {\n    throw new TypeError('executor must be a function.');\n  }\n\n  var resolvePromise;\n  this.promise = new Promise(function promiseExecutor(resolve) {\n    resolvePromise = resolve;\n  });\n\n  var token = this;\n  executor(function cancel(message) {\n    if (token.reason) {\n      // Cancellation has already been requested\n      return;\n    }\n\n    token.reason = new Cancel(message);\n    resolvePromise(token.reason);\n  });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n  if (this.reason) {\n    throw this.reason;\n  }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n  var cancel;\n  var token = new CancelToken(function executor(c) {\n    cancel = c;\n  });\n  return {\n    token: token,\n    cancel: cancel\n  };\n};\n\nmodule.exports = CancelToken;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/CancelToken.js?");

/***/ }),

/***/ "./node_modules/axios/lib/cancel/isCancel.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/cancel/isCancel.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/isCancel.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/Axios.js":
/*!**********************************************!*\
  !*** ./node_modules/axios/lib/core/Axios.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar defaults = __webpack_require__(/*! ./../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"./node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"./node_modules/axios/lib/core/dispatchRequest.js\");\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n  this.defaults = instanceConfig;\n  this.interceptors = {\n    request: new InterceptorManager(),\n    response: new InterceptorManager()\n  };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n  /*eslint no-param-reassign:0*/\n  // Allow for axios('example/url'[, config]) a la fetch API\n  if (typeof config === 'string') {\n    config = utils.merge({\n      url: arguments[0]\n    }, arguments[1]);\n  }\n\n  config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n  config.method = config.method.toLowerCase();\n\n  // Hook up interceptors middleware\n  var chain = [dispatchRequest, undefined];\n  var promise = Promise.resolve(config);\n\n  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n    chain.unshift(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n    chain.push(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  while (chain.length) {\n    promise = promise.then(chain.shift(), chain.shift());\n  }\n\n  return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url\n    }));\n  };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, data, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url,\n      data: data\n    }));\n  };\n});\n\nmodule.exports = Axios;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/Axios.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/InterceptorManager.js":
/*!***********************************************************!*\
  !*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n  this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n  this.handlers.push({\n    fulfilled: fulfilled,\n    rejected: rejected\n  });\n  return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n  if (this.handlers[id]) {\n    this.handlers[id] = null;\n  }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n  utils.forEach(this.handlers, function forEachHandler(h) {\n    if (h !== null) {\n      fn(h);\n    }\n  });\n};\n\nmodule.exports = InterceptorManager;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/InterceptorManager.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/createError.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/core/createError.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"./node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n  var error = new Error(message);\n  return enhanceError(error, config, code, request, response);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/createError.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/dispatchRequest.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"./node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar isAbsoluteURL = __webpack_require__(/*! ./../helpers/isAbsoluteURL */ \"./node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ./../helpers/combineURLs */ \"./node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n  throwIfCancellationRequested(config);\n\n  // Support baseURL config\n  if (config.baseURL && !isAbsoluteURL(config.url)) {\n    config.url = combineURLs(config.baseURL, config.url);\n  }\n\n  // Ensure headers exist\n  config.headers = config.headers || {};\n\n  // Transform request data\n  config.data = transformData(\n    config.data,\n    config.headers,\n    config.transformRequest\n  );\n\n  // Flatten headers\n  config.headers = utils.merge(\n    config.headers.common || {},\n    config.headers[config.method] || {},\n    config.headers || {}\n  );\n\n  utils.forEach(\n    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n    function cleanHeaderConfig(method) {\n      delete config.headers[method];\n    }\n  );\n\n  var adapter = config.adapter || defaults.adapter;\n\n  return adapter(config).then(function onAdapterResolution(response) {\n    throwIfCancellationRequested(config);\n\n    // Transform response data\n    response.data = transformData(\n      response.data,\n      response.headers,\n      config.transformResponse\n    );\n\n    return response;\n  }, function onAdapterRejection(reason) {\n    if (!isCancel(reason)) {\n      throwIfCancellationRequested(config);\n\n      // Transform response data\n      if (reason && reason.response) {\n        reason.response.data = transformData(\n          reason.response.data,\n          reason.response.headers,\n          config.transformResponse\n        );\n      }\n    }\n\n    return Promise.reject(reason);\n  });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/dispatchRequest.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/enhanceError.js":
/*!*****************************************************!*\
  !*** ./node_modules/axios/lib/core/enhanceError.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n  error.config = config;\n  if (code) {\n    error.code = code;\n  }\n  error.request = request;\n  error.response = response;\n  return error;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/enhanceError.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/settle.js":
/*!***********************************************!*\
  !*** ./node_modules/axios/lib/core/settle.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"./node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n  var validateStatus = response.config.validateStatus;\n  // Note: status is not exposed by XDomainRequest\n  if (!response.status || !validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(createError(\n      'Request failed with status code ' + response.status,\n      response.config,\n      null,\n      response.request,\n      response\n    ));\n  }\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/settle.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/transformData.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/core/transformData.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n  /*eslint no-param-reassign:0*/\n  utils.forEach(fns, function transform(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/transformData.js?");

/***/ }),

/***/ "./node_modules/axios/lib/defaults.js":
/*!********************************************!*\
  !*** ./node_modules/axios/lib/defaults.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"./node_modules/axios/lib/helpers/normalizeHeaderName.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n  'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n    headers['Content-Type'] = value;\n  }\n}\n\nfunction getDefaultAdapter() {\n  var adapter;\n  if (typeof XMLHttpRequest !== 'undefined') {\n    // For browsers use XHR adapter\n    adapter = __webpack_require__(/*! ./adapters/xhr */ \"./node_modules/axios/lib/adapters/xhr.js\");\n  } else if (typeof process !== 'undefined') {\n    // For node use HTTP adapter\n    adapter = __webpack_require__(/*! ./adapters/http */ \"./node_modules/axios/lib/adapters/xhr.js\");\n  }\n  return adapter;\n}\n\nvar defaults = {\n  adapter: getDefaultAdapter(),\n\n  transformRequest: [function transformRequest(data, headers) {\n    normalizeHeaderName(headers, 'Content-Type');\n    if (utils.isFormData(data) ||\n      utils.isArrayBuffer(data) ||\n      utils.isBuffer(data) ||\n      utils.isStream(data) ||\n      utils.isFile(data) ||\n      utils.isBlob(data)\n    ) {\n      return data;\n    }\n    if (utils.isArrayBufferView(data)) {\n      return data.buffer;\n    }\n    if (utils.isURLSearchParams(data)) {\n      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n      return data.toString();\n    }\n    if (utils.isObject(data)) {\n      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n      return JSON.stringify(data);\n    }\n    return data;\n  }],\n\n  transformResponse: [function transformResponse(data) {\n    /*eslint no-param-reassign:0*/\n    if (typeof data === 'string') {\n      try {\n        data = JSON.parse(data);\n      } catch (e) { /* Ignore */ }\n    }\n    return data;\n  }],\n\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  }\n};\n\ndefaults.headers = {\n  common: {\n    'Accept': 'application/json, text/plain, */*'\n  }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n  defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/axios/lib/defaults.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/bind.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/helpers/bind.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = function bind(fn, thisArg) {\n  return function wrap() {\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n    return fn.apply(thisArg, args);\n  };\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/bind.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/btoa.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/helpers/btoa.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n  this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n  var str = String(input);\n  var output = '';\n  for (\n    // initialize result and counter\n    var block, charCode, idx = 0, map = chars;\n    // if the next str index does not exist:\n    //   change the mapping table to \"=\"\n    //   check if d has no fractional digits\n    str.charAt(idx | 0) || (map = '=', idx % 1);\n    // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n    output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n  ) {\n    charCode = str.charCodeAt(idx += 3 / 4);\n    if (charCode > 0xFF) {\n      throw new E();\n    }\n    block = block << 8 | charCode;\n  }\n  return output;\n}\n\nmodule.exports = btoa;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/btoa.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/buildURL.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/helpers/buildURL.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n  return encodeURIComponent(val).\n    replace(/%40/gi, '@').\n    replace(/%3A/gi, ':').\n    replace(/%24/g, '$').\n    replace(/%2C/gi, ',').\n    replace(/%20/g, '+').\n    replace(/%5B/gi, '[').\n    replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n  /*eslint no-param-reassign:0*/\n  if (!params) {\n    return url;\n  }\n\n  var serializedParams;\n  if (paramsSerializer) {\n    serializedParams = paramsSerializer(params);\n  } else if (utils.isURLSearchParams(params)) {\n    serializedParams = params.toString();\n  } else {\n    var parts = [];\n\n    utils.forEach(params, function serialize(val, key) {\n      if (val === null || typeof val === 'undefined') {\n        return;\n      }\n\n      if (utils.isArray(val)) {\n        key = key + '[]';\n      }\n\n      if (!utils.isArray(val)) {\n        val = [val];\n      }\n\n      utils.forEach(val, function parseValue(v) {\n        if (utils.isDate(v)) {\n          v = v.toISOString();\n        } else if (utils.isObject(v)) {\n          v = JSON.stringify(v);\n        }\n        parts.push(encode(key) + '=' + encode(v));\n      });\n    });\n\n    serializedParams = parts.join('&');\n  }\n\n  if (serializedParams) {\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/buildURL.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/combineURLs.js":
/*!*******************************************************!*\
  !*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n  return relativeURL\n    ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n    : baseURL;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/combineURLs.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/cookies.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/helpers/cookies.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs support document.cookie\n  (function standardBrowserEnv() {\n    return {\n      write: function write(name, value, expires, path, domain, secure) {\n        var cookie = [];\n        cookie.push(name + '=' + encodeURIComponent(value));\n\n        if (utils.isNumber(expires)) {\n          cookie.push('expires=' + new Date(expires).toGMTString());\n        }\n\n        if (utils.isString(path)) {\n          cookie.push('path=' + path);\n        }\n\n        if (utils.isString(domain)) {\n          cookie.push('domain=' + domain);\n        }\n\n        if (secure === true) {\n          cookie.push('secure');\n        }\n\n        document.cookie = cookie.join('; ');\n      },\n\n      read: function read(name) {\n        var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n        return (match ? decodeURIComponent(match[3]) : null);\n      },\n\n      remove: function remove(name) {\n        this.write(name, '', Date.now() - 86400000);\n      }\n    };\n  })() :\n\n  // Non standard browser env (web workers, react-native) lack needed support.\n  (function nonStandardBrowserEnv() {\n    return {\n      write: function write() {},\n      read: function read() { return null; },\n      remove: function remove() {}\n    };\n  })()\n);\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/cookies.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
/*!***********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs have full support of the APIs needed to test\n  // whether the request URL is of the same origin as current location.\n  (function standardBrowserEnv() {\n    var msie = /(msie|trident)/i.test(navigator.userAgent);\n    var urlParsingNode = document.createElement('a');\n    var originURL;\n\n    /**\n    * Parse a URL to discover it's components\n    *\n    * @param {String} url The URL to be parsed\n    * @returns {Object}\n    */\n    function resolveURL(url) {\n      var href = url;\n\n      if (msie) {\n        // IE needs attribute set twice to normalize properties\n        urlParsingNode.setAttribute('href', href);\n        href = urlParsingNode.href;\n      }\n\n      urlParsingNode.setAttribute('href', href);\n\n      // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n      return {\n        href: urlParsingNode.href,\n        protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n        host: urlParsingNode.host,\n        search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n        hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n        hostname: urlParsingNode.hostname,\n        port: urlParsingNode.port,\n        pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n                  urlParsingNode.pathname :\n                  '/' + urlParsingNode.pathname\n      };\n    }\n\n    originURL = resolveURL(window.location.href);\n\n    /**\n    * Determine if a URL shares the same origin as the current location\n    *\n    * @param {String} requestURL The URL to test\n    * @returns {boolean} True if URL shares the same origin, otherwise false\n    */\n    return function isURLSameOrigin(requestURL) {\n      var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n      return (parsed.protocol === originURL.protocol &&\n            parsed.host === originURL.host);\n    };\n  })() :\n\n  // Non standard browser envs (web workers, react-native) lack needed support.\n  (function nonStandardBrowserEnv() {\n    return function isURLSameOrigin() {\n      return true;\n    };\n  })()\n);\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js":
/*!***************************************************************!*\
  !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n  utils.forEach(headers, function processHeader(value, name) {\n    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n      headers[normalizedName] = value;\n      delete headers[name];\n    }\n  });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/normalizeHeaderName.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n  'age', 'authorization', 'content-length', 'content-type', 'etag',\n  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n  'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n  'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n  var parsed = {};\n  var key;\n  var val;\n  var i;\n\n  if (!headers) { return parsed; }\n\n  utils.forEach(headers.split('\\n'), function parser(line) {\n    i = line.indexOf(':');\n    key = utils.trim(line.substr(0, i)).toLowerCase();\n    val = utils.trim(line.substr(i + 1));\n\n    if (key) {\n      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n        return;\n      }\n      if (key === 'set-cookie') {\n        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n      } else {\n        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n      }\n    }\n  });\n\n  return parsed;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/parseHeaders.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/spread.js":
/*!**************************************************!*\
  !*** ./node_modules/axios/lib/helpers/spread.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  var args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/spread.js?");

/***/ }),

/***/ "./node_modules/axios/lib/utils.js":
/*!*****************************************!*\
  !*** ./node_modules/axios/lib/utils.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar isBuffer = __webpack_require__(/*! is-buffer */ \"./node_modules/is-buffer/index.js\");\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n  return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n  return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n  return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  var result;\n  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n  return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n  return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n  return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n  return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n  return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n  return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n  return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n  return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n  return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n  return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n    return false;\n  }\n  return (\n    typeof window !== 'undefined' &&\n    typeof document !== 'undefined'\n  );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object' && !isArray(obj)) {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (var i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Iterate over object keys\n    for (var key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        fn.call(null, obj[key], key, obj);\n      }\n    }\n  }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = merge(result[key], val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n  forEach(b, function assignValue(val, key) {\n    if (thisArg && typeof val === 'function') {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  });\n  return a;\n}\n\nmodule.exports = {\n  isArray: isArray,\n  isArrayBuffer: isArrayBuffer,\n  isBuffer: isBuffer,\n  isFormData: isFormData,\n  isArrayBufferView: isArrayBufferView,\n  isString: isString,\n  isNumber: isNumber,\n  isObject: isObject,\n  isUndefined: isUndefined,\n  isDate: isDate,\n  isFile: isFile,\n  isBlob: isBlob,\n  isFunction: isFunction,\n  isStream: isStream,\n  isURLSearchParams: isURLSearchParams,\n  isStandardBrowserEnv: isStandardBrowserEnv,\n  forEach: forEach,\n  merge: merge,\n  extend: extend,\n  trim: trim\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/utils.js?");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=script&lang=js&":
/*!************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/btn-list.vue?vue&type=script&lang=js& ***!
  \************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nconst ipcRenderer = __webpack_require__(/*! electron */ \"electron\").ipcRenderer;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    props: {\n        min: String,\n        max: String,\n        close: String\n    },\n    methods: {\n        ipcSend(msg) {\n            ipcRenderer.send(msg);\n        }\n    }\n});\n\n//# sourceURL=webpack:///./src/components/btn-list.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=script&lang=js&":
/*!***********************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dplayer.vue?vue&type=script&lang=js& ***!
  \***********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _lib_DPlayer_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lib/DPlayer.min.js */ \"./src/lib/DPlayer.min.js\");\n/* harmony import */ var _lib_DPlayer_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lib_DPlayer_min_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lib_DPlayer_min_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/DPlayer.min.css */ \"./src/lib/DPlayer.min.css\");\n/* harmony import */ var _lib_DPlayer_min_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lib_DPlayer_min_css__WEBPACK_IMPORTED_MODULE_1__);\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    props: {\n        options: Object\n    },\n    mounted() {\n        this.options.container = this.$el;\n        const player = this.dp = new _lib_DPlayer_min_js__WEBPACK_IMPORTED_MODULE_0___default.a(this.options);\n    }\n});\n\n//# sourceURL=webpack:///./src/components/dplayer.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=script&lang=js&":
/*!********************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/func.vue?vue&type=script&lang=js& ***!
  \********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nconst ipcRenderer = __webpack_require__(/*! electron */ \"electron\").ipcRenderer;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    methods: {\n        ipcSend(msg) {\n            ipcRenderer.send(msg);\n        }\n    }\n});\n\n//# sourceURL=webpack:///./src/components/func.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=script&lang=js&":
/*!**********************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/layout.vue?vue&type=script&lang=js& ***!
  \**********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _menu_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./menu.vue */ \"./src/components/menu.vue\");\n/* harmony import */ var _vedio_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vedio.vue */ \"./src/components/vedio.vue\");\n/* harmony import */ var _btn_list_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./btn-list.vue */ \"./src/components/btn-list.vue\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nconst { dialog } = __webpack_require__(/*! electron */ \"electron\").remote;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    components: {\n        menuItem: _menu_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n        vedioItem: _vedio_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n        ipcBtn: _btn_list_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n    },\n    methods: {\n        about() {\n            dialog.showMessageBox({\n                title: '弹幕姬',\n                detail: `版本: v1.4\\n作者: Weismann\\ngithub: https://github.com/xiaobai2017666/danmuji\\nQQ: 1563511027\\n动漫群: 2104517\\n明日方舟群: 2184571`\n            });\n        }\n    }\n});\n\n//# sourceURL=webpack:///./src/components/layout.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=script&lang=js&":
/*!********************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/menu.vue?vue&type=script&lang=js& ***!
  \********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _func_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./func.vue */ \"./src/components/func.vue\");\n/* harmony import */ var _video_list_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./video-list.vue */ \"./src/components/video-list.vue\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    data() {\n        return {\n            slideFlag: true\n        };\n    },\n    components: {\n        funcItem: _func_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n        listItem: _video_list_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n    },\n    methods: {\n        slideup() {\n            if (this.slideFlag) {\n                // this.$refs.menu.style='animation: 0.5s menuMarginClose forwards';\n                this.$refs['menu-container'].style = 'animation: 0.5s menuCSlideClose forwards';\n                this.slideFlag = false;\n            } else {\n                // this.$refs.menu.style='animation: 0.5s menuMarginOpen forwards';\n                this.$refs['menu-container'].style = 'animation: 0.5s menuCSlideOpen forwards';\n                this.slideFlag = true;\n            }\n        }\n    }\n});\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=script&lang=js&":
/*!*********************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/vedio.vue?vue&type=script&lang=js& ***!
  \*********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dplayer_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dplayer.vue */ \"./src/components/dplayer.vue\");\n/* harmony import */ var hls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! hls.js */ \"./node_modules/hls.js/dist/hls.js\");\n/* harmony import */ var hls_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hls_js__WEBPACK_IMPORTED_MODULE_1__);\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    data() {\n        return {\n            options: {\n                autoplay: false,\n                lang: 'zh-cn',\n                hotkey: true,\n                preload: 'auto',\n                volume: 0.8,\n                video: {\n                    url: ''\n                },\n                danmaku: {\n                    bottom: '15%',\n                    unlimited: true\n                }\n            }\n        };\n    },\n    components: {\n        'd-player': _dplayer_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n    },\n    mounted() {\n        this.$bus.$on('url-change', (url, av, is, ep) => {\n            const M3U8R = /[\\d\\D]*.m3u8$/;\n            if (M3U8R.test(url)) {\n                let hlsObject = new hls_js__WEBPACK_IMPORTED_MODULE_1___default.a();\n                hlsObject.loadSource(url);\n                hlsObject.attachMedia(this.$refs.video.dp.video);\n            } else {\n                this.$refs.video.dp.switchVideo({ url: url });\n            }\n            this.$refs.video.dp.danmaku.reload(av, is, ep);\n        });\n    }\n});\n\n//# sourceURL=webpack:///./src/components/vedio.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=script&lang=js&":
/*!**************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/video-list.vue?vue&type=script&lang=js& ***!
  \**************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nconst ipcRenderer = __webpack_require__(/*! electron */ \"electron\").ipcRenderer;\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n    data() {\n        return {\n            videoList: [],\n            current: -1\n        };\n    },\n    methods: {\n        videoChange(url, av, is, ep, index) {\n            this.$bus.$emit('url-change', url, av, is, ep);\n            this.current = index;\n        }\n    },\n    created() {\n        let that = this;\n\n        axios__WEBPACK_IMPORTED_MODULE_0___default()({\n            url: 'https://xiaobai2017666.github.io/videos/'\n        }).then(function (res) {\n            that.videoList = res.data.list;\n        });\n    },\n    mounted() {\n        let that = this;\n\n        ipcRenderer.on('video-add', (e, args) => {\n            console.log(1);\n            that.videoList.push(args);\n        });\n    }\n});\n\n//# sourceURL=webpack:///./src/components/video-list.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css&":
/*!***********************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css& ***!
  \***********************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Imports\nvar getUrl = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/getUrl.js */ \"./node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL___0___ = getUrl(__webpack_require__(/*! ../asserts/min.png */ \"./src/asserts/min.png\"));\nvar ___CSS_LOADER_URL___1___ = getUrl(__webpack_require__(/*! ../asserts/max.png */ \"./src/asserts/max.png\"));\nvar ___CSS_LOADER_URL___2___ = getUrl(__webpack_require__(/*! ../asserts/close.png */ \"./src/asserts/close.png\"));\n// Module\nexports.push([module.i, \"\\n.btn[data-v-411b2c02] {\\n    border: none;\\n    outline: none;\\n    background: transparent;\\n    width: 32px;\\n    height: 32px;\\n    cursor: pointer;\\n}\\n.btn-min[data-v-411b2c02] {\\n    background: url(\" + ___CSS_LOADER_URL___0___ + \");\\n    background-size: 100%;\\n}\\n.btn-max[data-v-411b2c02] {\\n    background: url(\" + ___CSS_LOADER_URL___1___ + \");\\n    background-size: 100%;\\n}\\n.btn-close[data-v-411b2c02] {\\n    background: url(\" + ___CSS_LOADER_URL___2___ + \") no-repeat;\\n    background-size: 100%;\\n}\\n.btn-none[data-v-411b2c02] {\\n    display: none;\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/btn-list.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css&":
/*!**********************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css& ***!
  \**********************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"\\nvideo[data-v-4e94c036] {\\n    max-height: 100%;\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/dplayer.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css&":
/*!*******************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css& ***!
  \*******************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"\\n.func[data-v-247d68d4] {\\n    margin: 4px 16px;\\n    font-size: 14px;\\n}\\nbutton[data-v-247d68d4] {\\n    color: #ff9955;\\n    margin: 4px 0;\\n    padding: 4px 6px 6px;\\n    border: 0.5px solid #fff;\\n    border-radius: 4px;\\n    background: transparent;\\n    outline: none;\\n    cursor: pointer;\\n}\\nbutton[data-v-247d68d4]:hover {\\n    border-color: #ff9955;\\n    box-shadow:\\n    0 0 4px #ffffff,\\n    0 0 4px #ffffff;\\n}\\np[data-v-247d68d4] {\\n    text-indent: 10px;\\n    font-size: 10px;\\n    line-height: 0px;\\n    text-shadow: none;\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/func.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css&":
/*!*********************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css& ***!
  \*********************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Imports\nvar getUrl = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/getUrl.js */ \"./node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL___0___ = getUrl(__webpack_require__(/*! ../asserts/bkg.jpg */ \"./src/asserts/bkg.jpg\"));\n// Module\nexports.push([module.i, \"\\n.container[data-v-ecebbf8c] {\\n    flex-direction: column;\\n    height: 100%;\\n    background-image: url(\" + ___CSS_LOADER_URL___0___ + \");\\n    background-position: center;\\n    color: #ff9955;\\n    text-shadow:\\n    0 0 3px #ffffff,\\n    0 0 3px #ffffff;\\n    overflow: hidden;\\n}\\n.title[data-v-ecebbf8c] {\\n    display: flex;\\n    background: rgba(0,0,0,0.8);\\n    padding: 12px 36px;\\n    font-size: 36px;\\n    align-items: flex-end;\\n}\\n.drag[data-v-ecebbf8c] {\\n    flex: 1;\\n    height: 48px;\\n    -webkit-app-region:drag;\\n}\\n.small[data-v-ecebbf8c] {\\n    font-size: 12px;\\n}\\n.btn-list[data-v-ecebbf8c] {\\n    float: right;\\n}\\n.middle[data-v-ecebbf8c] {\\n    height: calc(100% - 72px);\\n    display: flex;\\n}\\n.menu[data-v-ecebbf8c] {\\n    height: 100%;\\n}\\n.vedio[data-v-ecebbf8c] {\\n    flex: 1;\\n}\\n.about[data-v-ecebbf8c] {\\n    border: none;\\n    outline: none;\\n    background: transparent;\\n    color: #ff9955;\\n    text-shadow:\\n    0 0 3px #ffffff,\\n    0 0 3px #ffffff;\\n    cursor: pointer;\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/layout.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=0&lang=css&":
/*!*******************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/menu.vue?vue&type=style&index=0&lang=css& ***!
  \*******************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"\\n@keyframes menuCSlideClose {\\n0% {\\n        width: 280px;\\n        padding: 16px 24px;\\n        margin: 50px 40px 38px;\\n}\\n100% {\\n        width: 0px;\\n        padding: 0;\\n        margin: 20px;\\n}\\n}\\n@keyframes menuCSlideOpen {\\n0% {\\n        width: 0px;\\n        padding: 0;\\n        margin: 20px;\\n}\\n100% {\\n        width: 280px;\\n        padding: 16px 24px;\\n        margin: 50px 40px 38px;\\n}\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css&":
/*!*******************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css& ***!
  \*******************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"\\n.menu[data-v-a380d422] {\\n    position: relative;\\n}\\n.menu-container[data-v-a380d422] {\\n    width: 280px;\\n    height: calc(100% - 88px);\\n    margin: 50px 40px 38px;\\n    padding: 16px 24px;\\n    box-sizing: border-box;\\n    background: rgba(0,0,0,0.8);\\n    overflow: hidden;\\n}\\n.func-item[data-v-a380d422] {\\n    height: 160px;\\n}\\n.list-item[data-v-a380d422] {\\n    height: calc(100% - 192px);\\n}\\n.slide[data-v-a380d422] {\\n    height: 36px;\\n    width: 28px;\\n    font-weight: bold;\\n    background: #000;\\n    border: none;\\n    outline: none;\\n    position: absolute;\\n    left: calc(100% - 40px);\\n    top: 50%;\\n    transform: translate(0,-50%);\\n    cursor: pointer;\\n    transition: 0.3s all;\\n}\\n.slide[data-v-a380d422]:hover {\\n    text-shadow:\\n    0 0 10px #ffffff,\\n    0 0 10px #ffffff;\\n}\\n.slide[data-v-a380d422]::before {\\n    content: '';\\n    border: 20px solid transparent;\\n    border-left-color: #000;\\n    transform: rotate(135deg);\\n    position: absolute;\\n    left: -20px;\\n    bottom: 16px;\\n}\\n.slide[data-v-a380d422]::after {\\n    content: '';\\n    border: 20px solid transparent;\\n    border-left-color: #000;\\n    transform: rotate(-135deg);\\n    position: absolute;\\n    left: -20px;\\n    top: 15px;\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css&":
/*!********************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css& ***!
  \********************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"\\n.index[data-v-2e15da1b] {\\n    margin: 50px 40px 38px;\\n    background: rgba(0,0,0,0.8);\\n    position: relative;\\n}\\n.video[data-v-2e15da1b] {\\n    width: 100%;\\n    height: 100%;\\n    outline: none;\\n    position: absolute;\\n    top: 50%;\\n    transform: translateY(-50%);\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/vedio.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css&":
/*!*************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css& ***!
  \*************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"\\n.list[data-v-26de6e80] {\\n    height: 100%;\\n    text-shadow: none;\\n    list-style: none;\\n    margin: 4px 16px;\\n    padding: 0;\\n    font-size: 14px;\\n    overflow: auto;\\n}\\n.list-li[data-v-26de6e80] {\\n    padding: 3px 3px 4px;\\n    border: 0.5px solid transparent;\\n    overflow: hidden;\\n    white-space: nowrap;\\n    text-overflow: ellipsis;\\n    cursor: pointer;\\n}\\n.list-li[data-v-26de6e80]:hover {\\n    border: 0.5px solid #ff9955;\\n}\\n.active[data-v-26de6e80] {\\n    border: 0.5px solid #fff;\\n}\\n\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/components/video-list.vue?./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js!./src/lib/DPlayer.min.css":
/*!***********************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js!./src/lib/DPlayer.min.css ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \"button[data-balloon]{overflow:visible}[data-balloon]{position:relative;cursor:pointer}[data-balloon]:after{font-family:sans-serif!important;font-weight:400!important;font-style:normal!important;text-shadow:none!important;font-size:12px!important;background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(data-balloon);padding:.5em 1em;white-space:nowrap}[data-balloon]:after,[data-balloon]:before{filter:alpha(opacity=0);-ms-filter:\\\"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\\\";-moz-opacity:0;-khtml-opacity:0;opacity:0;pointer-events:none;-webkit-transition:all .18s ease-out .18s;transition:all .18s ease-out .18s;position:absolute;z-index:10}[data-balloon]:before{background:no-repeat url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002C14.285 12.002 8.594 0 2.658 0z'/%3E%3C/svg%3E\\\");background-size:100% auto;width:18px;height:6px;content:\\\"\\\"}[data-balloon]:hover:after,[data-balloon]:hover:before,[data-balloon][data-balloon-visible]:after,[data-balloon][data-balloon-visible]:before{filter:alpha(opacity=100);-ms-filter:\\\"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\\\";-moz-opacity:1;-khtml-opacity:1;opacity:1;pointer-events:auto}[data-balloon]:not([data-balloon-pos]):after{margin-bottom:11px}[data-balloon]:not([data-balloon-pos]):after,[data-balloon]:not([data-balloon-pos]):before{bottom:100%;left:50%;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon]:not([data-balloon-pos]):before{margin-bottom:5px}[data-balloon]:not([data-balloon-pos]):hover:after,[data-balloon]:not([data-balloon-pos]):hover:before,[data-balloon]:not([data-balloon-pos])[data-balloon-visible]:after,[data-balloon]:not([data-balloon-pos])[data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon].font-awesome:after{font-family:FontAwesome,sans-serif!important}[data-balloon][data-balloon-break]:after{white-space:pre}[data-balloon][data-balloon-blunt]:after,[data-balloon][data-balloon-blunt]:before{-webkit-transition:none;transition:none}[data-balloon][data-balloon-pos=up]:after{margin-bottom:11px}[data-balloon][data-balloon-pos=up]:after,[data-balloon][data-balloon-pos=up]:before{bottom:100%;left:50%;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up]:before{margin-bottom:5px}[data-balloon][data-balloon-pos=up]:hover:after,[data-balloon][data-balloon-pos=up]:hover:before,[data-balloon][data-balloon-pos=up][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=up-left]:after{left:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-left]:after,[data-balloon][data-balloon-pos=up-left]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-left]:before{left:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-left]:hover:after,[data-balloon][data-balloon-pos=up-left]:hover:before,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=up-right]:after{right:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-right]:after,[data-balloon][data-balloon-pos=up-right]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-right]:before{right:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-right]:hover:after,[data-balloon][data-balloon-pos=up-right]:hover:before,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=down]:after{margin-top:11px}[data-balloon][data-balloon-pos=down]:after,[data-balloon][data-balloon-pos=down]:before{left:50%;top:100%;-webkit-transform:translate(-50%,-10px);transform:translate(-50%,-10px)}[data-balloon][data-balloon-pos=down]:before{background:no-repeat url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E\\\");background-size:100% auto;width:18px;height:6px;margin-top:5px}[data-balloon][data-balloon-pos=down]:hover:after,[data-balloon][data-balloon-pos=down]:hover:before,[data-balloon][data-balloon-pos=down][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=down-left]:after{left:0;margin-top:11px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]:before{background:no-repeat url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E\\\");background-size:100% auto;width:18px;height:6px;left:5px;margin-top:5px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]:hover:after,[data-balloon][data-balloon-pos=down-left]:hover:before,[data-balloon][data-balloon-pos=down-left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down-left][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=down-right]:after{right:0;margin-top:11px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-right]:before{background:no-repeat url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E\\\");background-size:100% auto;width:18px;height:6px;right:5px;margin-top:5px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-right]:hover:after,[data-balloon][data-balloon-pos=down-right]:hover:before,[data-balloon][data-balloon-pos=down-right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down-right][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=left]:after{margin-right:11px;right:100%;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}[data-balloon][data-balloon-pos=left]:before{background:no-repeat url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002C12.002 21.715 0 27.406 0 33.342z'/%3E%3C/svg%3E\\\");background-size:100% auto;width:6px;height:18px;margin-right:5px;right:100%;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}[data-balloon][data-balloon-pos=left]:hover:after,[data-balloon][data-balloon-pos=left]:hover:before,[data-balloon][data-balloon-pos=left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=left][data-balloon-visible]:before{-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-balloon][data-balloon-pos=right]:after{left:100%;margin-left:11px;top:50%;-webkit-transform:translate(-10px,-50%);transform:translate(-10px,-50%)}[data-balloon][data-balloon-pos=right]:before{background:no-repeat url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002C-.002 14.285 12 8.594 12 2.658z'/%3E%3C/svg%3E\\\");background-size:100% auto;width:6px;height:18px;left:100%;margin-left:5px;top:50%;-webkit-transform:translate(-10px,-50%);transform:translate(-10px,-50%)}[data-balloon][data-balloon-pos=right]:hover:after,[data-balloon][data-balloon-pos=right]:hover:before,[data-balloon][data-balloon-pos=right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=right][data-balloon-visible]:before{-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-balloon][data-balloon-length=small]:after{white-space:normal;width:80px}[data-balloon][data-balloon-length=medium]:after{white-space:normal;width:150px}[data-balloon][data-balloon-length=large]:after{white-space:normal;width:260px}[data-balloon][data-balloon-length=xlarge]:after{white-space:normal;width:380px}@media screen and (max-width:768px){[data-balloon][data-balloon-length=xlarge]:after{white-space:normal;width:90vw}}[data-balloon][data-balloon-length=fit]:after{white-space:normal;width:100%}\\n@-webkit-keyframes my-face{2%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}4%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}6%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}8%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}10%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}12%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}14%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}16%{-webkit-transform:translateY(-.5px) rotate(-1.5deg);transform:translateY(-.5px) rotate(-1.5deg)}18%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}20%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}22%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}24%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}26%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}28%{-webkit-transform:translateY(.5px) rotate(1.5deg);transform:translateY(.5px) rotate(1.5deg)}30%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}32%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}34%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}36%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}38%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}40%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}42%{-webkit-transform:translateY(2.5px) rotate(-1.5deg);transform:translateY(2.5px) rotate(-1.5deg)}44%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}46%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}48%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}50%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}52%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}54%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}56%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}58%{-webkit-transform:translateY(.5px) rotate(2.5deg);transform:translateY(.5px) rotate(2.5deg)}60%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}62%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}64%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}66%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}68%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}70%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}72%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}74%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}76%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}78%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}80%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}82%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}84%{-webkit-transform:translateY(1.5px) rotate(2.5deg);transform:translateY(1.5px) rotate(2.5deg)}86%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}88%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}90%{-webkit-transform:translateY(2.5px) rotate(-.5deg);transform:translateY(2.5px) rotate(-.5deg)}92%{-webkit-transform:translateY(.5px) rotate(-.5deg);transform:translateY(.5px) rotate(-.5deg)}94%{-webkit-transform:translateY(2.5px) rotate(.5deg);transform:translateY(2.5px) rotate(.5deg)}96%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}98%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}0%,to{-webkit-transform:translate(0) rotate(0deg);transform:translate(0) rotate(0deg)}}@keyframes my-face{2%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}4%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}6%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}8%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}10%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}12%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}14%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}16%{-webkit-transform:translateY(-.5px) rotate(-1.5deg);transform:translateY(-.5px) rotate(-1.5deg)}18%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}20%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}22%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}24%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}26%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}28%{-webkit-transform:translateY(.5px) rotate(1.5deg);transform:translateY(.5px) rotate(1.5deg)}30%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}32%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}34%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}36%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}38%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}40%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}42%{-webkit-transform:translateY(2.5px) rotate(-1.5deg);transform:translateY(2.5px) rotate(-1.5deg)}44%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}46%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}48%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}50%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}52%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}54%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}56%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}58%{-webkit-transform:translateY(.5px) rotate(2.5deg);transform:translateY(.5px) rotate(2.5deg)}60%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}62%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}64%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}66%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}68%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}70%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}72%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}74%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}76%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}78%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}80%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}82%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}84%{-webkit-transform:translateY(1.5px) rotate(2.5deg);transform:translateY(1.5px) rotate(2.5deg)}86%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}88%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}90%{-webkit-transform:translateY(2.5px) rotate(-.5deg);transform:translateY(2.5px) rotate(-.5deg)}92%{-webkit-transform:translateY(.5px) rotate(-.5deg);transform:translateY(.5px) rotate(-.5deg)}94%{-webkit-transform:translateY(2.5px) rotate(.5deg);transform:translateY(2.5px) rotate(.5deg)}96%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}98%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}0%,to{-webkit-transform:translate(0) rotate(0deg);transform:translate(0) rotate(0deg)}}.dplayer{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:1}.dplayer *{box-sizing:content-box}.dplayer svg{width:100%;height:100%}.dplayer svg circle,.dplayer svg path{fill:#fff}.dplayer:-webkit-full-screen{width:100%;height:100%;background:#000;position:fixed;z-index:100000;left:0;top:0;margin:0;padding:0;-webkit-transform:translate(0);transform:translate(0)}.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-top.dplayer-danmaku-move{-webkit-animation:danmaku-center 6s linear;animation:danmaku-center 6s linear;-webkit-animation-play-state:inherit;animation-play-state:inherit}.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move{-webkit-animation:danmaku 8s linear;animation:danmaku 8s linear;-webkit-animation-play-state:inherit;animation-play-state:inherit}.dplayer.dplayer-live .dplayer-bar-wrap,.dplayer.dplayer-live.dplayer-no-danmaku .dplayer-setting,.dplayer.dplayer-live .dplayer-setting-loop,.dplayer.dplayer-live .dplayer-setting-speed,.dplayer.dplayer-live .dplayer-time,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-comment,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-danmaku,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-danunlimit,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-showdan,.dplayer.dplayer-no-danmaku .dplayer-danmaku{display:none}.dplayer.dplayer-arrow .dplayer-danmaku{font-size:18px}.dplayer.dplayer-arrow .dplayer-icon{margin:0 -3px}.dplayer.dplayer-playing .dplayer-danmaku .dplayer-danmaku-move{-webkit-animation-play-state:running;animation-play-state:running}@media (min-width:900px){.dplayer.dplayer-playing .dplayer-controller,.dplayer.dplayer-playing .dplayer-controller-mask{opacity:0}.dplayer.dplayer-playing:hover .dplayer-controller,.dplayer.dplayer-playing:hover .dplayer-controller-mask{opacity:1}}.dplayer.dplayer-loading .dplayer-bezel .diplayer-loading-icon{display:block}.dplayer.dplayer-loading .dplayer-danmaku,.dplayer.dplayer-loading .dplayer-danmaku-move,.dplayer.dplayer-paused .dplayer-danmaku,.dplayer.dplayer-paused .dplayer-danmaku-move{-webkit-animation-play-state:paused;animation-play-state:paused}.dplayer.dplayer-hide-controller{cursor:none}.dplayer.dplayer-hide-controller .dplayer-controller,.dplayer.dplayer-hide-controller .dplayer-controller-mask{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.dplayer.dplayer-show-controller .dplayer-controller,.dplayer.dplayer-show-controller .dplayer-controller-mask{opacity:1}.dplayer.dplayer-fulled{position:fixed;z-index:100000;left:0;top:0;width:100%;height:100%}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-camera-icon,.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-volume{display:none}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:static;display:inline-block}.dplayer.dplayer-mobile .dplayer-bar-time{display:none}.dplayer-web-fullscreen-fix{position:fixed;top:0;left:0;margin:0;padding:0}[data-balloon]:before{display:none}[data-balloon]:after{padding:.3em .7em;background:rgba(17,17,17,.7)}[data-balloon][data-balloon-pos=up]:after{margin-bottom:0}.dplayer-bezel{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.dplayer-bezel .dplayer-bezel-icon{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;box-sizing:border-box;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none}.dplayer-bezel .dplayer-bezel-icon.dplayer-bezel-transition{-webkit-animation:bezel-hide .5s linear;animation:bezel-hide .5s linear}@-webkit-keyframes bezel-hide{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(2);transform:scale(2)}}@keyframes bezel-hide{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(2);transform:scale(2)}}.dplayer-bezel .dplayer-danloading{position:absolute;top:50%;margin-top:-7px;width:100%;text-align:center;font-size:14px;line-height:14px;-webkit-animation:my-face 5s ease-in-out infinite;animation:my-face 5s ease-in-out infinite}.dplayer-bezel .diplayer-loading-icon{display:none;position:absolute;top:50%;left:50%;margin:-18px 0 0 -18px;height:36px;width:36px;pointer-events:none}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-hide{display:none}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot{-webkit-animation:diplayer-loading-dot-fade .8s ease infinite;animation:diplayer-loading-dot-fade .8s ease infinite;opacity:0;-webkit-transform-origin:4px 4px;transform-origin:4px 4px}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-7{-webkit-animation-delay:.7s;animation-delay:.7s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-6{-webkit-animation-delay:.6s;animation-delay:.6s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-5{-webkit-animation-delay:.5s;animation-delay:.5s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-4{-webkit-animation-delay:.4s;animation-delay:.4s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-3{-webkit-animation-delay:.3s;animation-delay:.3s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-2{-webkit-animation-delay:.2s;animation-delay:.2s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-1{-webkit-animation-delay:.1s;animation-delay:.1s}@-webkit-keyframes diplayer-loading-dot-fade{0%{opacity:.7;-webkit-transform:scale(1.2);transform:scale(1.2)}50%{opacity:.25;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:.25;-webkit-transform:scale(.85);transform:scale(.85)}}@keyframes diplayer-loading-dot-fade{0%{opacity:.7;-webkit-transform:scale(1.2);transform:scale(1.2)}50%{opacity:.25;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:.25;-webkit-transform:scale(.85);transform:scale(.85)}}.dplayer-controller-mask{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%}.dplayer-controller,.dplayer-controller-mask{position:absolute;bottom:0;-webkit-transition:all .3s ease;transition:all .3s ease}.dplayer-controller{left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dplayer-controller.dplayer-controller-comment .dplayer-icons{display:none}.dplayer-controller.dplayer-controller-comment .dplayer-icons.dplayer-comment-box{display:block}.dplayer-controller .dplayer-bar-wrap{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-bar .dplayer-played .dplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-highlight{display:block;width:8px;-webkit-transform:translateX(-4px);transform:translateX(-4px);top:4px;height:40%}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight{z-index:12;position:absolute;top:5px;width:6px;height:20%;border-radius:6px;background-color:#fff;text-align:center;-webkit-transform:translateX(-3px);transform:translateX(-3px);-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover .dplayer-highlight-text{display:block}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-preview,.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-time{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight .dplayer-highlight-text{display:none;position:absolute;left:50%;top:-24px;padding:5px 8px;background-color:rgba(0,0,0,.62);color:#fff;border-radius:4px;font-size:12px;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview{position:absolute;background:#fff;pointer-events:none;display:none;background-size:16000px 100%}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview-canvas{position:absolute;width:100%;height:100%;z-index:1;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-bar{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded{background:hsla(0,0%,100%,.4);-webkit-transition:all .5s ease;transition:all .5s ease}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded,.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.dplayer-controller .dplayer-icons{height:38px;position:absolute;bottom:0}.dplayer-controller .dplayer-icons.dplayer-comment-box{display:none;position:absolute;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;z-index:2;height:38px;bottom:0;left:20px;right:20px;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-icon{position:absolute;left:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-send-icon{position:absolute;right:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box{position:absolute;background:rgba(28,28,28,.9);bottom:41px;left:0;box-shadow:0 0 25px rgba(0,0,0,.3);border-radius:4px;padding:10px 10px 16px;font-size:14px;width:204px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box.dplayer-comment-setting-open{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box input[type=radio]{display:none}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box label{cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-title{font-size:13px;color:#fff;line-height:30px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type .dplayer-comment-setting-title{margin-bottom:6px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(2) span{border-radius:4px 0 0 4px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(4) span{border-radius:0 4px 4px 0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type span{width:33%;padding:4px 6px;line-height:16px;display:inline-block;font-size:12px;color:#fff;border:1px solid #fff;margin-right:-1px;box-sizing:border-box;text-align:center;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type input:checked+span{background:#e4e4e6;color:#1c1c1c}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color label{font-size:0;padding:6px;display:inline-block}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span{width:22px;height:22px;display:inline-block;border-radius:50%;box-sizing:border-box;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span:hover{-webkit-animation:my-face 5s ease-in-out infinite;animation:my-face 5s ease-in-out infinite}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input{outline:none;border:none;padding:8px 31px;font-size:14px;line-height:18px;text-align:center;border-radius:4px;background:none;margin:0;height:100%;box-sizing:border-box;width:100%;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-webkit-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-moz-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input:-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-clear{display:none}.dplayer-controller .dplayer-icons.dplayer-icons-left .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-icons-right{right:20px}.dplayer-controller .dplayer-icons.dplayer-icons-right .dplayer-icon{padding:8px}.dplayer-controller .dplayer-icons .dplayer-live-badge,.dplayer-controller .dplayer-icons .dplayer-time{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.dplayer-controller .dplayer-icons .dplayer-live-dot{display:inline-block;width:6px;height:6px;vertical-align:4%;margin-right:5px;content:\\\"\\\";border-radius:6px}.dplayer-controller .dplayer-icons .dplayer-icon{width:40px;height:100%;border:none;background-color:transparent;outline:none;cursor:pointer;vertical-align:middle;box-sizing:border-box;display:inline-block}.dplayer-controller .dplayer-icons .dplayer-icon .dplayer-icon-content{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;opacity:.8}.dplayer-controller .dplayer-icons .dplayer-icon:hover .dplayer-icon-content{opacity:1}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-quality-icon{color:#fff;width:auto;line-height:22px;font-size:14px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-comment-icon{padding:10px 9px 9px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-setting-icon{padding-top:8.5px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-volume-icon{width:43px}.dplayer-controller .dplayer-icons .dplayer-volume{position:relative;display:inline-block;cursor:pointer;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap{display:inline-block;margin:0 10px 0 -5px;vertical-align:middle;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar{position:relative;top:17px;width:0;height:3px;background:#aaa;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner{position:absolute;bottom:0;left:0;height:100%;-webkit-transition:all .1s ease;transition:all .1s ease;will-change:width}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.dplayer-controller .dplayer-icons .dplayer-setting,.dplayer-controller .dplayer-icons .dplayer-subtitle-btn{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box{position:absolute;right:0;bottom:50px;-webkit-transform:scale(0);transform:scale(0);width:150px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;z-index:2}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div.dplayer-setting-origin-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-open{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-narrow{width:70px;height:180px;text-align:center}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-origin-panel{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-speed-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item{height:30px;padding:5px 10px;box-sizing:border-box;cursor:pointer;position:relative}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item:hover,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku{padding:5px 0}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-label{padding:0 10px;display:inline}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap{padding:0 10px;box-sizing:border-box;display:none;vertical-align:middle;height:100%;width:100%}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar{position:relative;top:8.5px;width:100%;height:3px;background:#fff;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar .dplayer-danmaku-bar-inner{position:absolute;bottom:0;left:0;height:100%;-webkit-transition:all .1s ease;transition:all .1s ease;background:#aaa;will-change:width}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar .dplayer-danmaku-bar-inner .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;background:#aaa}.dplayer-controller .dplayer-icons .dplayer-full{display:inline-block;height:100%;position:relative}.dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon{display:block}.dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:absolute;top:-30px;z-index:1;display:none}.dplayer-controller .dplayer-icons .dplayer-quality{position:relative;display:inline-block;height:100%;z-index:2}.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list,.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask{display:block}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask{display:none;position:absolute;bottom:38px;left:-18px;width:80px;padding-bottom:12px}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-list{display:none;font-size:12px;width:80px;border-radius:2px;background:rgba(28,28,28,.9);padding:5px 0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;color:#fff;text-align:center}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item{height:25px;box-sizing:border-box;cursor:pointer;line-height:25px}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-comment{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-label{color:#eee;font-size:13px;display:inline-block;vertical-align:middle;white-space:nowrap}.dplayer-controller .dplayer-icons .dplayer-toggle{width:32px;height:20px;text-align:center;font-size:0;vertical-align:middle;position:absolute;top:5px;right:10px}.dplayer-controller .dplayer-icons .dplayer-toggle input{max-height:0;max-width:0;display:none}.dplayer-controller .dplayer-icons .dplayer-toggle input+label{display:inline-block;position:relative;box-shadow:inset 0 0 0 0 #dfdfdf;border:1px solid #dfdfdf;height:20px;width:32px;border-radius:10px;box-sizing:border-box;cursor:pointer;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after,.dplayer-controller .dplayer-icons .dplayer-toggle input+label:before{content:\\\"\\\";position:absolute;display:block;height:18px;width:18px;top:0;left:0;border-radius:15px;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label{border-color:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:before{width:30px;background:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:after{left:12px}.dplayer-danmaku{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff}.dplayer-danmaku .dplayer-danmaku-item{display:inline-block;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;white-space:nowrap;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.dplayer-danmaku .dplayer-danmaku-item--demo{position:absolute;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-right{position:absolute;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move{will-change:transform;-webkit-animation:danmaku 5s linear;animation:danmaku 5s linear;-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes danmaku{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes danmaku{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.dplayer-danmaku .dplayer-danmaku-bottom,.dplayer-danmaku .dplayer-danmaku-top{position:absolute;width:100%;text-align:center;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.dplayer-danmaku .dplayer-danmaku-top.dplayer-danmaku-move{will-change:visibility;-webkit-animation:danmaku-center 4s linear;animation:danmaku-center 4s linear;-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes danmaku-center{0%{visibility:visible}to{visibility:visible}}@keyframes danmaku-center{0%{visibility:visible}to{visibility:visible}}.dplayer-logo{pointer-events:none;position:absolute;left:20px;top:20px;max-width:50px;max-height:50px}.dplayer-logo img{max-width:100%;max-height:100%;background:none}.dplayer-menu{position:absolute;width:170px;border-radius:2px;background:rgba(28,28,28,.85);padding:5px 0;overflow:hidden;z-index:3;display:none}.dplayer-menu.dplayer-menu-show{display:block}.dplayer-menu .dplayer-menu-item{height:30px;box-sizing:border-box;cursor:pointer}.dplayer-menu .dplayer-menu-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-menu .dplayer-menu-item a{padding:0 10px;line-height:30px;color:#eee;font-size:13px;display:inline-block;vertical-align:middle;width:100%;box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-menu .dplayer-menu-item a:hover{text-decoration:none}.dplayer-notice{opacity:0;position:absolute;bottom:60px;left:20px;font-size:14px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 20px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none}.dplayer-subtitle{position:absolute;bottom:40px;width:90%;left:5%;text-align:center;color:#fff;text-shadow:.5px .5px .5px rgba(0,0,0,.5);font-size:20px}.dplayer-subtitle.dplayer-subtitle-hide{display:none}.dplayer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.dplayer-mask.dplayer-mask-show{display:block}.dplayer-video-wrap{position:relative;background:#000;font-size:0;width:100%;height:100%}.dplayer-video-wrap .dplayer-video{width:100%;height:100%;position:absolute;left:50%;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);display:none}.dplayer-video-wrap .dplayer-video-current{display:block}.dplayer-video-wrap .dplayer-video-prepare{display:none}.dplayer-info-panel{position:absolute;top:10px;left:10px;width:400px;background:rgba(28,28,28,.8);padding:10px;color:#fff;font-size:12px;border-radius:2px}.dplayer-info-panel-hide{display:none}.dplayer-info-panel .dplayer-info-panel-close{cursor:pointer;position:absolute;right:10px;top:10px}.dplayer-info-panel .dplayer-info-panel-item>span{display:inline-block;vertical-align:middle;line-height:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-info-panel .dplayer-info-panel-item-title{width:100px;text-align:right;margin-right:10px}.dplayer-info-panel .dplayer-info-panel-item-data{width:260px}\", \"\"]);\n\n\n//# sourceURL=webpack:///./src/lib/DPlayer.min.css?./node_modules/css-loader/dist/cjs.js");

/***/ }),

/***/ "./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
  !*** ./node_modules/css-loader/dist/runtime/api.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/*\n  MIT License http://www.opensource.org/licenses/mit-license.php\n  Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n  var list = []; // return the list of modules as css string\n\n  list.toString = function toString() {\n    return this.map(function (item) {\n      var content = cssWithMappingToString(item, useSourceMap);\n\n      if (item[2]) {\n        return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n      }\n\n      return content;\n    }).join('');\n  }; // import a list of modules into the list\n  // eslint-disable-next-line func-names\n\n\n  list.i = function (modules, mediaQuery) {\n    if (typeof modules === 'string') {\n      // eslint-disable-next-line no-param-reassign\n      modules = [[null, modules, '']];\n    }\n\n    var alreadyImportedModules = {};\n\n    for (var i = 0; i < this.length; i++) {\n      // eslint-disable-next-line prefer-destructuring\n      var id = this[i][0];\n\n      if (id != null) {\n        alreadyImportedModules[id] = true;\n      }\n    }\n\n    for (var _i = 0; _i < modules.length; _i++) {\n      var item = modules[_i]; // skip already imported module\n      // this implementation is not 100% perfect for weird media query combinations\n      // when a module is imported multiple times with different media queries.\n      // I hope this will never occur (Hey this way we have smaller bundles)\n\n      if (item[0] == null || !alreadyImportedModules[item[0]]) {\n        if (mediaQuery && !item[2]) {\n          item[2] = mediaQuery;\n        } else if (mediaQuery) {\n          item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n        }\n\n        list.push(item);\n      }\n    }\n  };\n\n  return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n  var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n  var cssMapping = item[3];\n\n  if (!cssMapping) {\n    return content;\n  }\n\n  if (useSourceMap && typeof btoa === 'function') {\n    var sourceMapping = toComment(cssMapping);\n    var sourceURLs = cssMapping.sources.map(function (source) {\n      return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n    });\n    return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n  }\n\n  return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n  // eslint-disable-next-line no-undef\n  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n  var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n  return \"/*# \".concat(data, \" */\");\n}\n\n//# sourceURL=webpack:///./node_modules/css-loader/dist/runtime/api.js?");

/***/ }),

/***/ "./node_modules/css-loader/dist/runtime/getUrl.js":
/*!********************************************************!*\
  !*** ./node_modules/css-loader/dist/runtime/getUrl.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = function (url, needQuotes) {\n  if (typeof url !== 'string') {\n    return url;\n  } // If url is already wrapped in quotes, remove them\n\n\n  if (/^['\"].*['\"]$/.test(url)) {\n    // eslint-disable-next-line no-param-reassign\n    url = url.slice(1, -1);\n  } // Should url be wrapped?\n  // See https://drafts.csswg.org/css-values-3/#urls\n\n\n  if (/[\"'() \\t\\n]/.test(url) || needQuotes) {\n    return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, '\\\\n'), \"\\\"\");\n  }\n\n  return url;\n};\n\n//# sourceURL=webpack:///./node_modules/css-loader/dist/runtime/getUrl.js?");

/***/ }),

/***/ "./node_modules/hls.js/dist/hls.js":
/*!*****************************************!*\
  !*** ./node_modules/hls.js/dist/hls.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("typeof window !== \"undefined\" &&\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/hls.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/eventemitter3/index.js\":\n/*!*********************************************!*\\\n  !*** ./node_modules/eventemitter3/index.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('The listener must be a function');\n  }\n\n  var listener = new EE(fn, context || emitter, once)\n    , evt = prefix ? prefix + event : event;\n\n  if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n  else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n  else emitter._events[evt] = [emitter._events[evt], listener];\n\n  return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n  if (--emitter._eventsCount === 0) emitter._events = new Events();\n  else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n  var evt = prefix ? prefix + event : event\n    , handlers = this._events[evt];\n\n  if (!handlers) return [];\n  if (handlers.fn) return [handlers.fn];\n\n  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n    ee[i] = handlers[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n  var evt = prefix ? prefix + event : event\n    , listeners = this._events[evt];\n\n  if (!listeners) return 0;\n  if (listeners.fn) return 1;\n  return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    clearEvent(this, evt);\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n      listeners.fn === fn &&\n      (!once || listeners.once) &&\n      (!context || listeners.context === context)\n    ) {\n      clearEvent(this, evt);\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n        listeners[i].fn !== fn ||\n        (once && !listeners[i].once) ||\n        (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else clearEvent(this, evt);\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) clearEvent(this, evt);\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n  module.exports = EventEmitter;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/node-libs-browser/node_modules/events/events.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/node-libs-browser/node_modules/events/events.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports) {\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  // If there is no 'error' event listener then throw.\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      } else {\n        // At least give some kind of context to the user\n        var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n        err.context = er;\n        throw err;\n      }\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      // fast cases\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      // slower\n      default:\n        args = Array.prototype.slice.call(arguments, 1);\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    args = Array.prototype.slice.call(arguments, 1);\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  // To avoid recursion in the case that type === \"newListener\"! Before\n  // adding it to the listeners, first emit \"newListener\".\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    // Optimize the case of one listener. Don't need the extra array object.\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    // If we've already got an array, just append.\n    this._events[type].push(listener);\n  else\n    // Adding the second element, need to change to array.\n    this._events[type] = [this._events[type], listener];\n\n  // Check for listener leak\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        // not supported in IE 10\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  // not listening for removeListener, no need to emit\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  // emit removeListener for all listeners on all events\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else if (listeners) {\n    // LIFO order\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n  if (this._events) {\n    var evlistener = this._events[type];\n\n    if (isFunction(evlistener))\n      return 1;\n    else if (evlistener)\n      return evlistener.length;\n  }\n  return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/url-toolkit/src/url-toolkit.js\":\n/*!*****************************************************!*\\\n  !*** ./node_modules/url-toolkit/src/url-toolkit.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n// see https://tools.ietf.org/html/rfc1808\n\n/* jshint ignore:start */\n(function(root) { \n/* jshint ignore:end */\n\n  var URL_REGEX = /^((?:[a-zA-Z0-9+\\-.]+:)?)(\\/\\/[^\\/?#]*)?((?:[^\\/\\?#]*\\/)*.*?)??(;.*?)?(\\?.*?)?(#.*?)?$/;\n  var FIRST_SEGMENT_REGEX = /^([^\\/?#]*)(.*)$/;\n  var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n  var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/).*?(?=\\/)/g;\n\n  var URLToolkit = { // jshint ignore:line\n    // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n    // E.g\n    // With opts.alwaysNormalize = false (default, spec compliant)\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n    // With opts.alwaysNormalize = true (not spec compliant)\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n    buildAbsoluteURL: function(baseURL, relativeURL, opts) {\n      opts = opts || {};\n      // remove any remaining space and CRLF\n      baseURL = baseURL.trim();\n      relativeURL = relativeURL.trim();\n      if (!relativeURL) {\n        // 2a) If the embedded URL is entirely empty, it inherits the\n        // entire base URL (i.e., is set equal to the base URL)\n        // and we are done.\n        if (!opts.alwaysNormalize) {\n          return baseURL;\n        }\n        var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n        if (!basePartsForNormalise) {\n          throw new Error('Error trying to parse base URL.');\n        }\n        basePartsForNormalise.path = URLToolkit.normalizePath(basePartsForNormalise.path);\n        return URLToolkit.buildURLFromParts(basePartsForNormalise);\n      }\n      var relativeParts = URLToolkit.parseURL(relativeURL);\n      if (!relativeParts) {\n        throw new Error('Error trying to parse relative URL.');\n      }\n      if (relativeParts.scheme) {\n        // 2b) If the embedded URL starts with a scheme name, it is\n        // interpreted as an absolute URL and we are done.\n        if (!opts.alwaysNormalize) {\n          return relativeURL;\n        }\n        relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n        return URLToolkit.buildURLFromParts(relativeParts);\n      }\n      var baseParts = URLToolkit.parseURL(baseURL);\n      if (!baseParts) {\n        throw new Error('Error trying to parse base URL.');\n      }\n      if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n        // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n        // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n        var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n        baseParts.netLoc = pathParts[1];\n        baseParts.path = pathParts[2];\n      }\n      if (baseParts.netLoc && !baseParts.path) {\n        baseParts.path = '/';\n      }\n      var builtParts = {\n        // 2c) Otherwise, the embedded URL inherits the scheme of\n        // the base URL.\n        scheme: baseParts.scheme,\n        netLoc: relativeParts.netLoc,\n        path: null,\n        params: relativeParts.params,\n        query: relativeParts.query,\n        fragment: relativeParts.fragment\n      };\n      if (!relativeParts.netLoc) {\n        // 3) If the embedded URL's <net_loc> is non-empty, we skip to\n        // Step 7.  Otherwise, the embedded URL inherits the <net_loc>\n        // (if any) of the base URL.\n        builtParts.netLoc = baseParts.netLoc;\n        // 4) If the embedded URL path is preceded by a slash \"/\", the\n        // path is not relative and we skip to Step 7.\n        if (relativeParts.path[0] !== '/') {\n          if (!relativeParts.path) {\n            // 5) If the embedded URL path is empty (and not preceded by a\n            // slash), then the embedded URL inherits the base URL path\n            builtParts.path = baseParts.path;\n            // 5a) if the embedded URL's <params> is non-empty, we skip to\n            // step 7; otherwise, it inherits the <params> of the base\n            // URL (if any) and\n            if (!relativeParts.params) {\n              builtParts.params = baseParts.params;\n              // 5b) if the embedded URL's <query> is non-empty, we skip to\n              // step 7; otherwise, it inherits the <query> of the base\n              // URL (if any) and we skip to step 7.\n              if (!relativeParts.query) {\n                builtParts.query = baseParts.query;\n              }\n            }\n          } else {\n            // 6) The last segment of the base URL's path (anything\n            // following the rightmost slash \"/\", or the entire path if no\n            // slash is present) is removed and the embedded URL's path is\n            // appended in its place.\n            var baseURLPath = baseParts.path;\n            var newPath = baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) + relativeParts.path;\n            builtParts.path = URLToolkit.normalizePath(newPath);\n          }\n        }\n      }\n      if (builtParts.path === null) {\n        builtParts.path = opts.alwaysNormalize ? URLToolkit.normalizePath(relativeParts.path) : relativeParts.path;\n      }\n      return URLToolkit.buildURLFromParts(builtParts);\n    },\n    parseURL: function(url) {\n      var parts = URL_REGEX.exec(url);\n      if (!parts) {\n        return null;\n      }\n      return {\n        scheme: parts[1] || '',\n        netLoc: parts[2] || '',\n        path: parts[3] || '',\n        params: parts[4] || '',\n        query: parts[5] || '',\n        fragment: parts[6] || ''\n      };\n    },\n    normalizePath: function(path) {\n      // The following operations are\n      // then applied, in order, to the new path:\n      // 6a) All occurrences of \"./\", where \".\" is a complete path\n      // segment, are removed.\n      // 6b) If the path ends with \".\" as a complete path segment,\n      // that \".\" is removed.\n      path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\n      // 6c) All occurrences of \"<segment>/../\", where <segment> is a\n      // complete path segment not equal to \"..\", are removed.\n      // Removal of these path segments is performed iteratively,\n      // removing the leftmost matching pattern on each iteration,\n      // until no matching pattern remains.\n      // 6d) If the path ends with \"<segment>/..\", where <segment> is a\n      // complete path segment not equal to \"..\", that\n      // \"<segment>/..\" is removed.\n      while (path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length) {} // jshint ignore:line\n      return path.split('').reverse().join('');\n    },\n    buildURLFromParts: function(parts) {\n      return parts.scheme + parts.netLoc + parts.path + parts.params + parts.query + parts.fragment;\n    }\n  };\n\n/* jshint ignore:start */\n  if(true)\n    module.exports = URLToolkit;\n  else {}\n})(this);\n/* jshint ignore:end */\n\n\n/***/ }),\n\n/***/ \"./node_modules/webworkify-webpack/index.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/webworkify-webpack/index.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction webpackBootstrapFunc (modules) {\n/******/  // The module cache\n/******/  var installedModules = {};\n\n/******/  // The require function\n/******/  function __webpack_require__(moduleId) {\n\n/******/    // Check if module is in cache\n/******/    if(installedModules[moduleId])\n/******/      return installedModules[moduleId].exports;\n\n/******/    // Create a new module (and put it into the cache)\n/******/    var module = installedModules[moduleId] = {\n/******/      i: moduleId,\n/******/      l: false,\n/******/      exports: {}\n/******/    };\n\n/******/    // Execute the module function\n/******/    modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/    // Flag the module as loaded\n/******/    module.l = true;\n\n/******/    // Return the exports of the module\n/******/    return module.exports;\n/******/  }\n\n/******/  // expose the modules object (__webpack_modules__)\n/******/  __webpack_require__.m = modules;\n\n/******/  // expose the module cache\n/******/  __webpack_require__.c = installedModules;\n\n/******/  // identity function for calling harmony imports with the correct context\n/******/  __webpack_require__.i = function(value) { return value; };\n\n/******/  // define getter function for harmony exports\n/******/  __webpack_require__.d = function(exports, name, getter) {\n/******/    if(!__webpack_require__.o(exports, name)) {\n/******/      Object.defineProperty(exports, name, {\n/******/        configurable: false,\n/******/        enumerable: true,\n/******/        get: getter\n/******/      });\n/******/    }\n/******/  };\n\n/******/  // define __esModule on exports\n/******/  __webpack_require__.r = function(exports) {\n/******/    Object.defineProperty(exports, '__esModule', { value: true });\n/******/  };\n\n/******/  // getDefaultExport function for compatibility with non-harmony modules\n/******/  __webpack_require__.n = function(module) {\n/******/    var getter = module && module.__esModule ?\n/******/      function getDefault() { return module['default']; } :\n/******/      function getModuleExports() { return module; };\n/******/    __webpack_require__.d(getter, 'a', getter);\n/******/    return getter;\n/******/  };\n\n/******/  // Object.prototype.hasOwnProperty.call\n/******/  __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n/******/  // __webpack_public_path__\n/******/  __webpack_require__.p = \"/\";\n\n/******/  // on error function for async loading\n/******/  __webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n  var f = __webpack_require__(__webpack_require__.s = ENTRY_MODULE)\n  return f.default || f // try to call default if defined to also support babel esmodule exports\n}\n\nvar moduleNameReqExp = '[\\\\.|\\\\-|\\\\+|\\\\w|\\/|@]+'\nvar dependencyRegExp = '\\\\((\\/\\\\*.*?\\\\*\\/)?\\s?.*?(' + moduleNameReqExp + ').*?\\\\)' // additional chars when output.pathinfo is true\n\n// http://stackoverflow.com/a/2593661/130442\nfunction quoteRegExp (str) {\n  return (str + '').replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&')\n}\n\nfunction isNumeric(n) {\n  return !isNaN(1 * n); // 1 * n converts integers, integers as string (\"123\"), 1e3 and \"1e3\" to integers and strings to NaN\n}\n\nfunction getModuleDependencies (sources, module, queueName) {\n  var retval = {}\n  retval[queueName] = []\n\n  var fnString = module.toString()\n  var wrapperSignature = fnString.match(/^function\\s?\\(\\w+,\\s*\\w+,\\s*(\\w+)\\)/)\n  if (!wrapperSignature) return retval\n  var webpackRequireName = wrapperSignature[1]\n\n  // main bundle deps\n  var re = new RegExp('(\\\\\\\\n|\\\\W)' + quoteRegExp(webpackRequireName) + dependencyRegExp, 'g')\n  var match\n  while ((match = re.exec(fnString))) {\n    if (match[3] === 'dll-reference') continue\n    retval[queueName].push(match[3])\n  }\n\n  // dll deps\n  re = new RegExp('\\\\(' + quoteRegExp(webpackRequireName) + '\\\\(\"(dll-reference\\\\s(' + moduleNameReqExp + '))\"\\\\)\\\\)' + dependencyRegExp, 'g')\n  while ((match = re.exec(fnString))) {\n    if (!sources[match[2]]) {\n      retval[queueName].push(match[1])\n      sources[match[2]] = __webpack_require__(match[1]).m\n    }\n    retval[match[2]] = retval[match[2]] || []\n    retval[match[2]].push(match[4])\n  }\n\n  // convert 1e3 back to 1000 - this can be important after uglify-js converted 1000 to 1e3\n  var keys = Object.keys(retval);\n  for (var i = 0; i < keys.length; i++) {\n    for (var j = 0; j < retval[keys[i]].length; j++) {\n      if (isNumeric(retval[keys[i]][j])) {\n        retval[keys[i]][j] = 1 * retval[keys[i]][j];\n      }\n    }\n  }\n\n  return retval\n}\n\nfunction hasValuesInQueues (queues) {\n  var keys = Object.keys(queues)\n  return keys.reduce(function (hasValues, key) {\n    return hasValues || queues[key].length > 0\n  }, false)\n}\n\nfunction getRequiredModules (sources, moduleId) {\n  var modulesQueue = {\n    main: [moduleId]\n  }\n  var requiredModules = {\n    main: []\n  }\n  var seenModules = {\n    main: {}\n  }\n\n  while (hasValuesInQueues(modulesQueue)) {\n    var queues = Object.keys(modulesQueue)\n    for (var i = 0; i < queues.length; i++) {\n      var queueName = queues[i]\n      var queue = modulesQueue[queueName]\n      var moduleToCheck = queue.pop()\n      seenModules[queueName] = seenModules[queueName] || {}\n      if (seenModules[queueName][moduleToCheck] || !sources[queueName][moduleToCheck]) continue\n      seenModules[queueName][moduleToCheck] = true\n      requiredModules[queueName] = requiredModules[queueName] || []\n      requiredModules[queueName].push(moduleToCheck)\n      var newModules = getModuleDependencies(sources, sources[queueName][moduleToCheck], queueName)\n      var newModulesKeys = Object.keys(newModules)\n      for (var j = 0; j < newModulesKeys.length; j++) {\n        modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]] || []\n        modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]].concat(newModules[newModulesKeys[j]])\n      }\n    }\n  }\n\n  return requiredModules\n}\n\nmodule.exports = function (moduleId, options) {\n  options = options || {}\n  var sources = {\n    main: __webpack_require__.m\n  }\n\n  var requiredModules = options.all ? { main: Object.keys(sources.main) } : getRequiredModules(sources, moduleId)\n\n  var src = ''\n\n  Object.keys(requiredModules).filter(function (m) { return m !== 'main' }).forEach(function (module) {\n    var entryModule = 0\n    while (requiredModules[module][entryModule]) {\n      entryModule++\n    }\n    requiredModules[module].push(entryModule)\n    sources[module][entryModule] = '(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })'\n    src = src + 'var ' + module + ' = (' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(entryModule)) + ')({' + requiredModules[module].map(function (id) { return '' + JSON.stringify(id) + ': ' + sources[module][id].toString() }).join(',') + '});\\n'\n  })\n\n  src = src + 'new ((' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(moduleId)) + ')({' + requiredModules.main.map(function (id) { return '' + JSON.stringify(id) + ': ' + sources.main[id].toString() }).join(',') + '}))(self);'\n\n  var blob = new window.Blob([src], { type: 'text/javascript' })\n  if (options.bare) { return blob }\n\n  var URL = window.URL || window.webkitURL || window.mozURL || window.msURL\n\n  var workerUrl = URL.createObjectURL(blob)\n  var worker = new window.Worker(workerUrl)\n  worker.objectURL = workerUrl\n\n  return worker\n}\n\n\n/***/ }),\n\n/***/ \"./src/config.js\":\n/*!***********************!*\\\n  !*** ./src/config.js ***!\n  \\***********************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * HLS config\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar abr_controller_1 = __webpack_require__(/*! ./controller/abr-controller */ \"./src/controller/abr-controller.js\");\nvar buffer_controller_1 = __webpack_require__(/*! ./controller/buffer-controller */ \"./src/controller/buffer-controller.js\");\nvar cap_level_controller_1 = __webpack_require__(/*! ./controller/cap-level-controller */ \"./src/controller/cap-level-controller.js\");\nvar fps_controller_1 = __webpack_require__(/*! ./controller/fps-controller */ \"./src/controller/fps-controller.js\");\nvar xhr_loader_1 = __webpack_require__(/*! ./utils/xhr-loader */ \"./src/utils/xhr-loader.js\");\n// import FetchLoader from './utils/fetch-loader';\nvar audio_track_controller_1 = __webpack_require__(/*! ./controller/audio-track-controller */ \"./src/controller/audio-track-controller.js\");\nvar audio_stream_controller_1 = __webpack_require__(/*! ./controller/audio-stream-controller */ \"./src/controller/audio-stream-controller.js\");\nvar Cues = __webpack_require__(/*! ./utils/cues */ \"./src/utils/cues.js\");\nvar timeline_controller_1 = __webpack_require__(/*! ./controller/timeline-controller */ \"./src/controller/timeline-controller.js\");\nvar subtitle_track_controller_1 = __webpack_require__(/*! ./controller/subtitle-track-controller */ \"./src/controller/subtitle-track-controller.js\");\nvar subtitle_stream_controller_1 = __webpack_require__(/*! ./controller/subtitle-stream-controller */ \"./src/controller/subtitle-stream-controller.js\");\nvar eme_controller_1 = __webpack_require__(/*! ./controller/eme-controller */ \"./src/controller/eme-controller.js\");\nvar mediakeys_helper_1 = __webpack_require__(/*! ./utils/mediakeys-helper */ \"./src/utils/mediakeys-helper.js\");\nexports.hlsDefaultConfig = {\n    autoStartLoad: true,\n    startPosition: -1,\n    defaultAudioCodec: undefined,\n    debug: false,\n    capLevelOnFPSDrop: false,\n    capLevelToPlayerSize: false,\n    initialLiveManifestSize: 1,\n    maxBufferLength: 30,\n    maxBufferSize: 60 * 1000 * 1000,\n    maxBufferHole: 0.5,\n    lowBufferWatchdogPeriod: 0.5,\n    highBufferWatchdogPeriod: 3,\n    nudgeOffset: 0.1,\n    nudgeMaxRetry: 3,\n    maxFragLookUpTolerance: 0.25,\n    liveSyncDurationCount: 3,\n    liveMaxLatencyDurationCount: Infinity,\n    liveSyncDuration: undefined,\n    liveMaxLatencyDuration: undefined,\n    liveDurationInfinity: false,\n    liveBackBufferLength: Infinity,\n    maxMaxBufferLength: 600,\n    enableWorker: true,\n    enableSoftwareAES: true,\n    manifestLoadingTimeOut: 10000,\n    manifestLoadingMaxRetry: 1,\n    manifestLoadingRetryDelay: 1000,\n    manifestLoadingMaxRetryTimeout: 64000,\n    startLevel: undefined,\n    levelLoadingTimeOut: 10000,\n    levelLoadingMaxRetry: 4,\n    levelLoadingRetryDelay: 1000,\n    levelLoadingMaxRetryTimeout: 64000,\n    fragLoadingTimeOut: 20000,\n    fragLoadingMaxRetry: 6,\n    fragLoadingRetryDelay: 1000,\n    fragLoadingMaxRetryTimeout: 64000,\n    startFragPrefetch: false,\n    fpsDroppedMonitoringPeriod: 5000,\n    fpsDroppedMonitoringThreshold: 0.2,\n    appendErrorMaxRetry: 3,\n    loader: xhr_loader_1.default,\n    // loader: FetchLoader,\n    fLoader: undefined,\n    pLoader: undefined,\n    xhrSetup: undefined,\n    licenseXhrSetup: undefined,\n    // fetchSetup: undefined,\n    abrController: abr_controller_1.default,\n    bufferController: buffer_controller_1.default,\n    capLevelController: cap_level_controller_1.default,\n    fpsController: fps_controller_1.default,\n    stretchShortVideoTrack: false,\n    maxAudioFramesDrift: 1,\n    forceKeyFrameOnDiscontinuity: true,\n    abrEwmaFastLive: 3,\n    abrEwmaSlowLive: 9,\n    abrEwmaFastVoD: 3,\n    abrEwmaSlowVoD: 9,\n    abrEwmaDefaultEstimate: 5e5,\n    abrBandWidthFactor: 0.95,\n    abrBandWidthUpFactor: 0.7,\n    abrMaxWithRealBitrate: false,\n    maxStarvationDelay: 4,\n    maxLoadingDelay: 4,\n    minAutoBitrate: 0,\n    emeEnabled: false,\n    widevineLicenseUrl: undefined,\n    requestMediaKeySystemAccessFunc: mediakeys_helper_1.requestMediaKeySystemAccess // used by eme-controller\n};\nif (true) {\n    exports.hlsDefaultConfig.subtitleStreamController = subtitle_stream_controller_1.SubtitleStreamController;\n    exports.hlsDefaultConfig.subtitleTrackController = subtitle_track_controller_1.default;\n    exports.hlsDefaultConfig.timelineController = timeline_controller_1.default;\n    exports.hlsDefaultConfig.cueHandler = Cues; // used by timeline-controller\n    exports.hlsDefaultConfig.enableCEA708Captions = true; // used by timeline-controller\n    exports.hlsDefaultConfig.enableWebVTT = true; // used by timeline-controller\n    exports.hlsDefaultConfig.captionsTextTrack1Label = 'English'; // used by timeline-controller\n    exports.hlsDefaultConfig.captionsTextTrack1LanguageCode = 'en'; // used by timeline-controller\n    exports.hlsDefaultConfig.captionsTextTrack2Label = 'Spanish'; // used by timeline-controller\n    exports.hlsDefaultConfig.captionsTextTrack2LanguageCode = 'es'; // used by timeline-controller\n}\nif (true) {\n    exports.hlsDefaultConfig.audioStreamController = audio_stream_controller_1.default;\n    exports.hlsDefaultConfig.audioTrackController = audio_track_controller_1.default;\n}\nif (true) {\n    exports.hlsDefaultConfig.emeController = eme_controller_1.default;\n}\n\n\n/***/ }),\n\n/***/ \"./src/controller/abr-controller.js\":\n/*!******************************************!*\\\n  !*** ./src/controller/abr-controller.js ***!\n  \\******************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * simple ABR Controller\n *  - compute next level based on last fragment bw heuristics\n *  - implement an abandon rules triggered if we have less than 2 frag buffered and if computed bw shows that we risk buffer stalling\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar buffer_helper_1 = __webpack_require__(/*! ../utils/buffer-helper */ \"./src/utils/buffer-helper.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar ewma_bandwidth_estimator_1 = __webpack_require__(/*! ../utils/ewma-bandwidth-estimator */ \"./src/utils/ewma-bandwidth-estimator.js\");\nvar performance = window.performance;\nvar AbrController = /** @class */ (function (_super) {\n    __extends(AbrController, _super);\n    function AbrController(hls) {\n        var _this = _super.call(this, hls, events_1.default.FRAG_LOADING, events_1.default.FRAG_LOADED, events_1.default.FRAG_BUFFERED, events_1.default.ERROR) || this;\n        _this.lastLoadedFragLevel = 0;\n        _this._nextAutoLevel = -1;\n        _this.hls = hls;\n        _this.timer = null;\n        _this._bwEstimator = null;\n        _this.onCheck = _this._abandonRulesCheck.bind(_this);\n        return _this;\n    }\n    AbrController.prototype.destroy = function () {\n        this.clearTimer();\n        event_handler_1.default.prototype.destroy.call(this);\n    };\n    AbrController.prototype.onFragLoading = function (data) {\n        var frag = data.frag;\n        if (frag.type === 'main') {\n            if (!this.timer) {\n                this.fragCurrent = frag;\n                this.timer = setInterval(this.onCheck, 100);\n            }\n            // lazy init of BwEstimator, rationale is that we use different params for Live/VoD\n            // so we need to wait for stream manifest / playlist type to instantiate it.\n            if (!this._bwEstimator) {\n                var hls_1 = this.hls;\n                var config = hls_1.config;\n                var level = frag.level;\n                var isLive = hls_1.levels[level].details.live;\n                var ewmaFast = void 0, ewmaSlow = void 0;\n                if (isLive) {\n                    ewmaFast = config.abrEwmaFastLive;\n                    ewmaSlow = config.abrEwmaSlowLive;\n                }\n                else {\n                    ewmaFast = config.abrEwmaFastVoD;\n                    ewmaSlow = config.abrEwmaSlowVoD;\n                }\n                this._bwEstimator = new ewma_bandwidth_estimator_1.default(hls_1, ewmaSlow, ewmaFast, config.abrEwmaDefaultEstimate);\n            }\n        }\n    };\n    AbrController.prototype._abandonRulesCheck = function () {\n        /*\n          monitor fragment retrieval time...\n          we compute expected time of arrival of the complete fragment.\n          we compare it to expected time of buffer starvation\n        */\n        var hls = this.hls;\n        var video = hls.media;\n        var frag = this.fragCurrent;\n        if (!frag) {\n            return;\n        }\n        var loader = frag.loader;\n        var minAutoLevel = hls.minAutoLevel;\n        // if loader has been destroyed or loading has been aborted, stop timer and return\n        if (!loader || (loader.stats && loader.stats.aborted)) {\n            logger_1.logger.warn('frag loader destroy or aborted, disarm abandonRules');\n            this.clearTimer();\n            // reset forced auto level value so that next level will be selected\n            this._nextAutoLevel = -1;\n            return;\n        }\n        var stats = loader.stats;\n        /* only monitor frag retrieval time if\n        (video not paused OR first fragment being loaded(ready state === HAVE_NOTHING = 0)) AND autoswitching enabled AND not lowest level (=> means that we have several levels) */\n        if (video && stats && ((!video.paused && (video.playbackRate !== 0)) || !video.readyState) && frag.autoLevel && frag.level) {\n            var requestDelay = performance.now() - stats.trequest, playbackRate = Math.abs(video.playbackRate);\n            // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate\n            if (requestDelay > (500 * frag.duration / playbackRate)) {\n                var levels = hls.levels, loadRate = Math.max(1, stats.bw ? stats.bw / 8 : stats.loaded * 1000 / requestDelay), // byte/s; at least 1 byte/s to avoid division by zero\n                // compute expected fragment length using frag duration and level bitrate. also ensure that expected len is gte than already loaded size\n                level = levels[frag.level], levelBitrate = level.realBitrate ? Math.max(level.realBitrate, level.bitrate) : level.bitrate, expectedLen = stats.total ? stats.total : Math.max(stats.loaded, Math.round(frag.duration * levelBitrate / 8)), pos = video.currentTime, fragLoadedDelay = (expectedLen - stats.loaded) / loadRate, bufferStarvationDelay = (buffer_helper_1.BufferHelper.bufferInfo(video, pos, hls.config.maxBufferHole).end - pos) / playbackRate;\n                // consider emergency switch down only if we have less than 2 frag buffered AND\n                // time to finish loading current fragment is bigger than buffer starvation delay\n                // ie if we risk buffer starvation if bw does not increase quickly\n                if ((bufferStarvationDelay < (2 * frag.duration / playbackRate)) && (fragLoadedDelay > bufferStarvationDelay)) {\n                    var fragLevelNextLoadedDelay = void 0, nextLoadLevel = void 0;\n                    // lets iterate through lower level and try to find the biggest one that could avoid rebuffering\n                    // we start from current level - 1 and we step down , until we find a matching level\n                    for (nextLoadLevel = frag.level - 1; nextLoadLevel > minAutoLevel; nextLoadLevel--) {\n                        // compute time to load next fragment at lower level\n                        // 0.8 : consider only 80% of current bw to be conservative\n                        // 8 = bits per byte (bps/Bps)\n                        var levelNextBitrate = levels[nextLoadLevel].realBitrate ? Math.max(levels[nextLoadLevel].realBitrate, levels[nextLoadLevel].bitrate) : levels[nextLoadLevel].bitrate;\n                        fragLevelNextLoadedDelay = frag.duration * levelNextBitrate / (8 * 0.8 * loadRate);\n                        if (fragLevelNextLoadedDelay < bufferStarvationDelay) {\n                            // we found a lower level that be rebuffering free with current estimated bw !\n                            break;\n                        }\n                    }\n                    // only emergency switch down if it takes less time to load new fragment at lowest level instead\n                    // of finishing loading current one ...\n                    if (fragLevelNextLoadedDelay < fragLoadedDelay) {\n                        logger_1.logger.warn(\"loading too slow, abort fragment loading and switch to level \" + nextLoadLevel + \":fragLoadedDelay[\" + nextLoadLevel + \"]<fragLoadedDelay[\" + (frag.level - 1) + \"];bufferStarvationDelay:\" + fragLevelNextLoadedDelay.toFixed(1) + \"<\" + fragLoadedDelay.toFixed(1) + \":\" + bufferStarvationDelay.toFixed(1));\n                        // force next load level in auto mode\n                        hls.nextLoadLevel = nextLoadLevel;\n                        // update bw estimate for this fragment before cancelling load (this will help reducing the bw)\n                        this._bwEstimator.sample(requestDelay, stats.loaded);\n                        // abort fragment loading\n                        loader.abort();\n                        // stop abandon rules timer\n                        this.clearTimer();\n                        hls.trigger(events_1.default.FRAG_LOAD_EMERGENCY_ABORTED, { frag: frag, stats: stats });\n                    }\n                }\n            }\n        }\n    };\n    AbrController.prototype.onFragLoaded = function (data) {\n        var frag = data.frag;\n        if (frag.type === 'main' && Number.isFinite(frag.sn)) {\n            // stop monitoring bw once frag loaded\n            this.clearTimer();\n            // store level id after successful fragment load\n            this.lastLoadedFragLevel = frag.level;\n            // reset forced auto level value so that next level will be selected\n            this._nextAutoLevel = -1;\n            // compute level average bitrate\n            if (this.hls.config.abrMaxWithRealBitrate) {\n                var level = this.hls.levels[frag.level];\n                var loadedBytes = (level.loaded ? level.loaded.bytes : 0) + data.stats.loaded;\n                var loadedDuration = (level.loaded ? level.loaded.duration : 0) + data.frag.duration;\n                level.loaded = { bytes: loadedBytes, duration: loadedDuration };\n                level.realBitrate = Math.round(8 * loadedBytes / loadedDuration);\n            }\n            // if fragment has been loaded to perform a bitrate test,\n            if (data.frag.bitrateTest) {\n                var stats = data.stats;\n                stats.tparsed = stats.tbuffered = stats.tload;\n                this.onFragBuffered(data);\n            }\n        }\n    };\n    AbrController.prototype.onFragBuffered = function (data) {\n        var stats = data.stats;\n        var frag = data.frag;\n        // only update stats on first frag buffering\n        // if same frag is loaded multiple times, it might be in browser cache, and loaded quickly\n        // and leading to wrong bw estimation\n        // on bitrate test, also only update stats once (if tload = tbuffered == on FRAG_LOADED)\n        if (stats.aborted !== true && frag.type === 'main' && Number.isFinite(frag.sn) && ((!frag.bitrateTest || stats.tload === stats.tbuffered))) {\n            // use tparsed-trequest instead of tbuffered-trequest to compute fragLoadingProcessing; rationale is that  buffer appending only happens once media is attached\n            // in case we use config.startFragPrefetch while media is not attached yet, fragment might be parsed while media not attached yet, but it will only be buffered on media attached\n            // as a consequence it could happen really late in the process. meaning that appending duration might appears huge ... leading to underestimated throughput estimation\n            var fragLoadingProcessingMs = stats.tparsed - stats.trequest;\n            logger_1.logger.log(\"latency/loading/parsing/append/kbps:\" + Math.round(stats.tfirst - stats.trequest) + \"/\" + Math.round(stats.tload - stats.tfirst) + \"/\" + Math.round(stats.tparsed - stats.tload) + \"/\" + Math.round(stats.tbuffered - stats.tparsed) + \"/\" + Math.round(8 * stats.loaded / (stats.tbuffered - stats.trequest)));\n            this._bwEstimator.sample(fragLoadingProcessingMs, stats.loaded);\n            stats.bwEstimate = this._bwEstimator.getEstimate();\n            // if fragment has been loaded to perform a bitrate test, (hls.startLevel = -1), store bitrate test delay duration\n            if (frag.bitrateTest) {\n                this.bitrateTestDelay = fragLoadingProcessingMs / 1000;\n            }\n            else {\n                this.bitrateTestDelay = 0;\n            }\n        }\n    };\n    AbrController.prototype.onError = function (data) {\n        // stop timer in case of frag loading error\n        switch (data.details) {\n            case errors_1.ErrorDetails.FRAG_LOAD_ERROR:\n            case errors_1.ErrorDetails.FRAG_LOAD_TIMEOUT:\n                this.clearTimer();\n                break;\n            default:\n                break;\n        }\n    };\n    AbrController.prototype.clearTimer = function () {\n        clearInterval(this.timer);\n        this.timer = null;\n    };\n    Object.defineProperty(AbrController.prototype, \"nextAutoLevel\", {\n        // return next auto level\n        get: function () {\n            var forcedAutoLevel = this._nextAutoLevel;\n            var bwEstimator = this._bwEstimator;\n            // in case next auto level has been forced, and bw not available or not reliable, return forced value\n            if (forcedAutoLevel !== -1 && (!bwEstimator || !bwEstimator.canEstimate())) {\n                return forcedAutoLevel;\n            }\n            // compute next level using ABR logic\n            var nextABRAutoLevel = this._nextABRAutoLevel;\n            // if forced auto level has been defined, use it to cap ABR computed quality level\n            if (forcedAutoLevel !== -1) {\n                nextABRAutoLevel = Math.min(forcedAutoLevel, nextABRAutoLevel);\n            }\n            return nextABRAutoLevel;\n        },\n        set: function (nextLevel) {\n            this._nextAutoLevel = nextLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(AbrController.prototype, \"_nextABRAutoLevel\", {\n        get: function () {\n            var hls = this.hls, maxAutoLevel = hls.maxAutoLevel, levels = hls.levels, config = hls.config, minAutoLevel = hls.minAutoLevel;\n            var video = hls.media, currentLevel = this.lastLoadedFragLevel, currentFragDuration = this.fragCurrent ? this.fragCurrent.duration : 0, pos = (video ? video.currentTime : 0), \n            // playbackRate is the absolute value of the playback rate; if video.playbackRate is 0, we use 1 to load as\n            // if we're playing back at the normal rate.\n            playbackRate = ((video && (video.playbackRate !== 0)) ? Math.abs(video.playbackRate) : 1.0), avgbw = this._bwEstimator ? this._bwEstimator.getEstimate() : config.abrEwmaDefaultEstimate, \n            // bufferStarvationDelay is the wall-clock time left until the playback buffer is exhausted.\n            bufferStarvationDelay = (buffer_helper_1.BufferHelper.bufferInfo(video, pos, config.maxBufferHole).end - pos) / playbackRate;\n            // First, look to see if we can find a level matching with our avg bandwidth AND that could also guarantee no rebuffering at all\n            var bestLevel = this._findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, config.abrBandWidthFactor, config.abrBandWidthUpFactor, levels);\n            if (bestLevel >= 0) {\n                return bestLevel;\n            }\n            else {\n                logger_1.logger.trace('rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering');\n                // not possible to get rid of rebuffering ... let's try to find level that will guarantee less than maxStarvationDelay of rebuffering\n                // if no matching level found, logic will return 0\n                var maxStarvationDelay = currentFragDuration ? Math.min(currentFragDuration, config.maxStarvationDelay) : config.maxStarvationDelay, bwFactor = config.abrBandWidthFactor, bwUpFactor = config.abrBandWidthUpFactor;\n                if (bufferStarvationDelay === 0) {\n                    // in case buffer is empty, let's check if previous fragment was loaded to perform a bitrate test\n                    var bitrateTestDelay = this.bitrateTestDelay;\n                    if (bitrateTestDelay) {\n                        // if it is the case, then we need to adjust our max starvation delay using maxLoadingDelay config value\n                        // max video loading delay used in  automatic start level selection :\n                        // in that mode ABR controller will ensure that video loading time (ie the time to fetch the first fragment at lowest quality level +\n                        // the time to fetch the fragment at the appropriate quality level is less than ```maxLoadingDelay``` )\n                        // cap maxLoadingDelay and ensure it is not bigger 'than bitrate test' frag duration\n                        var maxLoadingDelay = currentFragDuration ? Math.min(currentFragDuration, config.maxLoadingDelay) : config.maxLoadingDelay;\n                        maxStarvationDelay = maxLoadingDelay - bitrateTestDelay;\n                        logger_1.logger.trace(\"bitrate test took \" + Math.round(1000 * bitrateTestDelay) + \"ms, set first fragment max fetchDuration to \" + Math.round(1000 * maxStarvationDelay) + \" ms\");\n                        // don't use conservative factor on bitrate test\n                        bwFactor = bwUpFactor = 1;\n                    }\n                }\n                bestLevel = this._findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay + maxStarvationDelay, bwFactor, bwUpFactor, levels);\n                return Math.max(bestLevel, 0);\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    AbrController.prototype._findBestLevel = function (currentLevel, currentFragDuration, currentBw, minAutoLevel, maxAutoLevel, maxFetchDuration, bwFactor, bwUpFactor, levels) {\n        for (var i = maxAutoLevel; i >= minAutoLevel; i--) {\n            var levelInfo = levels[i];\n            if (!levelInfo) {\n                continue;\n            }\n            var levelDetails = levelInfo.details, avgDuration = levelDetails ? levelDetails.totalduration / levelDetails.fragments.length : currentFragDuration, live = levelDetails ? levelDetails.live : false, adjustedbw = void 0;\n            // follow algorithm captured from stagefright :\n            // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp\n            // Pick the highest bandwidth stream below or equal to estimated bandwidth.\n            // consider only 80% of the available bandwidth, but if we are switching up,\n            // be even more conservative (70%) to avoid overestimating and immediately\n            // switching back.\n            if (i <= currentLevel) {\n                adjustedbw = bwFactor * currentBw;\n            }\n            else {\n                adjustedbw = bwUpFactor * currentBw;\n            }\n            var bitrate = levels[i].realBitrate ? Math.max(levels[i].realBitrate, levels[i].bitrate) : levels[i].bitrate, fetchDuration = bitrate * avgDuration / adjustedbw;\n            logger_1.logger.trace(\"level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: \" + i + \"/\" + Math.round(adjustedbw) + \"/\" + bitrate + \"/\" + avgDuration + \"/\" + maxFetchDuration + \"/\" + fetchDuration);\n            // if adjusted bw is greater than level bitrate AND\n            if (adjustedbw > bitrate &&\n                // fragment fetchDuration unknown OR live stream OR fragment fetchDuration less than max allowed fetch duration, then this level matches\n                // we don't account for max Fetch Duration for live streams, this is to avoid switching down when near the edge of live sliding window ...\n                // special case to support startLevel = -1 (bitrateTest) on live streams : in that case we should not exit loop so that _findBestLevel will return -1\n                (!fetchDuration || (live && !this.bitrateTestDelay) || fetchDuration < maxFetchDuration)) {\n                // as we are looping from highest to lowest, this will return the best achievable quality level\n                return i;\n            }\n        }\n        // not enough time budget even with quality level 0 ... rebuffering might happen\n        return -1;\n    };\n    return AbrController;\n}(event_handler_1.default));\nexports.default = AbrController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/audio-stream-controller.js\":\n/*!***************************************************!*\\\n  !*** ./src/controller/audio-stream-controller.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * Audio Stream Controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_search_1 = __webpack_require__(/*! ../utils/binary-search */ \"./src/utils/binary-search.js\");\nvar buffer_helper_1 = __webpack_require__(/*! ../utils/buffer-helper */ \"./src/utils/buffer-helper.js\");\nvar demuxer_1 = __webpack_require__(/*! ../demux/demuxer */ \"./src/demux/demuxer.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar LevelHelper = __webpack_require__(/*! ./level-helper */ \"./src/controller/level-helper.js\");\nvar time_ranges_1 = __webpack_require__(/*! ../utils/time-ranges */ \"./src/utils/time-ranges.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar discontinuities_1 = __webpack_require__(/*! ../utils/discontinuities */ \"./src/utils/discontinuities.js\");\nvar fragment_tracker_1 = __webpack_require__(/*! ./fragment-tracker */ \"./src/controller/fragment-tracker.js\");\nvar fragment_1 = __webpack_require__(/*! ../loader/fragment */ \"./src/loader/fragment.js\");\nvar base_stream_controller_1 = __webpack_require__(/*! ./base-stream-controller */ \"./src/controller/base-stream-controller.js\");\nvar performance = window.performance;\nvar TICK_INTERVAL = 100; // how often to tick in ms\nvar AudioStreamController = /** @class */ (function (_super) {\n    __extends(AudioStreamController, _super);\n    function AudioStreamController(hls, fragmentTracker) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHED, events_1.default.MEDIA_DETACHING, events_1.default.AUDIO_TRACKS_UPDATED, events_1.default.AUDIO_TRACK_SWITCHING, events_1.default.AUDIO_TRACK_LOADED, events_1.default.KEY_LOADED, events_1.default.FRAG_LOADED, events_1.default.FRAG_PARSING_INIT_SEGMENT, events_1.default.FRAG_PARSING_DATA, events_1.default.FRAG_PARSED, events_1.default.ERROR, events_1.default.BUFFER_RESET, events_1.default.BUFFER_CREATED, events_1.default.BUFFER_APPENDED, events_1.default.BUFFER_FLUSHED, events_1.default.INIT_PTS_FOUND) || this;\n        _this.fragmentTracker = fragmentTracker;\n        _this.config = hls.config;\n        _this.audioCodecSwap = false;\n        _this._state = base_stream_controller_1.State.STOPPED;\n        _this.initPTS = [];\n        _this.waitingFragment = null;\n        _this.videoTrackCC = null;\n        return _this;\n    }\n    AudioStreamController.prototype.onHandlerDestroying = function () {\n        this.stopLoad();\n        _super.prototype.onHandlerDestroying.call(this);\n    };\n    AudioStreamController.prototype.onHandlerDestroyed = function () {\n        this.state = base_stream_controller_1.State.STOPPED;\n        this.fragmentTracker = null;\n        _super.prototype.onHandlerDestroyed.call(this);\n    };\n    // Signal that video PTS was found\n    AudioStreamController.prototype.onInitPtsFound = function (data) {\n        var demuxerId = data.id, cc = data.frag.cc, initPTS = data.initPTS;\n        if (demuxerId === 'main') {\n            // Always update the new INIT PTS\n            // Can change due level switch\n            this.initPTS[cc] = initPTS;\n            this.videoTrackCC = cc;\n            logger_1.logger.log(\"InitPTS for cc: \" + cc + \" found from video track: \" + initPTS);\n            // If we are waiting we need to demux/remux the waiting frag\n            // With the new initPTS\n            if (this.state === base_stream_controller_1.State.WAITING_INIT_PTS) {\n                this.tick();\n            }\n        }\n    };\n    AudioStreamController.prototype.startLoad = function (startPosition) {\n        if (this.tracks) {\n            var lastCurrentTime = this.lastCurrentTime;\n            this.stopLoad();\n            this.setInterval(TICK_INTERVAL);\n            this.fragLoadError = 0;\n            if (lastCurrentTime > 0 && startPosition === -1) {\n                logger_1.logger.log(\"audio:override startPosition with lastCurrentTime @\" + lastCurrentTime.toFixed(3));\n                this.state = base_stream_controller_1.State.IDLE;\n            }\n            else {\n                this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;\n                this.state = base_stream_controller_1.State.STARTING;\n            }\n            this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n            this.tick();\n        }\n        else {\n            this.startPosition = startPosition;\n            this.state = base_stream_controller_1.State.STOPPED;\n        }\n    };\n    AudioStreamController.prototype.stopLoad = function () {\n        var frag = this.fragCurrent;\n        if (frag) {\n            if (frag.loader) {\n                frag.loader.abort();\n            }\n            this.fragmentTracker.removeFragment(frag);\n            this.fragCurrent = null;\n        }\n        this.fragPrevious = null;\n        if (this.demuxer) {\n            this.demuxer.destroy();\n            this.demuxer = null;\n        }\n        this.state = base_stream_controller_1.State.STOPPED;\n    };\n    Object.defineProperty(AudioStreamController.prototype, \"state\", {\n        get: function () {\n            return this._state;\n        },\n        set: function (nextState) {\n            if (this.state !== nextState) {\n                var previousState = this.state;\n                this._state = nextState;\n                logger_1.logger.log(\"audio stream:\" + previousState + \"->\" + nextState);\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    AudioStreamController.prototype.doTick = function () {\n        var pos, track, trackDetails, hls = this.hls, config = hls.config;\n        // logger.log('audioStream:' + this.state);\n        switch (this.state) {\n            case base_stream_controller_1.State.ERROR:\n            // don't do anything in error state to avoid breaking further ...\n            case base_stream_controller_1.State.PAUSED:\n            // don't do anything in paused state either ...\n            case base_stream_controller_1.State.BUFFER_FLUSHING:\n                break;\n            case base_stream_controller_1.State.STARTING:\n                this.state = base_stream_controller_1.State.WAITING_TRACK;\n                this.loadedmetadata = false;\n                break;\n            case base_stream_controller_1.State.IDLE:\n                var tracks = this.tracks;\n                // audio tracks not received => exit loop\n                if (!tracks) {\n                    break;\n                }\n                // if video not attached AND\n                // start fragment already requested OR start frag prefetch disable\n                // exit loop\n                // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop\n                if (!this.media &&\n                    (this.startFragRequested || !config.startFragPrefetch)) {\n                    break;\n                }\n                // determine next candidate fragment to be loaded, based on current position and\n                //  end of buffer position\n                // if we have not yet loaded any fragment, start loading from start position\n                if (this.loadedmetadata) {\n                    pos = this.media.currentTime;\n                }\n                else {\n                    pos = this.nextLoadPosition;\n                    if (pos === undefined) {\n                        break;\n                    }\n                }\n                var media = this.mediaBuffer ? this.mediaBuffer : this.media, videoBuffer = this.videoBuffer ? this.videoBuffer : this.media, bufferInfo = buffer_helper_1.BufferHelper.bufferInfo(media, pos, config.maxBufferHole), mainBufferInfo = buffer_helper_1.BufferHelper.bufferInfo(videoBuffer, pos, config.maxBufferHole), bufferLen = bufferInfo.len, bufferEnd_1 = bufferInfo.end, fragPrevious = this.fragPrevious, \n                // ensure we buffer at least config.maxBufferLength (default 30s) or config.maxMaxBufferLength (default: 600s)\n                // whichever is smaller.\n                // once we reach that threshold, don't buffer more than video (mainBufferInfo.len)\n                maxConfigBuffer = Math.min(config.maxBufferLength, config.maxMaxBufferLength), maxBufLen = Math.max(maxConfigBuffer, mainBufferInfo.len), audioSwitch = this.audioSwitch, trackId = this.trackId;\n                // if buffer length is less than maxBufLen try to load a new fragment\n                if ((bufferLen < maxBufLen || audioSwitch) && trackId < tracks.length) {\n                    trackDetails = tracks[trackId].details;\n                    // if track info not retrieved yet, switch state and wait for track retrieval\n                    if (typeof trackDetails === 'undefined') {\n                        this.state = base_stream_controller_1.State.WAITING_TRACK;\n                        break;\n                    }\n                    if (!audioSwitch && this._streamEnded(bufferInfo, trackDetails)) {\n                        this.hls.trigger(events_1.default.BUFFER_EOS, { type: 'audio' });\n                        this.state = base_stream_controller_1.State.ENDED;\n                        return;\n                    }\n                    // find fragment index, contiguous with end of buffer position\n                    var fragments = trackDetails.fragments, fragLen = fragments.length, start = fragments[0].start, end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration, frag = void 0;\n                    // When switching audio track, reload audio as close as possible to currentTime\n                    if (audioSwitch) {\n                        if (trackDetails.live && !trackDetails.PTSKnown) {\n                            logger_1.logger.log('switching audiotrack, live stream, unknown PTS,load first fragment');\n                            bufferEnd_1 = 0;\n                        }\n                        else {\n                            bufferEnd_1 = pos;\n                            // if currentTime (pos) is less than alt audio playlist start time, it means that alt audio is ahead of currentTime\n                            if (trackDetails.PTSKnown && pos < start) {\n                                // if everything is buffered from pos to start or if audio buffer upfront, let's seek to start\n                                if (bufferInfo.end > start || bufferInfo.nextStart) {\n                                    logger_1.logger.log('alt audio track ahead of main track, seek to start of alt audio track');\n                                    this.media.currentTime = start + 0.05;\n                                }\n                                else {\n                                    return;\n                                }\n                            }\n                        }\n                    }\n                    if (trackDetails.initSegment && !trackDetails.initSegment.data) {\n                        frag = trackDetails.initSegment;\n                    } // eslint-disable-line brace-style\n                    // if bufferEnd before start of playlist, load first fragment\n                    else if (bufferEnd_1 <= start) {\n                        frag = fragments[0];\n                        if (this.videoTrackCC !== null && frag.cc !== this.videoTrackCC) {\n                            // Ensure we find a fragment which matches the continuity of the video track\n                            frag = discontinuities_1.findFragWithCC(fragments, this.videoTrackCC);\n                        }\n                        if (trackDetails.live && frag.loadIdx && frag.loadIdx === this.fragLoadIdx) {\n                            // we just loaded this first fragment, and we are still lagging behind the start of the live playlist\n                            // let's force seek to start\n                            var nextBuffered = bufferInfo.nextStart ? bufferInfo.nextStart : start;\n                            logger_1.logger.log(\"no alt audio available @currentTime:\" + this.media.currentTime + \", seeking @\" + (nextBuffered + 0.05));\n                            this.media.currentTime = nextBuffered + 0.05;\n                            return;\n                        }\n                    }\n                    else {\n                        var foundFrag = void 0;\n                        var maxFragLookUpTolerance_1 = config.maxFragLookUpTolerance;\n                        var fragNext = fragPrevious ? fragments[fragPrevious.sn - fragments[0].sn + 1] : undefined;\n                        var fragmentWithinToleranceTest = function (candidate) {\n                            // offset should be within fragment boundary - config.maxFragLookUpTolerance\n                            // this is to cope with situations like\n                            // bufferEnd = 9.991\n                            // frag[Ø] : [0,10]\n                            // frag[1] : [10,20]\n                            // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n                            //              frag start               frag start+duration\n                            //                  |-----------------------------|\n                            //              <--->                         <--->\n                            //  ...--------><-----------------------------><---------....\n                            // previous frag         matching fragment         next frag\n                            //  return -1             return 0                 return 1\n                            // logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n                            // Set the lookup tolerance to be small enough to detect the current segment - ensures we don't skip over very small segments\n                            var candidateLookupTolerance = Math.min(maxFragLookUpTolerance_1, candidate.duration);\n                            if ((candidate.start + candidate.duration - candidateLookupTolerance) <= bufferEnd_1) {\n                                return 1;\n                            }\n                            else if (candidate.start - candidateLookupTolerance > bufferEnd_1 && candidate.start) {\n                                // if maxFragLookUpTolerance will have negative value then don't return -1 for first element\n                                return -1;\n                            }\n                            return 0;\n                        };\n                        if (bufferEnd_1 < end) {\n                            if (bufferEnd_1 > end - maxFragLookUpTolerance_1) {\n                                maxFragLookUpTolerance_1 = 0;\n                            }\n                            // Prefer the next fragment if it's within tolerance\n                            if (fragNext && !fragmentWithinToleranceTest(fragNext)) {\n                                foundFrag = fragNext;\n                            }\n                            else {\n                                foundFrag = binary_search_1.default.search(fragments, fragmentWithinToleranceTest);\n                            }\n                        }\n                        else {\n                            // reach end of playlist\n                            foundFrag = fragments[fragLen - 1];\n                        }\n                        if (foundFrag) {\n                            frag = foundFrag;\n                            start = foundFrag.start;\n                            // logger.log('find SN matching with pos:' +  bufferEnd + ':' + frag.sn);\n                            if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n                                if (frag.sn < trackDetails.endSN) {\n                                    frag = fragments[frag.sn + 1 - trackDetails.startSN];\n                                    logger_1.logger.log(\"SN just loaded, load next one: \" + frag.sn);\n                                }\n                                else {\n                                    frag = null;\n                                }\n                            }\n                        }\n                    }\n                    if (frag) {\n                        // logger.log('      loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n                        if (frag.encrypted) {\n                            logger_1.logger.log(\"Loading key for \" + frag.sn + \" of [\" + trackDetails.startSN + \" ,\" + trackDetails.endSN + \"],track \" + trackId);\n                            this.state = base_stream_controller_1.State.KEY_LOADING;\n                            hls.trigger(events_1.default.KEY_LOADING, { frag: frag });\n                        }\n                        else {\n                            logger_1.logger.log(\"Loading \" + frag.sn + \", cc: \" + frag.cc + \" of [\" + trackDetails.startSN + \" ,\" + trackDetails.endSN + \"],track \" + trackId + \", currentTime:\" + pos + \",bufferEnd:\" + bufferEnd_1.toFixed(3));\n                            // only load if fragment is not loaded or if in audio switch\n                            // we force a frag loading in audio switch as fragment tracker might not have evicted previous frags in case of quick audio switch\n                            this.fragCurrent = frag;\n                            if (audioSwitch || this.fragmentTracker.getState(frag) === fragment_tracker_1.FragmentState.NOT_LOADED) {\n                                this.startFragRequested = true;\n                                if (Number.isFinite(frag.sn)) {\n                                    this.nextLoadPosition = frag.start + frag.duration;\n                                }\n                                hls.trigger(events_1.default.FRAG_LOADING, { frag: frag });\n                                this.state = base_stream_controller_1.State.FRAG_LOADING;\n                            }\n                        }\n                    }\n                }\n                break;\n            case base_stream_controller_1.State.WAITING_TRACK:\n                track = this.tracks[this.trackId];\n                // check if playlist is already loaded\n                if (track && track.details) {\n                    this.state = base_stream_controller_1.State.IDLE;\n                }\n                break;\n            case base_stream_controller_1.State.FRAG_LOADING_WAITING_RETRY:\n                var now = performance.now();\n                var retryDate = this.retryDate;\n                media = this.media;\n                var isSeeking = media && media.seeking;\n                // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n                if (!retryDate || (now >= retryDate) || isSeeking) {\n                    logger_1.logger.log('audioStreamController: retryDate reached, switch back to IDLE state');\n                    this.state = base_stream_controller_1.State.IDLE;\n                }\n                break;\n            case base_stream_controller_1.State.WAITING_INIT_PTS:\n                var videoTrackCC = this.videoTrackCC;\n                if (this.initPTS[videoTrackCC] === undefined) {\n                    break;\n                }\n                // Ensure we don't get stuck in the WAITING_INIT_PTS state if the waiting frag CC doesn't match any initPTS\n                var waitingFrag = this.waitingFragment;\n                if (waitingFrag) {\n                    var waitingFragCC = waitingFrag.frag.cc;\n                    if (videoTrackCC !== waitingFragCC) {\n                        track = this.tracks[this.trackId];\n                        if (track.details && track.details.live) {\n                            logger_1.logger.warn(\"Waiting fragment CC (\" + waitingFragCC + \") does not match video track CC (\" + videoTrackCC + \")\");\n                            this.waitingFragment = null;\n                            this.state = base_stream_controller_1.State.IDLE;\n                        }\n                    }\n                    else {\n                        this.state = base_stream_controller_1.State.FRAG_LOADING;\n                        this.onFragLoaded(this.waitingFragment);\n                        this.waitingFragment = null;\n                    }\n                }\n                else {\n                    this.state = base_stream_controller_1.State.IDLE;\n                }\n                break;\n            case base_stream_controller_1.State.STOPPED:\n            case base_stream_controller_1.State.FRAG_LOADING:\n            case base_stream_controller_1.State.PARSING:\n            case base_stream_controller_1.State.PARSED:\n            case base_stream_controller_1.State.ENDED:\n                break;\n            default:\n                break;\n        }\n    };\n    AudioStreamController.prototype.onMediaAttached = function (data) {\n        var media = this.media = this.mediaBuffer = data.media;\n        this.onvseeking = this.onMediaSeeking.bind(this);\n        this.onvended = this.onMediaEnded.bind(this);\n        media.addEventListener('seeking', this.onvseeking);\n        media.addEventListener('ended', this.onvended);\n        var config = this.config;\n        if (this.tracks && config.autoStartLoad) {\n            this.startLoad(config.startPosition);\n        }\n    };\n    AudioStreamController.prototype.onMediaDetaching = function () {\n        var media = this.media;\n        if (media && media.ended) {\n            logger_1.logger.log('MSE detaching and video ended, reset startPosition');\n            this.startPosition = this.lastCurrentTime = 0;\n        }\n        // remove video listeners\n        if (media) {\n            media.removeEventListener('seeking', this.onvseeking);\n            media.removeEventListener('ended', this.onvended);\n            this.onvseeking = this.onvseeked = this.onvended = null;\n        }\n        this.media = this.mediaBuffer = this.videoBuffer = null;\n        this.loadedmetadata = false;\n        this.stopLoad();\n    };\n    AudioStreamController.prototype.onAudioTracksUpdated = function (data) {\n        logger_1.logger.log('audio tracks updated');\n        this.tracks = data.audioTracks;\n    };\n    AudioStreamController.prototype.onAudioTrackSwitching = function (data) {\n        // if any URL found on new audio track, it is an alternate audio track\n        var altAudio = !!data.url;\n        this.trackId = data.id;\n        this.fragCurrent = null;\n        this.state = base_stream_controller_1.State.PAUSED;\n        this.waitingFragment = null;\n        // destroy useless demuxer when switching audio to main\n        if (!altAudio) {\n            if (this.demuxer) {\n                this.demuxer.destroy();\n                this.demuxer = null;\n            }\n        }\n        else {\n            // switching to audio track, start timer if not already started\n            this.setInterval(TICK_INTERVAL);\n        }\n        // should we switch tracks ?\n        if (altAudio) {\n            this.audioSwitch = true;\n            // main audio track are handled by stream-controller, just do something if switching to alt audio track\n            this.state = base_stream_controller_1.State.IDLE;\n        }\n        this.tick();\n    };\n    AudioStreamController.prototype.onAudioTrackLoaded = function (data) {\n        var newDetails = data.details, trackId = data.id, track = this.tracks[trackId], duration = newDetails.totalduration, sliding = 0;\n        logger_1.logger.log(\"track \" + trackId + \" loaded [\" + newDetails.startSN + \",\" + newDetails.endSN + \"],duration:\" + duration);\n        if (newDetails.live) {\n            var curDetails = track.details;\n            if (curDetails && newDetails.fragments.length > 0) {\n                // we already have details for that level, merge them\n                LevelHelper.mergeDetails(curDetails, newDetails);\n                sliding = newDetails.fragments[0].start;\n                // TODO\n                // this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);\n                if (newDetails.PTSKnown) {\n                    logger_1.logger.log(\"live audio playlist sliding:\" + sliding.toFixed(3));\n                }\n                else {\n                    logger_1.logger.log('live audio playlist - outdated PTS, unknown sliding');\n                }\n            }\n            else {\n                newDetails.PTSKnown = false;\n                logger_1.logger.log('live audio playlist - first load, unknown sliding');\n            }\n        }\n        else {\n            newDetails.PTSKnown = false;\n        }\n        track.details = newDetails;\n        // compute start position\n        if (!this.startFragRequested) {\n            // compute start position if set to -1. use it straight away if value is defined\n            if (this.startPosition === -1) {\n                // first, check if start time offset has been set in playlist, if yes, use this value\n                var startTimeOffset = newDetails.startTimeOffset;\n                if (Number.isFinite(startTimeOffset)) {\n                    logger_1.logger.log(\"start time offset found in playlist, adjust startPosition to \" + startTimeOffset);\n                    this.startPosition = startTimeOffset;\n                }\n                else {\n                    this.startPosition = 0;\n                }\n            }\n            this.nextLoadPosition = this.startPosition;\n        }\n        // only switch batck to IDLE state if we were waiting for track to start downloading a new fragment\n        if (this.state === base_stream_controller_1.State.WAITING_TRACK) {\n            this.state = base_stream_controller_1.State.IDLE;\n        }\n        // trigger handler right now\n        this.tick();\n    };\n    AudioStreamController.prototype.onKeyLoaded = function () {\n        if (this.state === base_stream_controller_1.State.KEY_LOADING) {\n            this.state = base_stream_controller_1.State.IDLE;\n            this.tick();\n        }\n    };\n    AudioStreamController.prototype.onFragLoaded = function (data) {\n        var fragCurrent = this.fragCurrent, fragLoaded = data.frag;\n        if (this.state === base_stream_controller_1.State.FRAG_LOADING &&\n            fragCurrent &&\n            fragLoaded.type === 'audio' &&\n            fragLoaded.level === fragCurrent.level &&\n            fragLoaded.sn === fragCurrent.sn) {\n            var track = this.tracks[this.trackId], details = track.details, duration = details.totalduration, trackId = fragCurrent.level, sn = fragCurrent.sn, cc = fragCurrent.cc, audioCodec = this.config.defaultAudioCodec || track.audioCodec || 'mp4a.40.2', stats = this.stats = data.stats;\n            if (sn === 'initSegment') {\n                this.state = base_stream_controller_1.State.IDLE;\n                stats.tparsed = stats.tbuffered = performance.now();\n                details.initSegment.data = data.payload;\n                this.hls.trigger(events_1.default.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'audio' });\n                this.tick();\n            }\n            else {\n                this.state = base_stream_controller_1.State.PARSING;\n                // transmux the MPEG-TS data to ISO-BMFF segments\n                this.appended = false;\n                if (!this.demuxer) {\n                    this.demuxer = new demuxer_1.default(this.hls, 'audio');\n                }\n                // Check if we have video initPTS\n                // If not we need to wait for it\n                var initPTS = this.initPTS[cc];\n                var initSegmentData = details.initSegment ? details.initSegment.data : [];\n                if (details.initSegment || initPTS !== undefined) {\n                    this.pendingBuffering = true;\n                    logger_1.logger.log(\"Demuxing \" + sn + \" of [\" + details.startSN + \" ,\" + details.endSN + \"],track \" + trackId);\n                    // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)\n                    var accurateTimeOffset = false; // details.PTSKnown || !details.live;\n                    this.demuxer.push(data.payload, initSegmentData, audioCodec, null, fragCurrent, duration, accurateTimeOffset, initPTS);\n                }\n                else {\n                    logger_1.logger.log(\"unknown video PTS for continuity counter \" + cc + \", waiting for video PTS before demuxing audio frag \" + sn + \" of [\" + details.startSN + \" ,\" + details.endSN + \"],track \" + trackId);\n                    this.waitingFragment = data;\n                    this.state = base_stream_controller_1.State.WAITING_INIT_PTS;\n                }\n            }\n        }\n        this.fragLoadError = 0;\n    };\n    AudioStreamController.prototype.onFragParsingInitSegment = function (data) {\n        var fragCurrent = this.fragCurrent;\n        var fragNew = data.frag;\n        if (fragCurrent &&\n            data.id === 'audio' &&\n            fragNew.sn === fragCurrent.sn &&\n            fragNew.level === fragCurrent.level &&\n            this.state === base_stream_controller_1.State.PARSING) {\n            var tracks = data.tracks, track = void 0;\n            // delete any video track found on audio demuxer\n            if (tracks.video) {\n                delete tracks.video;\n            }\n            // include levelCodec in audio and video tracks\n            track = tracks.audio;\n            if (track) {\n                track.levelCodec = track.codec;\n                track.id = data.id;\n                this.hls.trigger(events_1.default.BUFFER_CODECS, tracks);\n                logger_1.logger.log(\"audio track:audio,container:\" + track.container + \",codecs[level/parsed]=[\" + track.levelCodec + \"/\" + track.codec + \"]\");\n                var initSegment = track.initSegment;\n                if (initSegment) {\n                    var appendObj = { type: 'audio', data: initSegment, parent: 'audio', content: 'initSegment' };\n                    if (this.audioSwitch) {\n                        this.pendingData = [appendObj];\n                    }\n                    else {\n                        this.appended = true;\n                        // arm pending Buffering flag before appending a segment\n                        this.pendingBuffering = true;\n                        this.hls.trigger(events_1.default.BUFFER_APPENDING, appendObj);\n                    }\n                }\n                // trigger handler right now\n                this.tick();\n            }\n        }\n    };\n    AudioStreamController.prototype.onFragParsingData = function (data) {\n        var _this = this;\n        var fragCurrent = this.fragCurrent;\n        var fragNew = data.frag;\n        if (fragCurrent &&\n            data.id === 'audio' &&\n            data.type === 'audio' &&\n            fragNew.sn === fragCurrent.sn &&\n            fragNew.level === fragCurrent.level &&\n            this.state === base_stream_controller_1.State.PARSING) {\n            var trackId = this.trackId, track = this.tracks[trackId], hls_1 = this.hls;\n            if (!Number.isFinite(data.endPTS)) {\n                data.endPTS = data.startPTS + fragCurrent.duration;\n                data.endDTS = data.startDTS + fragCurrent.duration;\n            }\n            fragCurrent.addElementaryStream(fragment_1.default.ElementaryStreamTypes.AUDIO);\n            logger_1.logger.log(\"parsed \" + data.type + \",PTS:[\" + data.startPTS.toFixed(3) + \",\" + data.endPTS.toFixed(3) + \"],DTS:[\" + data.startDTS.toFixed(3) + \"/\" + data.endDTS.toFixed(3) + \"],nb:\" + data.nb);\n            LevelHelper.updateFragPTSDTS(track.details, fragCurrent, data.startPTS, data.endPTS);\n            var audioSwitch = this.audioSwitch, media = this.media, appendOnBufferFlush = false;\n            // Only flush audio from old audio tracks when PTS is known on new audio track\n            if (audioSwitch && media) {\n                if (media.readyState) {\n                    var currentTime = media.currentTime;\n                    logger_1.logger.log('switching audio track : currentTime:' + currentTime);\n                    if (currentTime >= data.startPTS) {\n                        logger_1.logger.log('switching audio track : flushing all audio');\n                        this.state = base_stream_controller_1.State.BUFFER_FLUSHING;\n                        hls_1.trigger(events_1.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n                        appendOnBufferFlush = true;\n                        // Lets announce that the initial audio track switch flush occur\n                        this.audioSwitch = false;\n                        hls_1.trigger(events_1.default.AUDIO_TRACK_SWITCHED, { id: trackId });\n                    }\n                }\n                else {\n                    // Lets announce that the initial audio track switch flush occur\n                    this.audioSwitch = false;\n                    hls_1.trigger(events_1.default.AUDIO_TRACK_SWITCHED, { id: trackId });\n                }\n            }\n            var pendingData_1 = this.pendingData;\n            if (!pendingData_1) {\n                logger_1.logger.warn('Apparently attempt to enqueue media payload without codec initialization data upfront');\n                hls_1.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: null, fatal: true });\n                return;\n            }\n            if (!this.audioSwitch) {\n                [data.data1, data.data2].forEach(function (buffer) {\n                    if (buffer && buffer.length) {\n                        pendingData_1.push({ type: data.type, data: buffer, parent: 'audio', content: 'data' });\n                    }\n                });\n                if (!appendOnBufferFlush && pendingData_1.length) {\n                    pendingData_1.forEach(function (appendObj) {\n                        // only append in PARSING state (rationale is that an appending error could happen synchronously on first segment appending)\n                        // in that case it is useless to append following segments\n                        if (_this.state === base_stream_controller_1.State.PARSING) {\n                            // arm pending Buffering flag before appending a segment\n                            _this.pendingBuffering = true;\n                            _this.hls.trigger(events_1.default.BUFFER_APPENDING, appendObj);\n                        }\n                    });\n                    this.pendingData = [];\n                    this.appended = true;\n                }\n            }\n            // trigger handler right now\n            this.tick();\n        }\n    };\n    AudioStreamController.prototype.onFragParsed = function (data) {\n        var fragCurrent = this.fragCurrent;\n        var fragNew = data.frag;\n        if (fragCurrent &&\n            data.id === 'audio' &&\n            fragNew.sn === fragCurrent.sn &&\n            fragNew.level === fragCurrent.level &&\n            this.state === base_stream_controller_1.State.PARSING) {\n            this.stats.tparsed = performance.now();\n            this.state = base_stream_controller_1.State.PARSED;\n            this._checkAppendedParsed();\n        }\n    };\n    AudioStreamController.prototype.onBufferReset = function () {\n        // reset reference to sourcebuffers\n        this.mediaBuffer = this.videoBuffer = null;\n        this.loadedmetadata = false;\n    };\n    AudioStreamController.prototype.onBufferCreated = function (data) {\n        var audioTrack = data.tracks.audio;\n        if (audioTrack) {\n            this.mediaBuffer = audioTrack.buffer;\n            this.loadedmetadata = true;\n        }\n        if (data.tracks.video) {\n            this.videoBuffer = data.tracks.video.buffer;\n        }\n    };\n    AudioStreamController.prototype.onBufferAppended = function (data) {\n        if (data.parent === 'audio') {\n            var state = this.state;\n            if (state === base_stream_controller_1.State.PARSING || state === base_stream_controller_1.State.PARSED) {\n                // check if all buffers have been appended\n                this.pendingBuffering = (data.pending > 0);\n                this._checkAppendedParsed();\n            }\n        }\n    };\n    AudioStreamController.prototype._checkAppendedParsed = function () {\n        // trigger handler right now\n        if (this.state === base_stream_controller_1.State.PARSED && (!this.appended || !this.pendingBuffering)) {\n            var frag = this.fragCurrent, stats = this.stats, hls_2 = this.hls;\n            if (frag) {\n                this.fragPrevious = frag;\n                stats.tbuffered = performance.now();\n                hls_2.trigger(events_1.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'audio' });\n                var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n                logger_1.logger.log(\"audio buffered : \" + time_ranges_1.default.toString(media.buffered));\n                if (this.audioSwitch && this.appended) {\n                    this.audioSwitch = false;\n                    hls_2.trigger(events_1.default.AUDIO_TRACK_SWITCHED, { id: this.trackId });\n                }\n                this.state = base_stream_controller_1.State.IDLE;\n            }\n            this.tick();\n        }\n    };\n    AudioStreamController.prototype.onError = function (data) {\n        var frag = data.frag;\n        // don't handle frag error not related to audio fragment\n        if (frag && frag.type !== 'audio') {\n            return;\n        }\n        switch (data.details) {\n            case errors_1.ErrorDetails.FRAG_LOAD_ERROR:\n            case errors_1.ErrorDetails.FRAG_LOAD_TIMEOUT:\n                var frag_1 = data.frag;\n                // don't handle frag error not related to audio fragment\n                if (frag_1 && frag_1.type !== 'audio') {\n                    break;\n                }\n                if (!data.fatal) {\n                    var loadError = this.fragLoadError;\n                    if (loadError) {\n                        loadError++;\n                    }\n                    else {\n                        loadError = 1;\n                    }\n                    var config = this.config;\n                    if (loadError <= config.fragLoadingMaxRetry) {\n                        this.fragLoadError = loadError;\n                        // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n                        var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);\n                        logger_1.logger.warn(\"AudioStreamController: frag loading failed, retry in \" + delay + \" ms\");\n                        this.retryDate = performance.now() + delay;\n                        // retry loading state\n                        this.state = base_stream_controller_1.State.FRAG_LOADING_WAITING_RETRY;\n                    }\n                    else {\n                        logger_1.logger.error(\"AudioStreamController: \" + data.details + \" reaches max retry, redispatch as fatal ...\");\n                        // switch error to fatal\n                        data.fatal = true;\n                        this.state = base_stream_controller_1.State.ERROR;\n                    }\n                }\n                break;\n            case errors_1.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:\n            case errors_1.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:\n            case errors_1.ErrorDetails.KEY_LOAD_ERROR:\n            case errors_1.ErrorDetails.KEY_LOAD_TIMEOUT:\n                //  when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received\n                if (this.state !== base_stream_controller_1.State.ERROR) {\n                    // if fatal error, stop processing, otherwise move to IDLE to retry loading\n                    this.state = data.fatal ? base_stream_controller_1.State.ERROR : base_stream_controller_1.State.IDLE;\n                    logger_1.logger.warn(\"AudioStreamController: \" + data.details + \" while loading frag, now switching to \" + this.state + \" state ...\");\n                }\n                break;\n            case errors_1.ErrorDetails.BUFFER_FULL_ERROR:\n                // if in appending state\n                if (data.parent === 'audio' && (this.state === base_stream_controller_1.State.PARSING || this.state === base_stream_controller_1.State.PARSED)) {\n                    var media = this.mediaBuffer, currentTime = this.media.currentTime, mediaBuffered = media && buffer_helper_1.BufferHelper.isBuffered(media, currentTime) && buffer_helper_1.BufferHelper.isBuffered(media, currentTime + 0.5);\n                    // reduce max buf len if current position is buffered\n                    if (mediaBuffered) {\n                        var config = this.config;\n                        if (config.maxMaxBufferLength >= config.maxBufferLength) {\n                            // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...\n                            config.maxMaxBufferLength /= 2;\n                            logger_1.logger.warn(\"AudioStreamController: reduce max buffer length to \" + config.maxMaxBufferLength + \"s\");\n                        }\n                        this.state = base_stream_controller_1.State.IDLE;\n                    }\n                    else {\n                        // current position is not buffered, but browser is still complaining about buffer full error\n                        // this happens on IE/Edge, refer to https://github.com/video-dev/hls.js/pull/708\n                        // in that case flush the whole audio buffer to recover\n                        logger_1.logger.warn('AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer');\n                        this.fragCurrent = null;\n                        // flush everything\n                        this.state = base_stream_controller_1.State.BUFFER_FLUSHING;\n                        this.hls.trigger(events_1.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n                    }\n                }\n                break;\n            default:\n                break;\n        }\n    };\n    AudioStreamController.prototype.onBufferFlushed = function () {\n        var _this = this;\n        var pendingData = this.pendingData;\n        if (pendingData && pendingData.length) {\n            logger_1.logger.log('AudioStreamController: appending pending audio data after buffer flushed');\n            pendingData.forEach(function (appendObj) {\n                _this.hls.trigger(events_1.default.BUFFER_APPENDING, appendObj);\n            });\n            this.appended = true;\n            this.pendingData = [];\n            this.state = base_stream_controller_1.State.PARSED;\n        }\n        else {\n            // move to IDLE once flush complete. this should trigger new fragment loading\n            this.state = base_stream_controller_1.State.IDLE;\n            // reset reference to frag\n            this.fragPrevious = null;\n            this.tick();\n        }\n    };\n    return AudioStreamController;\n}(base_stream_controller_1.default));\nexports.default = AudioStreamController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/audio-track-controller.js\":\n/*!**************************************************!*\\\n  !*** ./src/controller/audio-track-controller.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar task_loop_1 = __webpack_require__(/*! ../task-loop */ \"./src/task-loop.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\n/**\n * @class AudioTrackController\n * @implements {EventHandler}\n *\n * Handles main manifest and audio-track metadata loaded,\n * owns and exposes the selectable audio-tracks data-models.\n *\n * Exposes internal interface to select available audio-tracks.\n *\n * Handles errors on loading audio-track playlists. Manages fallback mechanism\n * with redundants tracks (group-IDs).\n *\n * Handles level-loading and group-ID switches for video (fallback on video levels),\n * and eventually adapts the audio-track group-ID to match.\n *\n * @fires AUDIO_TRACK_LOADING\n * @fires AUDIO_TRACK_SWITCHING\n * @fires AUDIO_TRACKS_UPDATED\n * @fires ERROR\n *\n */\nvar AudioTrackController = /** @class */ (function (_super) {\n    __extends(AudioTrackController, _super);\n    function AudioTrackController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MANIFEST_LOADING, events_1.default.MANIFEST_PARSED, events_1.default.AUDIO_TRACK_LOADED, events_1.default.AUDIO_TRACK_SWITCHED, events_1.default.LEVEL_LOADED, events_1.default.ERROR) || this;\n        /**\n         * @private\n         * Currently selected index in `tracks`\n         * @member {number} trackId\n         */\n        _this._trackId = -1;\n        /**\n         * @private\n         * If should select tracks according to default track attribute\n         * @member {boolean} _selectDefaultTrack\n         */\n        _this._selectDefaultTrack = true;\n        /**\n         * @public\n         * All tracks available\n         * @member {AudioTrack[]}\n         */\n        _this.tracks = [];\n        /**\n         * @public\n         * List of blacklisted audio track IDs (that have caused failure)\n         * @member {number[]}\n         */\n        _this.trackIdBlacklist = Object.create(null);\n        /**\n         * @public\n         * The currently running group ID for audio\n         * (we grab this on manifest-parsed and new level-loaded)\n         * @member {string}\n         */\n        _this.audioGroupId = null;\n        return _this;\n    }\n    /**\n     * Reset audio tracks on new manifest loading.\n     */\n    AudioTrackController.prototype.onManifestLoading = function () {\n        this.tracks = [];\n        this._trackId = -1;\n        this._selectDefaultTrack = true;\n    };\n    /**\n     * Store tracks data from manifest parsed data.\n     *\n     * Trigger AUDIO_TRACKS_UPDATED event.\n     *\n     * @param {*} data\n     */\n    AudioTrackController.prototype.onManifestParsed = function (data) {\n        var tracks = this.tracks = data.audioTracks || [];\n        this.hls.trigger(events_1.default.AUDIO_TRACKS_UPDATED, { audioTracks: tracks });\n    };\n    /**\n     * Store track details of loaded track in our data-model.\n     *\n     * Set-up metadata update interval task for live-mode streams.\n     *\n     * @param {} data\n     */\n    AudioTrackController.prototype.onAudioTrackLoaded = function (data) {\n        if (data.id >= this.tracks.length) {\n            logger_1.logger.warn('Invalid audio track id:', data.id);\n            return;\n        }\n        logger_1.logger.log(\"audioTrack \" + data.id + \" loaded\");\n        this.tracks[data.id].details = data.details;\n        // check if current playlist is a live playlist\n        // and if we have already our reload interval setup\n        if (data.details.live && !this.hasInterval()) {\n            // if live playlist we will have to reload it periodically\n            // set reload period to playlist target duration\n            var updatePeriodMs = data.details.targetduration * 1000;\n            this.setInterval(updatePeriodMs);\n        }\n        if (!data.details.live && this.hasInterval()) {\n            // playlist is not live and timer is scheduled: cancel it\n            this.clearInterval();\n        }\n    };\n    /**\n     * Update the internal group ID to any audio-track we may have set manually\n     * or because of a failure-handling fallback.\n     *\n     * Quality-levels should update to that group ID in this case.\n     *\n     * @param {*} data\n     */\n    AudioTrackController.prototype.onAudioTrackSwitched = function (data) {\n        var audioGroupId = this.tracks[data.id].groupId;\n        if (audioGroupId && (this.audioGroupId !== audioGroupId)) {\n            this.audioGroupId = audioGroupId;\n        }\n    };\n    /**\n     * When a level gets loaded, if it has redundant audioGroupIds (in the same ordinality as it's redundant URLs)\n     * we are setting our audio-group ID internally to the one set, if it is different from the group ID currently set.\n     *\n     * If group-ID got update, we re-select the appropriate audio-track with this group-ID matching the currently\n     * selected one (based on NAME property).\n     *\n     * @param {*} data\n     */\n    AudioTrackController.prototype.onLevelLoaded = function (data) {\n        // FIXME: crashes because currentLevel is undefined\n        // const levelInfo = this.hls.levels[this.hls.currentLevel];\n        var levelInfo = this.hls.levels[data.level];\n        if (!levelInfo.audioGroupIds) {\n            return;\n        }\n        var audioGroupId = levelInfo.audioGroupIds[levelInfo.urlId];\n        if (this.audioGroupId !== audioGroupId) {\n            this.audioGroupId = audioGroupId;\n            this._selectInitialAudioTrack();\n        }\n    };\n    /**\n     * Handle network errors loading audio track manifests\n     * and also pausing on any netwok errors.\n     *\n     * @param {ErrorEventData} data\n     */\n    AudioTrackController.prototype.onError = function (data) {\n        // Only handle network errors\n        if (data.type !== errors_1.ErrorTypes.NETWORK_ERROR) {\n            return;\n        }\n        // If fatal network error, cancel update task\n        if (data.fatal) {\n            this.clearInterval();\n        }\n        // If not an audio-track loading error don't handle further\n        if (data.details !== errors_1.ErrorDetails.AUDIO_TRACK_LOAD_ERROR) {\n            return;\n        }\n        logger_1.logger.warn('Network failure on audio-track id:', data.context.id);\n        this._handleLoadError();\n    };\n    Object.defineProperty(AudioTrackController.prototype, \"audioTracks\", {\n        /**\n         * @type {AudioTrack[]} Audio-track list we own\n         */\n        get: function () {\n            return this.tracks;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(AudioTrackController.prototype, \"audioTrack\", {\n        /**\n         * @type {number} Index into audio-tracks list of currently selected track.\n         */\n        get: function () {\n            return this._trackId;\n        },\n        /**\n         * Select current track by index\n         */\n        set: function (newId) {\n            this._setAudioTrack(newId);\n            // If audio track is selected from API then don't choose from the manifest default track\n            this._selectDefaultTrack = false;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n     * @private\n     * @param {number} newId\n     */\n    AudioTrackController.prototype._setAudioTrack = function (newId) {\n        // noop on same audio track id as already set\n        if (this._trackId === newId && this.tracks[this._trackId].details) {\n            logger_1.logger.debug('Same id as current audio-track passed, and track details available -> no-op');\n            return;\n        }\n        // check if level idx is valid\n        if (newId < 0 || newId >= this.tracks.length) {\n            logger_1.logger.warn('Invalid id passed to audio-track controller');\n            return;\n        }\n        var audioTrack = this.tracks[newId];\n        logger_1.logger.log(\"Now switching to audio-track index \" + newId);\n        // stopping live reloading timer if any\n        this.clearInterval();\n        this._trackId = newId;\n        var url = audioTrack.url, type = audioTrack.type, id = audioTrack.id;\n        this.hls.trigger(events_1.default.AUDIO_TRACK_SWITCHING, { id: id, type: type, url: url });\n        this._loadTrackDetailsIfNeeded(audioTrack);\n    };\n    /**\n     * @override\n     */\n    AudioTrackController.prototype.doTick = function () {\n        this._updateTrack(this._trackId);\n    };\n    /**\n     * Select initial track\n     * @private\n     */\n    AudioTrackController.prototype._selectInitialAudioTrack = function () {\n        var _this = this;\n        var tracks = this.tracks;\n        if (!tracks.length) {\n            return;\n        }\n        var currentAudioTrack = this.tracks[this._trackId];\n        var name = null;\n        if (currentAudioTrack) {\n            name = currentAudioTrack.name;\n        }\n        // Pre-select default tracks if there are any\n        if (this._selectDefaultTrack) {\n            var defaultTracks = tracks.filter(function (track) { return track.default; });\n            if (defaultTracks.length) {\n                tracks = defaultTracks;\n            }\n            else {\n                logger_1.logger.warn('No default audio tracks defined');\n            }\n        }\n        var trackFound = false;\n        var traverseTracks = function () {\n            // Select track with right group ID\n            tracks.forEach(function (track) {\n                if (trackFound) {\n                    return;\n                }\n                // We need to match the (pre-)selected group ID\n                // and the NAME of the current track.\n                if ((!_this.audioGroupId || track.groupId === _this.audioGroupId) &&\n                    (!name || name === track.name)) {\n                    // If there was a previous track try to stay with the same `NAME`.\n                    // It should be unique across tracks of same group, and consistent through redundant track groups.\n                    _this._setAudioTrack(track.id);\n                    trackFound = true;\n                }\n            });\n        };\n        traverseTracks();\n        if (!trackFound) {\n            name = null;\n            traverseTracks();\n        }\n        if (!trackFound) {\n            logger_1.logger.error(\"No track found for running audio group-ID: \" + this.audioGroupId);\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.MEDIA_ERROR,\n                details: errors_1.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,\n                fatal: true\n            });\n        }\n    };\n    /**\n     * @private\n     * @param {AudioTrack} audioTrack\n     * @returns {boolean}\n     */\n    AudioTrackController.prototype._needsTrackLoading = function (audioTrack) {\n        var details = audioTrack.details, url = audioTrack.url;\n        if (!details || details.live) {\n            // check if we face an audio track embedded in main playlist (audio track without URI attribute)\n            return !!url;\n        }\n        return false;\n    };\n    /**\n     * @private\n     * @param {AudioTrack} audioTrack\n     */\n    AudioTrackController.prototype._loadTrackDetailsIfNeeded = function (audioTrack) {\n        if (this._needsTrackLoading(audioTrack)) {\n            var url = audioTrack.url, id = audioTrack.id;\n            // track not retrieved yet, or live playlist we need to (re)load it\n            logger_1.logger.log(\"loading audio-track playlist for id: \" + id);\n            this.hls.trigger(events_1.default.AUDIO_TRACK_LOADING, { url: url, id: id });\n        }\n    };\n    /**\n     * @private\n     * @param {number} newId\n     */\n    AudioTrackController.prototype._updateTrack = function (newId) {\n        // check if level idx is valid\n        if (newId < 0 || newId >= this.tracks.length) {\n            return;\n        }\n        // stopping live reloading timer if any\n        this.clearInterval();\n        this._trackId = newId;\n        logger_1.logger.log(\"trying to update audio-track \" + newId);\n        var audioTrack = this.tracks[newId];\n        this._loadTrackDetailsIfNeeded(audioTrack);\n    };\n    /**\n     * @private\n     */\n    AudioTrackController.prototype._handleLoadError = function () {\n        // First, let's black list current track id\n        this.trackIdBlacklist[this._trackId] = true;\n        // Let's try to fall back on a functional audio-track with the same group ID\n        var previousId = this._trackId;\n        var _a = this.tracks[previousId], name = _a.name, language = _a.language, groupId = _a.groupId;\n        logger_1.logger.warn(\"Loading failed on audio track id: \" + previousId + \", group-id: \" + groupId + \", name/language: \\\"\" + name + \"\\\" / \\\"\" + language + \"\\\"\");\n        // Find a non-blacklisted track ID with the same NAME\n        // At least a track that is not blacklisted, thus on another group-ID.\n        var newId = previousId;\n        for (var i = 0; i < this.tracks.length; i++) {\n            if (this.trackIdBlacklist[i]) {\n                continue;\n            }\n            var newTrack = this.tracks[i];\n            if (newTrack.name === name) {\n                newId = i;\n                break;\n            }\n        }\n        if (newId === previousId) {\n            logger_1.logger.warn(\"No fallback audio-track found for name/language: \\\"\" + name + \"\\\" / \\\"\" + language + \"\\\"\");\n            return;\n        }\n        logger_1.logger.log('Attempting audio-track fallback id:', newId, 'group-id:', this.tracks[newId].groupId);\n        this._setAudioTrack(newId);\n    };\n    return AudioTrackController;\n}(task_loop_1.default));\nexports.default = AudioTrackController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/base-stream-controller.js\":\n/*!**************************************************!*\\\n  !*** ./src/controller/base-stream-controller.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar task_loop_1 = __webpack_require__(/*! ../task-loop */ \"./src/task-loop.js\");\nvar fragment_tracker_1 = __webpack_require__(/*! ./fragment-tracker */ \"./src/controller/fragment-tracker.js\");\nvar buffer_helper_1 = __webpack_require__(/*! ../utils/buffer-helper */ \"./src/utils/buffer-helper.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nexports.State = {\n    STOPPED: 'STOPPED',\n    STARTING: 'STARTING',\n    IDLE: 'IDLE',\n    PAUSED: 'PAUSED',\n    KEY_LOADING: 'KEY_LOADING',\n    FRAG_LOADING: 'FRAG_LOADING',\n    FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',\n    WAITING_TRACK: 'WAITING_TRACK',\n    PARSING: 'PARSING',\n    PARSED: 'PARSED',\n    BUFFER_FLUSHING: 'BUFFER_FLUSHING',\n    ENDED: 'ENDED',\n    ERROR: 'ERROR',\n    WAITING_INIT_PTS: 'WAITING_INIT_PTS',\n    WAITING_LEVEL: 'WAITING_LEVEL'\n};\nvar BaseStreamController = /** @class */ (function (_super) {\n    __extends(BaseStreamController, _super);\n    function BaseStreamController() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    BaseStreamController.prototype.doTick = function () { };\n    BaseStreamController.prototype._streamEnded = function (bufferInfo, levelDetails) {\n        var _a = this, fragCurrent = _a.fragCurrent, fragmentTracker = _a.fragmentTracker;\n        // we just got done loading the final fragment and there is no other buffered range after ...\n        // rationale is that in case there are any buffered ranges after, it means that there are unbuffered portion in between\n        // so we should not switch to ENDED in that case, to be able to buffer them\n        // dont switch to ENDED if we need to backtrack last fragment\n        if (!levelDetails.live && fragCurrent && !fragCurrent.backtracked && fragCurrent.sn === levelDetails.endSN && !bufferInfo.nextStart) {\n            var fragState = fragmentTracker.getState(fragCurrent);\n            return fragState === fragment_tracker_1.FragmentState.PARTIAL || fragState === fragment_tracker_1.FragmentState.OK;\n        }\n        return false;\n    };\n    BaseStreamController.prototype.onMediaSeeking = function () {\n        var _a = this, config = _a.config, media = _a.media, mediaBuffer = _a.mediaBuffer, state = _a.state;\n        var currentTime = media ? media.currentTime : null;\n        var bufferInfo = buffer_helper_1.BufferHelper.bufferInfo(mediaBuffer || media, currentTime, this.config.maxBufferHole);\n        if (Number.isFinite(currentTime)) {\n            logger_1.logger.log(\"media seeking to \" + currentTime.toFixed(3));\n        }\n        if (state === exports.State.FRAG_LOADING) {\n            var fragCurrent = this.fragCurrent;\n            // check if we are seeking to a unbuffered area AND if frag loading is in progress\n            if (bufferInfo.len === 0 && fragCurrent) {\n                var tolerance = config.maxFragLookUpTolerance;\n                var fragStartOffset = fragCurrent.start - tolerance;\n                var fragEndOffset = fragCurrent.start + fragCurrent.duration + tolerance;\n                // check if we seek position will be out of currently loaded frag range : if out cancel frag load, if in, don't do anything\n                if (currentTime < fragStartOffset || currentTime > fragEndOffset) {\n                    if (fragCurrent.loader) {\n                        logger_1.logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');\n                        fragCurrent.loader.abort();\n                    }\n                    this.fragCurrent = null;\n                    this.fragPrevious = null;\n                    // switch to IDLE state to load new fragment\n                    this.state = exports.State.IDLE;\n                }\n                else {\n                    logger_1.logger.log('seeking outside of buffer but within currently loaded fragment range');\n                }\n            }\n        }\n        else if (state === exports.State.ENDED) {\n            // if seeking to unbuffered area, clean up fragPrevious\n            if (bufferInfo.len === 0) {\n                this.fragPrevious = null;\n                this.fragCurrent = null;\n            }\n            // switch to IDLE state to check for potential new fragment\n            this.state = exports.State.IDLE;\n        }\n        if (media) {\n            this.lastCurrentTime = currentTime;\n        }\n        // in case seeking occurs although no media buffered, adjust startPosition and nextLoadPosition to seek target\n        if (!this.loadedmetadata) {\n            this.nextLoadPosition = this.startPosition = currentTime;\n        }\n        // tick to speed up processing\n        this.tick();\n    };\n    BaseStreamController.prototype.onMediaEnded = function () {\n        // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n        this.startPosition = this.lastCurrentTime = 0;\n    };\n    return BaseStreamController;\n}(task_loop_1.default));\nexports.default = BaseStreamController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/buffer-controller.js\":\n/*!*********************************************!*\\\n  !*** ./src/controller/buffer-controller.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * Buffer Controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar mediasource_helper_1 = __webpack_require__(/*! ../utils/mediasource-helper */ \"./src/utils/mediasource-helper.js\");\nvar MediaSource = mediasource_helper_1.getMediaSource();\nvar BufferController = /** @class */ (function (_super) {\n    __extends(BufferController, _super);\n    function BufferController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHING, events_1.default.MEDIA_DETACHING, events_1.default.MANIFEST_PARSED, events_1.default.BUFFER_RESET, events_1.default.BUFFER_APPENDING, events_1.default.BUFFER_CODECS, events_1.default.BUFFER_EOS, events_1.default.BUFFER_FLUSHING, events_1.default.LEVEL_PTS_UPDATED, events_1.default.LEVEL_UPDATED) || this;\n        // the value that we have set mediasource.duration to\n        // (the actual duration may be tweaked slighly by the browser)\n        _this._msDuration = null;\n        // the value that we want to set mediaSource.duration to\n        _this._levelDuration = null;\n        // the target duration of the current media playlist\n        _this._levelTargetDuration = 10;\n        // current stream state: true - for live broadcast, false - for VoD content\n        _this._live = null;\n        // cache the self generated object url to detect hijack of video tag\n        _this._objectUrl = null;\n        // The number of BUFFER_CODEC events received before any sourceBuffers are created\n        _this.bufferCodecEventsExpected = 0;\n        // Source Buffer listeners\n        _this.onsbue = _this.onSBUpdateEnd.bind(_this);\n        _this.onsbe = _this.onSBUpdateError.bind(_this);\n        _this.pendingTracks = {};\n        _this.tracks = {};\n        return _this;\n    }\n    BufferController.prototype.destroy = function () {\n        event_handler_1.default.prototype.destroy.call(this);\n    };\n    BufferController.prototype.onLevelPtsUpdated = function (data) {\n        var type = data.type;\n        var audioTrack = this.tracks.audio;\n        // Adjusting `SourceBuffer.timestampOffset` (desired point in the timeline where the next frames should be appended)\n        // in Chrome browser when we detect MPEG audio container and time delta between level PTS and `SourceBuffer.timestampOffset`\n        // is greater than 100ms (this is enough to handle seek for VOD or level change for LIVE videos). At the time of change we issue\n        // `SourceBuffer.abort()` and adjusting `SourceBuffer.timestampOffset` if `SourceBuffer.updating` is false or awaiting `updateend`\n        // event if SB is in updating state.\n        // More info here: https://github.com/video-dev/hls.js/issues/332#issuecomment-257986486\n        if (type === 'audio' && audioTrack && audioTrack.container === 'audio/mpeg') { // Chrome audio mp3 track\n            var audioBuffer = this.sourceBuffer.audio;\n            var delta = Math.abs(audioBuffer.timestampOffset - data.start);\n            // adjust timestamp offset if time delta is greater than 100ms\n            if (delta > 0.1) {\n                var updating = audioBuffer.updating;\n                try {\n                    audioBuffer.abort();\n                }\n                catch (err) {\n                    logger_1.logger.warn('can not abort audio buffer: ' + err);\n                }\n                if (!updating) {\n                    logger_1.logger.warn('change mpeg audio timestamp offset from ' + audioBuffer.timestampOffset + ' to ' + data.start);\n                    audioBuffer.timestampOffset = data.start;\n                }\n                else {\n                    this.audioTimestampOffset = data.start;\n                }\n            }\n        }\n    };\n    BufferController.prototype.onManifestParsed = function (data) {\n        // in case of alt audio 2 BUFFER_CODECS events will be triggered, one per stream controller\n        // sourcebuffers will be created all at once when the expected nb of tracks will be reached\n        // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller\n        // it will contain the expected nb of source buffers, no need to compute it\n        this.bufferCodecEventsExpected = data.altAudio ? 2 : 1;\n        logger_1.logger.log(this.bufferCodecEventsExpected + \" bufferCodec event(s) expected\");\n    };\n    BufferController.prototype.onMediaAttaching = function (data) {\n        var media = this.media = data.media;\n        if (media) {\n            // setup the media source\n            var ms = this.mediaSource = new MediaSource();\n            // Media Source listeners\n            this.onmso = this.onMediaSourceOpen.bind(this);\n            this.onmse = this.onMediaSourceEnded.bind(this);\n            this.onmsc = this.onMediaSourceClose.bind(this);\n            ms.addEventListener('sourceopen', this.onmso);\n            ms.addEventListener('sourceended', this.onmse);\n            ms.addEventListener('sourceclose', this.onmsc);\n            // link video and media Source\n            media.src = window.URL.createObjectURL(ms);\n            // cache the locally generated object url\n            this._objectUrl = media.src;\n        }\n    };\n    BufferController.prototype.onMediaDetaching = function () {\n        logger_1.logger.log('media source detaching');\n        var ms = this.mediaSource;\n        if (ms) {\n            if (ms.readyState === 'open') {\n                try {\n                    // endOfStream could trigger exception if any sourcebuffer is in updating state\n                    // we don't really care about checking sourcebuffer state here,\n                    // as we are anyway detaching the MediaSource\n                    // let's just avoid this exception to propagate\n                    ms.endOfStream();\n                }\n                catch (err) {\n                    logger_1.logger.warn(\"onMediaDetaching:\" + err.message + \" while calling endOfStream\");\n                }\n            }\n            ms.removeEventListener('sourceopen', this.onmso);\n            ms.removeEventListener('sourceended', this.onmse);\n            ms.removeEventListener('sourceclose', this.onmsc);\n            // Detach properly the MediaSource from the HTMLMediaElement as\n            // suggested in https://github.com/w3c/media-source/issues/53.\n            if (this.media) {\n                window.URL.revokeObjectURL(this._objectUrl);\n                // clean up video tag src only if it's our own url. some external libraries might\n                // hijack the video tag and change its 'src' without destroying the Hls instance first\n                if (this.media.src === this._objectUrl) {\n                    this.media.removeAttribute('src');\n                    this.media.load();\n                }\n                else {\n                    logger_1.logger.warn('media.src was changed by a third party - skip cleanup');\n                }\n            }\n            this.mediaSource = null;\n            this.media = null;\n            this._objectUrl = null;\n            this.pendingTracks = {};\n            this.tracks = {};\n            this.sourceBuffer = {};\n            this.flushRange = [];\n            this.segments = [];\n            this.appended = 0;\n        }\n        this.onmso = this.onmse = this.onmsc = null;\n        this.hls.trigger(events_1.default.MEDIA_DETACHED);\n    };\n    BufferController.prototype.onMediaSourceOpen = function () {\n        logger_1.logger.log('media source opened');\n        this.hls.trigger(events_1.default.MEDIA_ATTACHED, { media: this.media });\n        var mediaSource = this.mediaSource;\n        if (mediaSource) {\n            // once received, don't listen anymore to sourceopen event\n            mediaSource.removeEventListener('sourceopen', this.onmso);\n        }\n        this.checkPendingTracks();\n    };\n    BufferController.prototype.checkPendingTracks = function () {\n        var _a = this, bufferCodecEventsExpected = _a.bufferCodecEventsExpected, pendingTracks = _a.pendingTracks;\n        // Check if we've received all of the expected bufferCodec events. When none remain, create all the sourceBuffers at once.\n        // This is important because the MSE spec allows implementations to throw QuotaExceededErrors if creating new sourceBuffers after\n        // data has been appended to existing ones.\n        // 2 tracks is the max (one for audio, one for video). If we've reach this max go ahead and create the buffers.\n        var pendingTracksCount = Object.keys(pendingTracks).length;\n        if ((pendingTracksCount && !bufferCodecEventsExpected) || pendingTracksCount === 2) {\n            // ok, let's create them now !\n            this.createSourceBuffers(pendingTracks);\n            this.pendingTracks = {};\n            // append any pending segments now !\n            this.doAppending();\n        }\n    };\n    BufferController.prototype.onMediaSourceClose = function () {\n        logger_1.logger.log('media source closed');\n    };\n    BufferController.prototype.onMediaSourceEnded = function () {\n        logger_1.logger.log('media source ended');\n    };\n    BufferController.prototype.onSBUpdateEnd = function () {\n        // update timestampOffset\n        if (this.audioTimestampOffset) {\n            var audioBuffer = this.sourceBuffer.audio;\n            logger_1.logger.warn(\"change mpeg audio timestamp offset from \" + audioBuffer.timestampOffset + \" to \" + this.audioTimestampOffset);\n            audioBuffer.timestampOffset = this.audioTimestampOffset;\n            delete this.audioTimestampOffset;\n        }\n        if (this._needsFlush) {\n            this.doFlush();\n        }\n        if (this._needsEos) {\n            this.checkEos();\n        }\n        this.appending = false;\n        var parent = this.parent;\n        // count nb of pending segments waiting for appending on this sourcebuffer\n        var pending = this.segments.reduce(function (counter, segment) { return (segment.parent === parent) ? counter + 1 : counter; }, 0);\n        // this.sourceBuffer is better to use than media.buffered as it is closer to the PTS data from the fragments\n        var timeRanges = {};\n        var sourceBuffer = this.sourceBuffer;\n        for (var streamType in sourceBuffer) {\n            timeRanges[streamType] = sourceBuffer[streamType].buffered;\n        }\n        this.hls.trigger(events_1.default.BUFFER_APPENDED, { parent: parent, pending: pending, timeRanges: timeRanges });\n        // don't append in flushing mode\n        if (!this._needsFlush) {\n            this.doAppending();\n        }\n        this.updateMediaElementDuration();\n        // appending goes first\n        if (pending === 0) {\n            this.flushLiveBackBuffer();\n        }\n    };\n    BufferController.prototype.onSBUpdateError = function (event) {\n        logger_1.logger.error('sourceBuffer error:', event);\n        // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n        // this error might not always be fatal (it is fatal if decode error is set, in that case\n        // it will be followed by a mediaElement error ...)\n        this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false });\n        // we don't need to do more than that, as accordin to the spec, updateend will be fired just after\n    };\n    BufferController.prototype.onBufferReset = function () {\n        var sourceBuffer = this.sourceBuffer;\n        for (var type in sourceBuffer) {\n            var sb = sourceBuffer[type];\n            try {\n                this.mediaSource.removeSourceBuffer(sb);\n                sb.removeEventListener('updateend', this.onsbue);\n                sb.removeEventListener('error', this.onsbe);\n            }\n            catch (err) {\n            }\n        }\n        this.sourceBuffer = {};\n        this.flushRange = [];\n        this.segments = [];\n        this.appended = 0;\n    };\n    BufferController.prototype.onBufferCodecs = function (tracks) {\n        var _this = this;\n        // if source buffer(s) not created yet, appended buffer tracks in this.pendingTracks\n        // if sourcebuffers already created, do nothing ...\n        if (Object.keys(this.sourceBuffer).length) {\n            return;\n        }\n        Object.keys(tracks).forEach(function (trackName) {\n            _this.pendingTracks[trackName] = tracks[trackName];\n        });\n        var mediaSource = this.mediaSource;\n        this.bufferCodecEventsExpected = Math.max(this.bufferCodecEventsExpected - 1, 0);\n        if (mediaSource && mediaSource.readyState === 'open') {\n            this.checkPendingTracks();\n        }\n    };\n    BufferController.prototype.createSourceBuffers = function (tracks) {\n        var sourceBuffer = this.sourceBuffer, mediaSource = this.mediaSource;\n        for (var trackName in tracks) {\n            if (!sourceBuffer[trackName]) {\n                var track = tracks[trackName];\n                // use levelCodec as first priority\n                var codec = track.levelCodec || track.codec;\n                var mimeType = track.container + \";codecs=\" + codec;\n                logger_1.logger.log(\"creating sourceBuffer(\" + mimeType + \")\");\n                try {\n                    var sb = sourceBuffer[trackName] = mediaSource.addSourceBuffer(mimeType);\n                    sb.addEventListener('updateend', this.onsbue);\n                    sb.addEventListener('error', this.onsbe);\n                    this.tracks[trackName] = { codec: codec, container: track.container };\n                    track.buffer = sb;\n                }\n                catch (err) {\n                    logger_1.logger.error(\"error while trying to add sourceBuffer:\" + err.message);\n                    this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.BUFFER_ADD_CODEC_ERROR, fatal: false, err: err, mimeType: mimeType });\n                }\n            }\n        }\n        this.hls.trigger(events_1.default.BUFFER_CREATED, { tracks: tracks });\n    };\n    BufferController.prototype.onBufferAppending = function (data) {\n        if (!this._needsFlush) {\n            if (!this.segments) {\n                this.segments = [data];\n            }\n            else {\n                this.segments.push(data);\n            }\n            this.doAppending();\n        }\n    };\n    BufferController.prototype.onBufferAppendFail = function (data) {\n        logger_1.logger.error('sourceBuffer error:', data.event);\n        // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n        // this error might not always be fatal (it is fatal if decode error is set, in that case\n        // it will be followed by a mediaElement error ...)\n        this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false });\n    };\n    // on BUFFER_EOS mark matching sourcebuffer(s) as ended and trigger checkEos()\n    BufferController.prototype.onBufferEos = function (data) {\n        var sb = this.sourceBuffer;\n        var dataType = data.type;\n        for (var type in sb) {\n            if (!dataType || type === dataType) {\n                if (!sb[type].ended) {\n                    sb[type].ended = true;\n                    logger_1.logger.log(type + \" sourceBuffer now EOS\");\n                }\n            }\n        }\n        this.checkEos();\n    };\n    // if all source buffers are marked as ended, signal endOfStream() to MediaSource.\n    BufferController.prototype.checkEos = function () {\n        var sb = this.sourceBuffer, mediaSource = this.mediaSource;\n        if (!mediaSource || mediaSource.readyState !== 'open') {\n            this._needsEos = false;\n            return;\n        }\n        for (var type in sb) {\n            var sbobj = sb[type];\n            if (!sbobj.ended) {\n                return;\n            }\n            if (sbobj.updating) {\n                this._needsEos = true;\n                return;\n            }\n        }\n        logger_1.logger.log('all media data are available, signal endOfStream() to MediaSource and stop loading fragment');\n        // Notify the media element that it now has all of the media data\n        try {\n            mediaSource.endOfStream();\n        }\n        catch (e) {\n            logger_1.logger.warn('exception while calling mediaSource.endOfStream()');\n        }\n        this._needsEos = false;\n    };\n    BufferController.prototype.onBufferFlushing = function (data) {\n        this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: data.type });\n        // attempt flush immediately\n        this.flushBufferCounter = 0;\n        this.doFlush();\n    };\n    BufferController.prototype.flushLiveBackBuffer = function () {\n        // clear back buffer for live only\n        if (!this._live) {\n            return;\n        }\n        var liveBackBufferLength = this.hls.config.liveBackBufferLength;\n        if (!isFinite(liveBackBufferLength) || liveBackBufferLength < 0) {\n            return;\n        }\n        var currentTime = this.media.currentTime;\n        var sourceBuffer = this.sourceBuffer;\n        var bufferTypes = Object.keys(sourceBuffer);\n        var targetBackBufferPosition = currentTime - Math.max(liveBackBufferLength, this._levelTargetDuration);\n        for (var index = bufferTypes.length - 1; index >= 0; index--) {\n            var bufferType = bufferTypes[index], buffered = sourceBuffer[bufferType].buffered;\n            // when target buffer start exceeds actual buffer start\n            if (buffered.length > 0 && targetBackBufferPosition > buffered.start(0)) {\n                // remove buffer up until current time minus minimum back buffer length (removing buffer too close to current\n                // time will lead to playback freezing)\n                // credits for level target duration - https://github.com/videojs/http-streaming/blob/3132933b6aa99ddefab29c10447624efd6fd6e52/src/segment-loader.js#L91\n                this.removeBufferRange(bufferType, sourceBuffer[bufferType], 0, targetBackBufferPosition);\n            }\n        }\n    };\n    BufferController.prototype.onLevelUpdated = function (_a) {\n        var details = _a.details;\n        if (details.fragments.length > 0) {\n            this._levelDuration = details.totalduration + details.fragments[0].start;\n            this._levelTargetDuration = details.averagetargetduration || details.targetduration || 10;\n            this._live = details.live;\n            this.updateMediaElementDuration();\n        }\n    };\n    /**\n     * Update Media Source duration to current level duration or override to Infinity if configuration parameter\n     * 'liveDurationInfinity` is set to `true`\n     * More details: https://github.com/video-dev/hls.js/issues/355\n     */\n    BufferController.prototype.updateMediaElementDuration = function () {\n        var config = this.hls.config;\n        var duration;\n        if (this._levelDuration === null ||\n            !this.media ||\n            !this.mediaSource ||\n            !this.sourceBuffer ||\n            this.media.readyState === 0 ||\n            this.mediaSource.readyState !== 'open') {\n            return;\n        }\n        for (var type in this.sourceBuffer) {\n            if (this.sourceBuffer[type].updating === true) {\n                // can't set duration whilst a buffer is updating\n                return;\n            }\n        }\n        duration = this.media.duration;\n        // initialise to the value that the media source is reporting\n        if (this._msDuration === null) {\n            this._msDuration = this.mediaSource.duration;\n        }\n        if (this._live === true && config.liveDurationInfinity === true) {\n            // Override duration to Infinity\n            logger_1.logger.log('Media Source duration is set to Infinity');\n            this._msDuration = this.mediaSource.duration = Infinity;\n        }\n        else if ((this._levelDuration > this._msDuration && this._levelDuration > duration) || !Number.isFinite(duration)) {\n            // levelDuration was the last value we set.\n            // not using mediaSource.duration as the browser may tweak this value\n            // only update Media Source duration if its value increase, this is to avoid\n            // flushing already buffered portion when switching between quality level\n            logger_1.logger.log(\"Updating Media Source duration to \" + this._levelDuration.toFixed(3));\n            this._msDuration = this.mediaSource.duration = this._levelDuration;\n        }\n    };\n    BufferController.prototype.doFlush = function () {\n        // loop through all buffer ranges to flush\n        while (this.flushRange.length) {\n            var range = this.flushRange[0];\n            // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer\n            if (this.flushBuffer(range.start, range.end, range.type)) {\n                // range flushed, remove from flush array\n                this.flushRange.shift();\n                this.flushBufferCounter = 0;\n            }\n            else {\n                this._needsFlush = true;\n                // avoid looping, wait for SB update end to retrigger a flush\n                return;\n            }\n        }\n        if (this.flushRange.length === 0) {\n            // everything flushed\n            this._needsFlush = false;\n            // let's recompute this.appended, which is used to avoid flush looping\n            var appended = 0;\n            var sourceBuffer = this.sourceBuffer;\n            try {\n                for (var type in sourceBuffer) {\n                    appended += sourceBuffer[type].buffered.length;\n                }\n            }\n            catch (error) {\n                // error could be thrown while accessing buffered, in case sourcebuffer has already been removed from MediaSource\n                // this is harmess at this stage, catch this to avoid reporting an internal exception\n                logger_1.logger.error('error while accessing sourceBuffer.buffered');\n            }\n            this.appended = appended;\n            this.hls.trigger(events_1.default.BUFFER_FLUSHED);\n        }\n    };\n    BufferController.prototype.doAppending = function () {\n        var _a = this, hls = _a.hls, segments = _a.segments, sourceBuffer = _a.sourceBuffer;\n        if (Object.keys(sourceBuffer).length) {\n            if (this.media.error) {\n                this.segments = [];\n                logger_1.logger.error('trying to append although a media error occured, flush segment and abort');\n                return;\n            }\n            if (this.appending) {\n                // logger.log(`sb appending in progress`);\n                return;\n            }\n            if (segments && segments.length) {\n                var segment = segments.shift();\n                try {\n                    var type = segment.type, sb = sourceBuffer[type];\n                    if (sb) {\n                        if (!sb.updating) {\n                            // reset sourceBuffer ended flag before appending segment\n                            sb.ended = false;\n                            // logger.log(`appending ${segment.content} ${type} SB, size:${segment.data.length}, ${segment.parent}`);\n                            this.parent = segment.parent;\n                            sb.appendBuffer(segment.data);\n                            this.appendError = 0;\n                            this.appended++;\n                            this.appending = true;\n                        }\n                        else {\n                            segments.unshift(segment);\n                        }\n                    }\n                    else {\n                        // in case we don't have any source buffer matching with this segment type,\n                        // it means that Mediasource fails to create sourcebuffer\n                        // discard this segment, and trigger update end\n                        this.onSBUpdateEnd();\n                    }\n                }\n                catch (err) {\n                    // in case any error occured while appending, put back segment in segments table\n                    logger_1.logger.error(\"error while trying to append buffer:\" + err.message);\n                    segments.unshift(segment);\n                    var event_1 = { type: errors_1.ErrorTypes.MEDIA_ERROR, parent: segment.parent };\n                    if (err.code !== 22) {\n                        if (this.appendError) {\n                            this.appendError++;\n                        }\n                        else {\n                            this.appendError = 1;\n                        }\n                        event_1.details = errors_1.ErrorDetails.BUFFER_APPEND_ERROR;\n                        /* with UHD content, we could get loop of quota exceeded error until\n                          browser is able to evict some data from sourcebuffer. retrying help recovering this\n                        */\n                        if (this.appendError > hls.config.appendErrorMaxRetry) {\n                            logger_1.logger.log(\"fail \" + hls.config.appendErrorMaxRetry + \" times to append segment in sourceBuffer\");\n                            this.segments = [];\n                            event_1.fatal = true;\n                            hls.trigger(events_1.default.ERROR, event_1);\n                        }\n                        else {\n                            event_1.fatal = false;\n                            hls.trigger(events_1.default.ERROR, event_1);\n                        }\n                    }\n                    else {\n                        // QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror\n                        // let's stop appending any segments, and report BUFFER_FULL_ERROR error\n                        this.segments = [];\n                        event_1.details = errors_1.ErrorDetails.BUFFER_FULL_ERROR;\n                        event_1.fatal = false;\n                        hls.trigger(events_1.default.ERROR, event_1);\n                    }\n                }\n            }\n        }\n    };\n    /*\n      flush specified buffered range,\n      return true once range has been flushed.\n      as sourceBuffer.remove() is asynchronous, flushBuffer will be retriggered on sourceBuffer update end\n    */\n    BufferController.prototype.flushBuffer = function (startOffset, endOffset, typeIn) {\n        var sb;\n        var sourceBuffer = this.sourceBuffer;\n        if (Object.keys(sourceBuffer).length) {\n            logger_1.logger.log(\"flushBuffer,pos/start/end: \" + this.media.currentTime.toFixed(3) + \"/\" + startOffset + \"/\" + endOffset);\n            // safeguard to avoid infinite looping : don't try to flush more than the nb of appended segments\n            if (this.flushBufferCounter < this.appended) {\n                for (var type in sourceBuffer) {\n                    // check if sourcebuffer type is defined (typeIn): if yes, let's only flush this one\n                    // if no, let's flush all sourcebuffers\n                    if (typeIn && type !== typeIn) {\n                        continue;\n                    }\n                    sb = sourceBuffer[type];\n                    // we are going to flush buffer, mark source buffer as 'not ended'\n                    sb.ended = false;\n                    if (!sb.updating) {\n                        if (this.removeBufferRange(type, sb, startOffset, endOffset)) {\n                            this.flushBufferCounter++;\n                            return false;\n                        }\n                    }\n                    else {\n                        logger_1.logger.warn('cannot flush, sb updating in progress');\n                        return false;\n                    }\n                }\n            }\n            else {\n                logger_1.logger.warn('abort flushing too many retries');\n            }\n            logger_1.logger.log('buffer flushed');\n        }\n        // everything flushed !\n        return true;\n    };\n    /**\n     * Removes first buffered range from provided source buffer that lies within given start and end offsets.\n     *\n     * @param type Type of the source buffer, logging purposes only.\n     * @param sb Target SourceBuffer instance.\n     * @param startOffset\n     * @param endOffset\n     *\n     * @returns {boolean} True when source buffer remove requested.\n     */\n    BufferController.prototype.removeBufferRange = function (type, sb, startOffset, endOffset) {\n        try {\n            for (var i = 0; i < sb.buffered.length; i++) {\n                var bufStart = sb.buffered.start(i);\n                var bufEnd = sb.buffered.end(i);\n                var removeStart = Math.max(bufStart, startOffset);\n                var removeEnd = Math.min(bufEnd, endOffset);\n                /* sometimes sourcebuffer.remove() does not flush\n                  the exact expected time range.\n                  to avoid rounding issues/infinite loop,\n                  only flush buffer range of length greater than 500ms.\n                */\n                if (Math.min(removeEnd, bufEnd) - removeStart > 0.5) {\n                    logger_1.logger.log(\"sb remove \" + type + \" [\" + removeStart + \",\" + removeEnd + \"], of [\" + bufStart + \",\" + bufEnd + \"], pos:\" + this.media.currentTime);\n                    sb.remove(removeStart, removeEnd);\n                    return true;\n                }\n            }\n        }\n        catch (error) {\n            logger_1.logger.warn('removeBufferRange failed', error);\n        }\n        return false;\n    };\n    return BufferController;\n}(event_handler_1.default));\nexports.default = BufferController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/cap-level-controller.js\":\n/*!************************************************!*\\\n  !*** ./src/controller/cap-level-controller.js ***!\n  \\************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * cap stream level to media size dimension controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar CapLevelController = /** @class */ (function (_super) {\n    __extends(CapLevelController, _super);\n    function CapLevelController(hls) {\n        var _this = _super.call(this, hls, events_1.default.FPS_DROP_LEVEL_CAPPING, events_1.default.MEDIA_ATTACHING, events_1.default.MANIFEST_PARSED, events_1.default.BUFFER_CODECS, events_1.default.MEDIA_DETACHING) || this;\n        _this.autoLevelCapping = Number.POSITIVE_INFINITY;\n        _this.firstLevel = null;\n        _this.levels = [];\n        _this.media = null;\n        _this.restrictedLevels = [];\n        _this.timer = null;\n        return _this;\n    }\n    CapLevelController.prototype.destroy = function () {\n        if (this.hls.config.capLevelToPlayerSize) {\n            this.media = null;\n            this._stopCapping();\n        }\n    };\n    CapLevelController.prototype.onFpsDropLevelCapping = function (data) {\n        // Don't add a restricted level more than once\n        if (CapLevelController.isLevelAllowed(data.droppedLevel, this.restrictedLevels)) {\n            this.restrictedLevels.push(data.droppedLevel);\n        }\n    };\n    CapLevelController.prototype.onMediaAttaching = function (data) {\n        this.media = data.media instanceof window.HTMLVideoElement ? data.media : null;\n    };\n    CapLevelController.prototype.onManifestParsed = function (data) {\n        var hls = this.hls;\n        this.restrictedLevels = [];\n        this.levels = data.levels;\n        this.firstLevel = data.firstLevel;\n        if (hls.config.capLevelToPlayerSize && data.video) {\n            // Start capping immediately if the manifest has signaled video codecs\n            this._startCapping();\n        }\n    };\n    // Only activate capping when playing a video stream; otherwise, multi-bitrate audio-only streams will be restricted\n    // to the first level\n    CapLevelController.prototype.onBufferCodecs = function (data) {\n        var hls = this.hls;\n        if (hls.config.capLevelToPlayerSize && data.video) {\n            // If the manifest did not signal a video codec capping has been deferred until we're certain video is present\n            this._startCapping();\n        }\n    };\n    CapLevelController.prototype.onLevelsUpdated = function (data) {\n        this.levels = data.levels;\n    };\n    CapLevelController.prototype.onMediaDetaching = function () {\n        this._stopCapping();\n    };\n    CapLevelController.prototype.detectPlayerSize = function () {\n        if (this.media) {\n            var levelsLength = this.levels ? this.levels.length : 0;\n            if (levelsLength) {\n                var hls_1 = this.hls;\n                hls_1.autoLevelCapping = this.getMaxLevel(levelsLength - 1);\n                if (hls_1.autoLevelCapping > this.autoLevelCapping) {\n                    // if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch\n                    // usually happen when the user go to the fullscreen mode.\n                    hls_1.streamController.nextLevelSwitch();\n                }\n                this.autoLevelCapping = hls_1.autoLevelCapping;\n            }\n        }\n    };\n    /*\n    * returns level should be the one with the dimensions equal or greater than the media (player) dimensions (so the video will be downscaled)\n    */\n    CapLevelController.prototype.getMaxLevel = function (capLevelIndex) {\n        var _this = this;\n        if (!this.levels) {\n            return -1;\n        }\n        var validLevels = this.levels.filter(function (level, index) {\n            return CapLevelController.isLevelAllowed(index, _this.restrictedLevels) && index <= capLevelIndex;\n        });\n        return CapLevelController.getMaxLevelByMediaSize(validLevels, this.mediaWidth, this.mediaHeight);\n    };\n    CapLevelController.prototype._startCapping = function () {\n        if (this.timer) {\n            // Don't reset capping if started twice; this can happen if the manifest signals a video codec\n            return;\n        }\n        this.autoLevelCapping = Number.POSITIVE_INFINITY;\n        this.hls.firstLevel = this.getMaxLevel(this.firstLevel);\n        clearInterval(this.timer);\n        this.timer = setInterval(this.detectPlayerSize.bind(this), 1000);\n        this.detectPlayerSize();\n    };\n    CapLevelController.prototype._stopCapping = function () {\n        this.restrictedLevels = [];\n        this.firstLevel = null;\n        this.autoLevelCapping = Number.POSITIVE_INFINITY;\n        if (this.timer) {\n            this.timer = clearInterval(this.timer);\n            this.timer = null;\n        }\n    };\n    Object.defineProperty(CapLevelController.prototype, \"mediaWidth\", {\n        get: function () {\n            var width;\n            var media = this.media;\n            if (media) {\n                width = media.width || media.clientWidth || media.offsetWidth;\n                width *= CapLevelController.contentScaleFactor;\n            }\n            return width;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(CapLevelController.prototype, \"mediaHeight\", {\n        get: function () {\n            var height;\n            var media = this.media;\n            if (media) {\n                height = media.height || media.clientHeight || media.offsetHeight;\n                height *= CapLevelController.contentScaleFactor;\n            }\n            return height;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(CapLevelController, \"contentScaleFactor\", {\n        get: function () {\n            var pixelRatio = 1;\n            try {\n                pixelRatio = window.devicePixelRatio;\n            }\n            catch (e) { }\n            return pixelRatio;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    CapLevelController.isLevelAllowed = function (level, restrictedLevels) {\n        if (restrictedLevels === void 0) { restrictedLevels = []; }\n        return restrictedLevels.indexOf(level) === -1;\n    };\n    CapLevelController.getMaxLevelByMediaSize = function (levels, width, height) {\n        if (!levels || (levels && !levels.length)) {\n            return -1;\n        }\n        // Levels can have the same dimensions but differing bandwidths - since levels are ordered, we can look to the next\n        // to determine whether we've chosen the greatest bandwidth for the media's dimensions\n        var atGreatestBandiwdth = function (curLevel, nextLevel) {\n            if (!nextLevel) {\n                return true;\n            }\n            return curLevel.width !== nextLevel.width || curLevel.height !== nextLevel.height;\n        };\n        // If we run through the loop without breaking, the media's dimensions are greater than every level, so default to\n        // the max level\n        var maxLevelIndex = levels.length - 1;\n        for (var i = 0; i < levels.length; i += 1) {\n            var level = levels[i];\n            if ((level.width >= width || level.height >= height) && atGreatestBandiwdth(level, levels[i + 1])) {\n                maxLevelIndex = i;\n                break;\n            }\n        }\n        return maxLevelIndex;\n    };\n    return CapLevelController;\n}(event_handler_1.default));\nexports.default = CapLevelController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/eme-controller.js\":\n/*!******************************************!*\\\n  !*** ./src/controller/eme-controller.js ***!\n  \\******************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @author Stephan Hesse <disparat@gmail.com> | <tchakabam@gmail.com>\n *\n * DRM support for Hls.js\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar XMLHttpRequest = window.XMLHttpRequest;\nvar MAX_LICENSE_REQUEST_FAILURES = 3;\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess\n */\nvar KeySystems = {\n    WIDEVINE: 'com.widevine.alpha',\n    PLAYREADY: 'com.microsoft.playready'\n};\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySystemConfiguration\n * @param {Array<string>} audioCodecs List of required audio codecs to support\n * @param {Array<string>} videoCodecs List of required video codecs to support\n * @param {object} drmSystemOptions Optional parameters/requirements for the key-system\n * @returns {Array<MediaSystemConfiguration>} An array of supported configurations\n */\nvar createWidevineMediaKeySystemConfigurations = function (audioCodecs, videoCodecs, drmSystemOptions) {\n    var baseConfig = {\n        // initDataTypes: ['keyids', 'mp4'],\n        // label: \"\",\n        // persistentState: \"not-allowed\", // or \"required\" ?\n        // distinctiveIdentifier: \"not-allowed\", // or \"required\" ?\n        // sessionTypes: ['temporary'],\n        videoCapabilities: [\n        // { contentType: 'video/mp4; codecs=\"avc1.42E01E\"' }\n        ]\n    };\n    videoCodecs.forEach(function (codec) {\n        baseConfig.videoCapabilities.push({\n            contentType: \"video/mp4; codecs=\\\"\" + codec + \"\\\"\"\n        });\n    });\n    return [\n        baseConfig\n    ];\n};\n/**\n * The idea here is to handle key-system (and their respective platforms) specific configuration differences\n * in order to work with the local requestMediaKeySystemAccess method.\n *\n * We can also rule-out platform-related key-system support at this point by throwing an error or returning null.\n *\n * @param {string} keySystem Identifier for the key-system, see `KeySystems` enum\n * @param {Array<string>} audioCodecs List of required audio codecs to support\n * @param {Array<string>} videoCodecs List of required video codecs to support\n * @returns {Array<MediaSystemConfiguration> | null} A non-empty Array of MediaKeySystemConfiguration objects or `null`\n */\nvar getSupportedMediaKeySystemConfigurations = function (keySystem, audioCodecs, videoCodecs) {\n    switch (keySystem) {\n        case KeySystems.WIDEVINE:\n            return createWidevineMediaKeySystemConfigurations(audioCodecs, videoCodecs);\n        default:\n            throw Error('Unknown key-system: ' + keySystem);\n    }\n};\n/**\n * Controller to deal with encrypted media extensions (EME)\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API\n *\n * @class\n * @constructor\n */\nvar EMEController = /** @class */ (function (_super) {\n    __extends(EMEController, _super);\n    /**\n       * @constructs\n       * @param {Hls} hls Our Hls.js instance\n       */\n    function EMEController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHED, events_1.default.MANIFEST_PARSED) || this;\n        _this._widevineLicenseUrl = hls.config.widevineLicenseUrl;\n        _this._licenseXhrSetup = hls.config.licenseXhrSetup;\n        _this._emeEnabled = hls.config.emeEnabled;\n        _this._requestMediaKeySystemAccess = hls.config.requestMediaKeySystemAccessFunc;\n        _this._mediaKeysList = [];\n        _this._media = null;\n        _this._hasSetMediaKeys = false;\n        _this._isMediaEncrypted = false;\n        _this._requestLicenseFailureCount = 0;\n        return _this;\n    }\n    /**\n       *\n       * @param {string} keySystem Identifier for the key-system, see `KeySystems` enum\n       * @returns {string} License server URL for key-system (if any configured, otherwise causes error)\n       */\n    EMEController.prototype.getLicenseServerUrl = function (keySystem) {\n        var url;\n        switch (keySystem) {\n            case KeySystems.WIDEVINE:\n                url = this._widevineLicenseUrl;\n                break;\n            default:\n                url = null;\n                break;\n        }\n        if (!url) {\n            logger_1.logger.error(\"No license server URL configured for key-system \\\"\" + keySystem + \"\\\"\");\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                details: errors_1.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,\n                fatal: true\n            });\n        }\n        return url;\n    };\n    /**\n       * Requests access object and adds it to our list upon success\n       * @private\n       * @param {string} keySystem System ID (see `KeySystems`)\n       * @param {Array<string>} audioCodecs List of required audio codecs to support\n       * @param {Array<string>} videoCodecs List of required video codecs to support\n       */\n    EMEController.prototype._attemptKeySystemAccess = function (keySystem, audioCodecs, videoCodecs) {\n        // TODO: add other DRM \"options\"\n        var _this = this;\n        var mediaKeySystemConfigs = getSupportedMediaKeySystemConfigurations(keySystem, audioCodecs, videoCodecs);\n        if (!mediaKeySystemConfigs) {\n            logger_1.logger.warn('Can not create config for key-system (maybe because platform is not supported):', keySystem);\n            return;\n        }\n        logger_1.logger.log('Requesting encrypted media key-system access');\n        // expecting interface like window.navigator.requestMediaKeySystemAccess\n        this.requestMediaKeySystemAccess(keySystem, mediaKeySystemConfigs)\n            .then(function (mediaKeySystemAccess) {\n            _this._onMediaKeySystemAccessObtained(keySystem, mediaKeySystemAccess);\n        })\n            .catch(function (err) {\n            logger_1.logger.error(\"Failed to obtain key-system \\\"\" + keySystem + \"\\\" access:\", err);\n        });\n    };\n    Object.defineProperty(EMEController.prototype, \"requestMediaKeySystemAccess\", {\n        get: function () {\n            if (!this._requestMediaKeySystemAccess) {\n                throw new Error('No requestMediaKeySystemAccess function configured');\n            }\n            return this._requestMediaKeySystemAccess;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n       * Handles obtaining access to a key-system\n       *\n       * @param {string} keySystem\n       * @param {MediaKeySystemAccess} mediaKeySystemAccess https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySystemAccess\n       */\n    EMEController.prototype._onMediaKeySystemAccessObtained = function (keySystem, mediaKeySystemAccess) {\n        var _this = this;\n        logger_1.logger.log(\"Access for key-system \\\"\" + keySystem + \"\\\" obtained\");\n        var mediaKeysListItem = {\n            mediaKeys: null,\n            mediaKeysSession: null,\n            mediaKeysSessionInitialized: false,\n            mediaKeySystemAccess: mediaKeySystemAccess,\n            mediaKeySystemDomain: keySystem\n        };\n        this._mediaKeysList.push(mediaKeysListItem);\n        mediaKeySystemAccess.createMediaKeys()\n            .then(function (mediaKeys) {\n            mediaKeysListItem.mediaKeys = mediaKeys;\n            logger_1.logger.log(\"Media-keys created for key-system \\\"\" + keySystem + \"\\\"\");\n            _this._onMediaKeysCreated();\n        })\n            .catch(function (err) {\n            logger_1.logger.error('Failed to create media-keys:', err);\n        });\n    };\n    /**\n       * Handles key-creation (represents access to CDM). We are going to create key-sessions upon this\n       * for all existing keys where no session exists yet.\n       */\n    EMEController.prototype._onMediaKeysCreated = function () {\n        var _this = this;\n        // check for all key-list items if a session exists, otherwise, create one\n        this._mediaKeysList.forEach(function (mediaKeysListItem) {\n            if (!mediaKeysListItem.mediaKeysSession) {\n                mediaKeysListItem.mediaKeysSession = mediaKeysListItem.mediaKeys.createSession();\n                _this._onNewMediaKeySession(mediaKeysListItem.mediaKeysSession);\n            }\n        });\n    };\n    /**\n       *\n       * @param {*} keySession\n       */\n    EMEController.prototype._onNewMediaKeySession = function (keySession) {\n        var _this = this;\n        logger_1.logger.log(\"New key-system session \" + keySession.sessionId);\n        keySession.addEventListener('message', function (event) {\n            _this._onKeySessionMessage(keySession, event.message);\n        }, false);\n    };\n    EMEController.prototype._onKeySessionMessage = function (keySession, message) {\n        logger_1.logger.log('Got EME message event, creating license request');\n        this._requestLicense(message, function (data) {\n            logger_1.logger.log('Received license data, updating key-session');\n            keySession.update(data);\n        });\n    };\n    EMEController.prototype._onMediaEncrypted = function (initDataType, initData) {\n        logger_1.logger.log(\"Media is encrypted using \\\"\" + initDataType + \"\\\" init data type\");\n        this._isMediaEncrypted = true;\n        this._mediaEncryptionInitDataType = initDataType;\n        this._mediaEncryptionInitData = initData;\n        this._attemptSetMediaKeys();\n        this._generateRequestWithPreferredKeySession();\n    };\n    EMEController.prototype._attemptSetMediaKeys = function () {\n        if (!this._hasSetMediaKeys) {\n            // FIXME: see if we can/want/need-to really to deal with several potential key-sessions?\n            var keysListItem = this._mediaKeysList[0];\n            if (!keysListItem || !keysListItem.mediaKeys) {\n                logger_1.logger.error('Fatal: Media is encrypted but no CDM access or no keys have been obtained yet');\n                this.hls.trigger(events_1.default.ERROR, {\n                    type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                    details: errors_1.ErrorDetails.KEY_SYSTEM_NO_KEYS,\n                    fatal: true\n                });\n                return;\n            }\n            logger_1.logger.log('Setting keys for encrypted media');\n            this._media.setMediaKeys(keysListItem.mediaKeys);\n            this._hasSetMediaKeys = true;\n        }\n    };\n    EMEController.prototype._generateRequestWithPreferredKeySession = function () {\n        var _this = this;\n        // FIXME: see if we can/want/need-to really to deal with several potential key-sessions?\n        var keysListItem = this._mediaKeysList[0];\n        if (!keysListItem) {\n            logger_1.logger.error('Fatal: Media is encrypted but not any key-system access has been obtained yet');\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                details: errors_1.ErrorDetails.KEY_SYSTEM_NO_ACCESS,\n                fatal: true\n            });\n            return;\n        }\n        if (keysListItem.mediaKeysSessionInitialized) {\n            logger_1.logger.warn('Key-Session already initialized but requested again');\n            return;\n        }\n        var keySession = keysListItem.mediaKeysSession;\n        if (!keySession) {\n            logger_1.logger.error('Fatal: Media is encrypted but no key-session existing');\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                details: errors_1.ErrorDetails.KEY_SYSTEM_NO_SESSION,\n                fatal: true\n            });\n        }\n        var initDataType = this._mediaEncryptionInitDataType;\n        var initData = this._mediaEncryptionInitData;\n        logger_1.logger.log(\"Generating key-session request for \\\"\" + initDataType + \"\\\" init data type\");\n        keysListItem.mediaKeysSessionInitialized = true;\n        keySession.generateRequest(initDataType, initData)\n            .then(function () {\n            logger_1.logger.debug('Key-session generation succeeded');\n        })\n            .catch(function (err) {\n            logger_1.logger.error('Error generating key-session request:', err);\n            _this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                details: errors_1.ErrorDetails.KEY_SYSTEM_NO_SESSION,\n                fatal: false\n            });\n        });\n    };\n    /**\n       * @param {string} url License server URL\n       * @param {ArrayBuffer} keyMessage Message data issued by key-system\n       * @param {function} callback Called when XHR has succeeded\n       * @returns {XMLHttpRequest} Unsent (but opened state) XHR object\n       */\n    EMEController.prototype._createLicenseXhr = function (url, keyMessage, callback) {\n        var xhr = new XMLHttpRequest();\n        var licenseXhrSetup = this._licenseXhrSetup;\n        try {\n            if (licenseXhrSetup) {\n                try {\n                    licenseXhrSetup(xhr, url);\n                }\n                catch (e) {\n                    // let's try to open before running setup\n                    xhr.open('POST', url, true);\n                    licenseXhrSetup(xhr, url);\n                }\n            }\n            // if licenseXhrSetup did not yet call open, let's do it now\n            if (!xhr.readyState) {\n                xhr.open('POST', url, true);\n            }\n        }\n        catch (e) {\n            // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS\n            logger_1.logger.error('Error setting up key-system license XHR', e);\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                details: errors_1.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,\n                fatal: true\n            });\n            return;\n        }\n        xhr.responseType = 'arraybuffer';\n        xhr.onreadystatechange =\n            this._onLicenseRequestReadyStageChange.bind(this, xhr, url, keyMessage, callback);\n        return xhr;\n    };\n    /**\n       * @param {XMLHttpRequest} xhr\n       * @param {string} url License server URL\n       * @param {ArrayBuffer} keyMessage Message data issued by key-system\n       * @param {function} callback Called when XHR has succeeded\n       *\n       */\n    EMEController.prototype._onLicenseRequestReadyStageChange = function (xhr, url, keyMessage, callback) {\n        switch (xhr.readyState) {\n            case 4:\n                if (xhr.status === 200) {\n                    this._requestLicenseFailureCount = 0;\n                    logger_1.logger.log('License request succeeded');\n                    callback(xhr.response);\n                }\n                else {\n                    logger_1.logger.error(\"License Request XHR failed (\" + url + \"). Status: \" + xhr.status + \" (\" + xhr.statusText + \")\");\n                    this._requestLicenseFailureCount++;\n                    if (this._requestLicenseFailureCount <= MAX_LICENSE_REQUEST_FAILURES) {\n                        var attemptsLeft = MAX_LICENSE_REQUEST_FAILURES - this._requestLicenseFailureCount + 1;\n                        logger_1.logger.warn(\"Retrying license request, \" + attemptsLeft + \" attempts left\");\n                        this._requestLicense(keyMessage, callback);\n                        return;\n                    }\n                    this.hls.trigger(events_1.default.ERROR, {\n                        type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                        details: errors_1.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,\n                        fatal: true\n                    });\n                }\n                break;\n        }\n    };\n    /**\n       * @param {object} keysListItem\n       * @param {ArrayBuffer} keyMessage\n       * @returns {ArrayBuffer} Challenge data posted to license server\n       */\n    EMEController.prototype._generateLicenseRequestChallenge = function (keysListItem, keyMessage) {\n        var challenge;\n        if (keysListItem.mediaKeySystemDomain === KeySystems.PLAYREADY) {\n            logger_1.logger.error('PlayReady is not supported (yet)');\n            // from https://github.com/MicrosoftEdge/Demos/blob/master/eme/scripts/demo.js\n            /*\n              if (this.licenseType !== this.LICENSE_TYPE_WIDEVINE) {\n                  // For PlayReady CDMs, we need to dig the Challenge out of the XML.\n                  var keyMessageXml = new DOMParser().parseFromString(String.fromCharCode.apply(null, new Uint16Array(keyMessage)), 'application/xml');\n                  if (keyMessageXml.getElementsByTagName('Challenge')[0]) {\n                      challenge = atob(keyMessageXml.getElementsByTagName('Challenge')[0].childNodes[0].nodeValue);\n                  } else {\n                      throw 'Cannot find <Challenge> in key message';\n                  }\n                  var headerNames = keyMessageXml.getElementsByTagName('name');\n                  var headerValues = keyMessageXml.getElementsByTagName('value');\n                  if (headerNames.length !== headerValues.length) {\n                      throw 'Mismatched header <name>/<value> pair in key message';\n                  }\n                  for (var i = 0; i < headerNames.length; i++) {\n                      xhr.setRequestHeader(headerNames[i].childNodes[0].nodeValue, headerValues[i].childNodes[0].nodeValue);\n                  }\n              }\n              */\n        }\n        else if (keysListItem.mediaKeySystemDomain === KeySystems.WIDEVINE) {\n            // For Widevine CDMs, the challenge is the keyMessage.\n            challenge = keyMessage;\n        }\n        else {\n            logger_1.logger.error('Unsupported key-system:', keysListItem.mediaKeySystemDomain);\n        }\n        return challenge;\n    };\n    EMEController.prototype._requestLicense = function (keyMessage, callback) {\n        logger_1.logger.log('Requesting content license for key-system');\n        var keysListItem = this._mediaKeysList[0];\n        if (!keysListItem) {\n            logger_1.logger.error('Fatal error: Media is encrypted but no key-system access has been obtained yet');\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.KEY_SYSTEM_ERROR,\n                details: errors_1.ErrorDetails.KEY_SYSTEM_NO_ACCESS,\n                fatal: true\n            });\n            return;\n        }\n        var url = this.getLicenseServerUrl(keysListItem.mediaKeySystemDomain);\n        var xhr = this._createLicenseXhr(url, keyMessage, callback);\n        logger_1.logger.log(\"Sending license request to URL: \" + url);\n        xhr.send(this._generateLicenseRequestChallenge(keysListItem, keyMessage));\n    };\n    EMEController.prototype.onMediaAttached = function (data) {\n        var _this = this;\n        if (!this._emeEnabled) {\n            return;\n        }\n        var media = data.media;\n        // keep reference of media\n        this._media = media;\n        // FIXME: also handle detaching media !\n        media.addEventListener('encrypted', function (e) {\n            _this._onMediaEncrypted(e.initDataType, e.initData);\n        });\n    };\n    EMEController.prototype.onManifestParsed = function (data) {\n        if (!this._emeEnabled) {\n            return;\n        }\n        var audioCodecs = data.levels.map(function (level) { return level.audioCodec; });\n        var videoCodecs = data.levels.map(function (level) { return level.videoCodec; });\n        this._attemptKeySystemAccess(KeySystems.WIDEVINE, audioCodecs, videoCodecs);\n    };\n    return EMEController;\n}(event_handler_1.default));\nexports.default = EMEController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/fps-controller.js\":\n/*!******************************************!*\\\n  !*** ./src/controller/fps-controller.js ***!\n  \\******************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * FPS Controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar performance = window.performance;\nvar FPSController = /** @class */ (function (_super) {\n    __extends(FPSController, _super);\n    function FPSController(hls) {\n        return _super.call(this, hls, events_1.default.MEDIA_ATTACHING) || this;\n    }\n    FPSController.prototype.destroy = function () {\n        if (this.timer) {\n            clearInterval(this.timer);\n        }\n        this.isVideoPlaybackQualityAvailable = false;\n    };\n    FPSController.prototype.onMediaAttaching = function (data) {\n        var config = this.hls.config;\n        if (config.capLevelOnFPSDrop) {\n            var video_1 = this.video = data.media instanceof window.HTMLVideoElement ? data.media : null;\n            if (typeof video_1.getVideoPlaybackQuality === 'function') {\n                this.isVideoPlaybackQualityAvailable = true;\n            }\n            clearInterval(this.timer);\n            this.timer = setInterval(this.checkFPSInterval.bind(this), config.fpsDroppedMonitoringPeriod);\n        }\n    };\n    FPSController.prototype.checkFPS = function (video, decodedFrames, droppedFrames) {\n        var currentTime = performance.now();\n        if (decodedFrames) {\n            if (this.lastTime) {\n                var currentPeriod = currentTime - this.lastTime, currentDropped = droppedFrames - this.lastDroppedFrames, currentDecoded = decodedFrames - this.lastDecodedFrames, droppedFPS = 1000 * currentDropped / currentPeriod, hls_1 = this.hls;\n                hls_1.trigger(events_1.default.FPS_DROP, { currentDropped: currentDropped, currentDecoded: currentDecoded, totalDroppedFrames: droppedFrames });\n                if (droppedFPS > 0) {\n                    // logger.log('checkFPS : droppedFPS/decodedFPS:' + droppedFPS/(1000 * currentDecoded / currentPeriod));\n                    if (currentDropped > hls_1.config.fpsDroppedMonitoringThreshold * currentDecoded) {\n                        var currentLevel = hls_1.currentLevel;\n                        logger_1.logger.warn('drop FPS ratio greater than max allowed value for currentLevel: ' + currentLevel);\n                        if (currentLevel > 0 && (hls_1.autoLevelCapping === -1 || hls_1.autoLevelCapping >= currentLevel)) {\n                            currentLevel = currentLevel - 1;\n                            hls_1.trigger(events_1.default.FPS_DROP_LEVEL_CAPPING, { level: currentLevel, droppedLevel: hls_1.currentLevel });\n                            hls_1.autoLevelCapping = currentLevel;\n                            hls_1.streamController.nextLevelSwitch();\n                        }\n                    }\n                }\n            }\n            this.lastTime = currentTime;\n            this.lastDroppedFrames = droppedFrames;\n            this.lastDecodedFrames = decodedFrames;\n        }\n    };\n    FPSController.prototype.checkFPSInterval = function () {\n        var video = this.video;\n        if (video) {\n            if (this.isVideoPlaybackQualityAvailable) {\n                var videoPlaybackQuality = video.getVideoPlaybackQuality();\n                this.checkFPS(video, videoPlaybackQuality.totalVideoFrames, videoPlaybackQuality.droppedVideoFrames);\n            }\n            else {\n                this.checkFPS(video, video.webkitDecodedFrameCount, video.webkitDroppedFrameCount);\n            }\n        }\n    };\n    return FPSController;\n}(event_handler_1.default));\nexports.default = FPSController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/fragment-finders.js\":\n/*!********************************************!*\\\n  !*** ./src/controller/fragment-finders.js ***!\n  \\********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_search_1 = __webpack_require__(/*! ../utils/binary-search */ \"./src/utils/binary-search.js\");\n/**\n * Returns first fragment whose endPdt value exceeds the given PDT.\n * @param {Array<Fragment>} fragments - The array of candidate fragments\n * @param {number|null} [PDTValue = null] - The PDT value which must be exceeded\n * @param {number} [maxFragLookUpTolerance = 0] - The amount of time that a fragment's start/end can be within in order to be considered contiguous\n * @returns {*|null} fragment - The best matching fragment\n */\nfunction findFragmentByPDT(fragments, PDTValue, maxFragLookUpTolerance) {\n    if (!Array.isArray(fragments) || !fragments.length || !Number.isFinite(PDTValue)) {\n        return null;\n    }\n    // if less than start\n    if (PDTValue < fragments[0].programDateTime) {\n        return null;\n    }\n    if (PDTValue >= fragments[fragments.length - 1].endProgramDateTime) {\n        return null;\n    }\n    maxFragLookUpTolerance = maxFragLookUpTolerance || 0;\n    for (var seg = 0; seg < fragments.length; ++seg) {\n        var frag = fragments[seg];\n        if (pdtWithinToleranceTest(PDTValue, maxFragLookUpTolerance, frag)) {\n            return frag;\n        }\n    }\n    return null;\n}\nexports.findFragmentByPDT = findFragmentByPDT;\n/**\n * Finds a fragment based on the SN of the previous fragment; or based on the needs of the current buffer.\n * This method compensates for small buffer gaps by applying a tolerance to the start of any candidate fragment, thus\n * breaking any traps which would cause the same fragment to be continuously selected within a small range.\n * @param {*} fragPrevious - The last frag successfully appended\n * @param {Array<Fragment>} fragments - The array of candidate fragments\n * @param {number} [bufferEnd = 0] - The end of the contiguous buffered range the playhead is currently within\n * @param {number} maxFragLookUpTolerance - The amount of time that a fragment's start/end can be within in order to be considered contiguous\n * @returns {*} foundFrag - The best matching fragment\n */\nfunction findFragmentByPTS(fragPrevious, fragments, bufferEnd, maxFragLookUpTolerance) {\n    if (bufferEnd === void 0) { bufferEnd = 0; }\n    if (maxFragLookUpTolerance === void 0) { maxFragLookUpTolerance = 0; }\n    var fragNext = fragPrevious ? fragments[fragPrevious.sn - fragments[0].sn + 1] : null;\n    // Prefer the next fragment if it's within tolerance\n    if (fragNext && !fragmentWithinToleranceTest(bufferEnd, maxFragLookUpTolerance, fragNext)) {\n        return fragNext;\n    }\n    return binary_search_1.default.search(fragments, fragmentWithinToleranceTest.bind(null, bufferEnd, maxFragLookUpTolerance));\n}\nexports.findFragmentByPTS = findFragmentByPTS;\n/**\n * The test function used by the findFragmentBySn's BinarySearch to look for the best match to the current buffer conditions.\n * @param {*} candidate - The fragment to test\n * @param {number} [bufferEnd = 0] - The end of the current buffered range the playhead is currently within\n * @param {number} [maxFragLookUpTolerance = 0] - The amount of time that a fragment's start can be within in order to be considered contiguous\n * @returns {number} - 0 if it matches, 1 if too low, -1 if too high\n */\nfunction fragmentWithinToleranceTest(bufferEnd, maxFragLookUpTolerance, candidate) {\n    if (bufferEnd === void 0) { bufferEnd = 0; }\n    if (maxFragLookUpTolerance === void 0) { maxFragLookUpTolerance = 0; }\n    // offset should be within fragment boundary - config.maxFragLookUpTolerance\n    // this is to cope with situations like\n    // bufferEnd = 9.991\n    // frag[Ø] : [0,10]\n    // frag[1] : [10,20]\n    // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n    //              frag start               frag start+duration\n    //                  |-----------------------------|\n    //              <--->                         <--->\n    //  ...--------><-----------------------------><---------....\n    // previous frag         matching fragment         next frag\n    //  return -1             return 0                 return 1\n    // logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n    // Set the lookup tolerance to be small enough to detect the current segment - ensures we don't skip over very small segments\n    var candidateLookupTolerance = Math.min(maxFragLookUpTolerance, candidate.duration + (candidate.deltaPTS ? candidate.deltaPTS : 0));\n    if (candidate.start + candidate.duration - candidateLookupTolerance <= bufferEnd) {\n        return 1;\n    }\n    else if (candidate.start - candidateLookupTolerance > bufferEnd && candidate.start) {\n        // if maxFragLookUpTolerance will have negative value then don't return -1 for first element\n        return -1;\n    }\n    return 0;\n}\nexports.fragmentWithinToleranceTest = fragmentWithinToleranceTest;\n/**\n * The test function used by the findFragmentByPdt's BinarySearch to look for the best match to the current buffer conditions.\n * This function tests the candidate's program date time values, as represented in Unix time\n * @param {*} candidate - The fragment to test\n * @param {number} [pdtBufferEnd = 0] - The Unix time representing the end of the current buffered range\n * @param {number} [maxFragLookUpTolerance = 0] - The amount of time that a fragment's start can be within in order to be considered contiguous\n * @returns {boolean} True if contiguous, false otherwise\n */\nfunction pdtWithinToleranceTest(pdtBufferEnd, maxFragLookUpTolerance, candidate) {\n    var candidateLookupTolerance = Math.min(maxFragLookUpTolerance, candidate.duration + (candidate.deltaPTS ? candidate.deltaPTS : 0)) * 1000;\n    return candidate.endProgramDateTime - candidateLookupTolerance > pdtBufferEnd;\n}\nexports.pdtWithinToleranceTest = pdtWithinToleranceTest;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/fragment-tracker.js\":\n/*!********************************************!*\\\n  !*** ./src/controller/fragment-tracker.js ***!\n  \\********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nexports.FragmentState = {\n    NOT_LOADED: 'NOT_LOADED',\n    APPENDING: 'APPENDING',\n    PARTIAL: 'PARTIAL',\n    OK: 'OK'\n};\nvar FragmentTracker = /** @class */ (function (_super) {\n    __extends(FragmentTracker, _super);\n    function FragmentTracker(hls) {\n        var _this = _super.call(this, hls, events_1.default.BUFFER_APPENDED, events_1.default.FRAG_BUFFERED, events_1.default.FRAG_LOADED) || this;\n        _this.bufferPadding = 0.2;\n        _this.fragments = Object.create(null);\n        _this.timeRanges = Object.create(null);\n        _this.config = hls.config;\n        return _this;\n    }\n    FragmentTracker.prototype.destroy = function () {\n        this.fragments = null;\n        this.timeRanges = null;\n        this.config = null;\n        event_handler_1.default.prototype.destroy.call(this);\n        _super.prototype.destroy.call(this);\n    };\n    /**\n     * Return a Fragment that match the position and levelType.\n     * If not found any Fragment, return null\n     * @param {number} position\n     * @param {LevelType} levelType\n     * @returns {Fragment|null}\n     */\n    FragmentTracker.prototype.getBufferedFrag = function (position, levelType) {\n        var fragments = this.fragments;\n        var bufferedFrags = Object.keys(fragments).filter(function (key) {\n            var fragmentEntity = fragments[key];\n            if (fragmentEntity.body.type !== levelType) {\n                return false;\n            }\n            if (!fragmentEntity.buffered) {\n                return false;\n            }\n            var frag = fragmentEntity.body;\n            return frag.startPTS <= position && position <= frag.endPTS;\n        });\n        if (bufferedFrags.length === 0) {\n            return null;\n        }\n        else {\n            // https://github.com/video-dev/hls.js/pull/1545#discussion_r166229566\n            var bufferedFragKey = bufferedFrags.pop();\n            return fragments[bufferedFragKey].body;\n        }\n    };\n    /**\n     * Partial fragments effected by coded frame eviction will be removed\n     * The browser will unload parts of the buffer to free up memory for new buffer data\n     * Fragments will need to be reloaded when the buffer is freed up, removing partial fragments will allow them to reload(since there might be parts that are still playable)\n     * @param {String} elementaryStream The elementaryStream of media this is (eg. video/audio)\n     * @param {TimeRanges} timeRange TimeRange object from a sourceBuffer\n     */\n    FragmentTracker.prototype.detectEvictedFragments = function (elementaryStream, timeRange) {\n        var _this = this;\n        var fragmentTimes, time;\n        // Check if any flagged fragments have been unloaded\n        Object.keys(this.fragments).forEach(function (key) {\n            var fragmentEntity = _this.fragments[key];\n            if (fragmentEntity.buffered === true) {\n                var esData = fragmentEntity.range[elementaryStream];\n                if (esData) {\n                    fragmentTimes = esData.time;\n                    for (var i = 0; i < fragmentTimes.length; i++) {\n                        time = fragmentTimes[i];\n                        if (_this.isTimeBuffered(time.startPTS, time.endPTS, timeRange) === false) {\n                            // Unregister partial fragment as it needs to load again to be reused\n                            _this.removeFragment(fragmentEntity.body);\n                            break;\n                        }\n                    }\n                }\n            }\n        });\n    };\n    /**\n     * Checks if the fragment passed in is loaded in the buffer properly\n     * Partially loaded fragments will be registered as a partial fragment\n     * @param {Object} fragment Check the fragment against all sourceBuffers loaded\n     */\n    FragmentTracker.prototype.detectPartialFragments = function (fragment) {\n        var _this = this;\n        var fragKey = this.getFragmentKey(fragment);\n        var fragmentEntity = this.fragments[fragKey];\n        if (fragmentEntity) {\n            fragmentEntity.buffered = true;\n            Object.keys(this.timeRanges).forEach(function (elementaryStream) {\n                if (fragment.hasElementaryStream(elementaryStream)) {\n                    var timeRange = _this.timeRanges[elementaryStream];\n                    // Check for malformed fragments\n                    // Gaps need to be calculated for each elementaryStream\n                    fragmentEntity.range[elementaryStream] = _this.getBufferedTimes(fragment.startPTS, fragment.endPTS, timeRange);\n                }\n            });\n        }\n    };\n    FragmentTracker.prototype.getBufferedTimes = function (startPTS, endPTS, timeRange) {\n        var fragmentTimes = [];\n        var startTime, endTime;\n        var fragmentPartial = false;\n        for (var i = 0; i < timeRange.length; i++) {\n            startTime = timeRange.start(i) - this.bufferPadding;\n            endTime = timeRange.end(i) + this.bufferPadding;\n            if (startPTS >= startTime && endPTS <= endTime) {\n                // Fragment is entirely contained in buffer\n                // No need to check the other timeRange times since it's completely playable\n                fragmentTimes.push({\n                    startPTS: Math.max(startPTS, timeRange.start(i)),\n                    endPTS: Math.min(endPTS, timeRange.end(i))\n                });\n                break;\n            }\n            else if (startPTS < endTime && endPTS > startTime) {\n                // Check for intersection with buffer\n                // Get playable sections of the fragment\n                fragmentTimes.push({\n                    startPTS: Math.max(startPTS, timeRange.start(i)),\n                    endPTS: Math.min(endPTS, timeRange.end(i))\n                });\n                fragmentPartial = true;\n            }\n            else if (endPTS <= startTime) {\n                // No need to check the rest of the timeRange as it is in order\n                break;\n            }\n        }\n        return {\n            time: fragmentTimes,\n            partial: fragmentPartial\n        };\n    };\n    FragmentTracker.prototype.getFragmentKey = function (fragment) {\n        return fragment.type + \"_\" + fragment.level + \"_\" + fragment.urlId + \"_\" + fragment.sn;\n    };\n    /**\n     * Gets the partial fragment for a certain time\n     * @param {Number} time\n     * @returns {Object} fragment Returns a partial fragment at a time or null if there is no partial fragment\n     */\n    FragmentTracker.prototype.getPartialFragment = function (time) {\n        var _this = this;\n        var timePadding, startTime, endTime;\n        var bestFragment = null;\n        var bestOverlap = 0;\n        Object.keys(this.fragments).forEach(function (key) {\n            var fragmentEntity = _this.fragments[key];\n            if (_this.isPartial(fragmentEntity)) {\n                startTime = fragmentEntity.body.startPTS - _this.bufferPadding;\n                endTime = fragmentEntity.body.endPTS + _this.bufferPadding;\n                if (time >= startTime && time <= endTime) {\n                    // Use the fragment that has the most padding from start and end time\n                    timePadding = Math.min(time - startTime, endTime - time);\n                    if (bestOverlap <= timePadding) {\n                        bestFragment = fragmentEntity.body;\n                        bestOverlap = timePadding;\n                    }\n                }\n            }\n        });\n        return bestFragment;\n    };\n    /**\n     * @param {Object} fragment The fragment to check\n     * @returns {String} Returns the fragment state when a fragment never loaded or if it partially loaded\n     */\n    FragmentTracker.prototype.getState = function (fragment) {\n        var fragKey = this.getFragmentKey(fragment);\n        var fragmentEntity = this.fragments[fragKey];\n        var state = exports.FragmentState.NOT_LOADED;\n        if (fragmentEntity !== undefined) {\n            if (!fragmentEntity.buffered) {\n                state = exports.FragmentState.APPENDING;\n            }\n            else if (this.isPartial(fragmentEntity) === true) {\n                state = exports.FragmentState.PARTIAL;\n            }\n            else {\n                state = exports.FragmentState.OK;\n            }\n        }\n        return state;\n    };\n    FragmentTracker.prototype.isPartial = function (fragmentEntity) {\n        return fragmentEntity.buffered === true &&\n            ((fragmentEntity.range.video !== undefined && fragmentEntity.range.video.partial === true) ||\n                (fragmentEntity.range.audio !== undefined && fragmentEntity.range.audio.partial === true));\n    };\n    FragmentTracker.prototype.isTimeBuffered = function (startPTS, endPTS, timeRange) {\n        var startTime, endTime;\n        for (var i = 0; i < timeRange.length; i++) {\n            startTime = timeRange.start(i) - this.bufferPadding;\n            endTime = timeRange.end(i) + this.bufferPadding;\n            if (startPTS >= startTime && endPTS <= endTime) {\n                return true;\n            }\n            if (endPTS <= startTime) {\n                // No need to check the rest of the timeRange as it is in order\n                return false;\n            }\n        }\n        return false;\n    };\n    /**\n     * Fires when a fragment loading is completed\n     */\n    FragmentTracker.prototype.onFragLoaded = function (e) {\n        var fragment = e.frag;\n        // don't track initsegment (for which sn is not a number)\n        // don't track frags used for bitrateTest, they're irrelevant.\n        if (Number.isFinite(fragment.sn) && !fragment.bitrateTest) {\n            this.fragments[this.getFragmentKey(fragment)] = {\n                body: fragment,\n                range: Object.create(null),\n                buffered: false\n            };\n        }\n    };\n    /**\n     * Fires when the buffer is updated\n     */\n    FragmentTracker.prototype.onBufferAppended = function (e) {\n        var _this = this;\n        // Store the latest timeRanges loaded in the buffer\n        this.timeRanges = e.timeRanges;\n        Object.keys(this.timeRanges).forEach(function (elementaryStream) {\n            var timeRange = _this.timeRanges[elementaryStream];\n            _this.detectEvictedFragments(elementaryStream, timeRange);\n        });\n    };\n    /**\n     * Fires after a fragment has been loaded into the source buffer\n     */\n    FragmentTracker.prototype.onFragBuffered = function (e) {\n        this.detectPartialFragments(e.frag);\n    };\n    /**\n     * Return true if fragment tracker has the fragment.\n     * @param {Object} fragment\n     * @returns {boolean}\n     */\n    FragmentTracker.prototype.hasFragment = function (fragment) {\n        var fragKey = this.getFragmentKey(fragment);\n        return this.fragments[fragKey] !== undefined;\n    };\n    /**\n     * Remove a fragment from fragment tracker until it is loaded again\n     * @param {Object} fragment The fragment to remove\n     */\n    FragmentTracker.prototype.removeFragment = function (fragment) {\n        var fragKey = this.getFragmentKey(fragment);\n        delete this.fragments[fragKey];\n    };\n    /**\n     * Remove all fragments from fragment tracker.\n     */\n    FragmentTracker.prototype.removeAllFragments = function () {\n        this.fragments = Object.create(null);\n    };\n    return FragmentTracker;\n}(event_handler_1.default));\nexports.FragmentTracker = FragmentTracker;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/gap-controller.js\":\n/*!******************************************!*\\\n  !*** ./src/controller/gap-controller.js ***!\n  \\******************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar buffer_helper_1 = __webpack_require__(/*! ../utils/buffer-helper */ \"./src/utils/buffer-helper.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar stallDebounceInterval = 1000;\nvar jumpThreshold = 0.5; // tolerance needed as some browsers stalls playback before reaching buffered range end\nvar GapController = /** @class */ (function () {\n    function GapController(config, media, fragmentTracker, hls) {\n        this.config = config;\n        this.media = media;\n        this.fragmentTracker = fragmentTracker;\n        this.hls = hls;\n        this.stallReported = false;\n    }\n    /**\n     * Checks if the playhead is stuck within a gap, and if so, attempts to free it.\n     * A gap is an unbuffered range between two buffered ranges (or the start and the first buffered range).\n     * @param lastCurrentTime\n     * @param buffered\n     */\n    GapController.prototype.poll = function (lastCurrentTime, buffered) {\n        var _a = this, config = _a.config, media = _a.media;\n        var currentTime = media.currentTime;\n        var tnow = window.performance.now();\n        if (currentTime !== lastCurrentTime) {\n            // The playhead is now moving, but was previously stalled\n            if (this.stallReported) {\n                logger_1.logger.warn(\"playback not stuck anymore @\" + currentTime + \", after \" + Math.round(tnow - this.stalled) + \"ms\");\n                this.stallReported = false;\n            }\n            this.stalled = null;\n            this.nudgeRetry = 0;\n            return;\n        }\n        if (media.ended || !media.buffered.length || media.readyState > 2) {\n            return;\n        }\n        if (media.seeking && buffer_helper_1.BufferHelper.isBuffered(media, currentTime)) {\n            return;\n        }\n        // The playhead isn't moving but it should be\n        // Allow some slack time to for small stalls to resolve themselves\n        var stalledDuration = tnow - this.stalled;\n        var bufferInfo = buffer_helper_1.BufferHelper.bufferInfo(media, currentTime, config.maxBufferHole);\n        if (!this.stalled) {\n            this.stalled = tnow;\n            return;\n        }\n        else if (stalledDuration >= stallDebounceInterval) {\n            // Report stalling after trying to fix\n            this._reportStall(bufferInfo.len);\n        }\n        this._tryFixBufferStall(bufferInfo, stalledDuration);\n    };\n    /**\n     * Detects and attempts to fix known buffer stalling issues.\n     * @param bufferInfo - The properties of the current buffer.\n     * @param stalledDuration - The amount of time Hls.js has been stalling for.\n     * @private\n     */\n    GapController.prototype._tryFixBufferStall = function (bufferInfo, stalledDuration) {\n        var _a = this, config = _a.config, fragmentTracker = _a.fragmentTracker, media = _a.media;\n        var currentTime = media.currentTime;\n        var partial = fragmentTracker.getPartialFragment(currentTime);\n        if (partial) {\n            // Try to skip over the buffer hole caused by a partial fragment\n            // This method isn't limited by the size of the gap between buffered ranges\n            this._trySkipBufferHole(partial);\n        }\n        if (bufferInfo.len > jumpThreshold && stalledDuration > config.highBufferWatchdogPeriod * 1000) {\n            // Try to nudge currentTime over a buffer hole if we've been stalling for the configured amount of seconds\n            // We only try to jump the hole if it's under the configured size\n            // Reset stalled so to rearm watchdog timer\n            this.stalled = null;\n            this._tryNudgeBuffer();\n        }\n    };\n    /**\n     * Triggers a BUFFER_STALLED_ERROR event, but only once per stall period.\n     * @param bufferLen - The playhead distance from the end of the current buffer segment.\n     * @private\n     */\n    GapController.prototype._reportStall = function (bufferLen) {\n        var _a = this, hls = _a.hls, media = _a.media, stallReported = _a.stallReported;\n        if (!stallReported) {\n            // Report stalled error once\n            this.stallReported = true;\n            logger_1.logger.warn(\"Playback stalling at @\" + media.currentTime + \" due to low buffer\");\n            hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.MEDIA_ERROR,\n                details: errors_1.ErrorDetails.BUFFER_STALLED_ERROR,\n                fatal: false,\n                buffer: bufferLen\n            });\n        }\n    };\n    /**\n     * Attempts to fix buffer stalls by jumping over known gaps caused by partial fragments\n     * @param partial - The partial fragment found at the current time (where playback is stalling).\n     * @private\n     */\n    GapController.prototype._trySkipBufferHole = function (partial) {\n        var _a = this, hls = _a.hls, media = _a.media;\n        var currentTime = media.currentTime;\n        var lastEndTime = 0;\n        // Check if currentTime is between unbuffered regions of partial fragments\n        for (var i = 0; i < media.buffered.length; i++) {\n            var startTime = media.buffered.start(i);\n            if (currentTime >= lastEndTime && currentTime < startTime) {\n                media.currentTime = Math.max(startTime, media.currentTime + 0.1);\n                logger_1.logger.warn(\"skipping hole, adjusting currentTime from \" + currentTime + \" to \" + media.currentTime);\n                this.stalled = null;\n                hls.trigger(events_1.default.ERROR, {\n                    type: errors_1.ErrorTypes.MEDIA_ERROR,\n                    details: errors_1.ErrorDetails.BUFFER_SEEK_OVER_HOLE,\n                    fatal: false,\n                    reason: \"fragment loaded with buffer holes, seeking from \" + currentTime + \" to \" + media.currentTime,\n                    frag: partial\n                });\n                return;\n            }\n            lastEndTime = media.buffered.end(i);\n        }\n    };\n    /**\n     * Attempts to fix buffer stalls by advancing the mediaElement's current time by a small amount.\n     * @private\n     */\n    GapController.prototype._tryNudgeBuffer = function () {\n        var _a = this, config = _a.config, hls = _a.hls, media = _a.media;\n        var currentTime = media.currentTime;\n        var nudgeRetry = (this.nudgeRetry || 0) + 1;\n        this.nudgeRetry = nudgeRetry;\n        if (nudgeRetry < config.nudgeMaxRetry) {\n            var targetTime = currentTime + nudgeRetry * config.nudgeOffset;\n            logger_1.logger.log(\"adjust currentTime from \" + currentTime + \" to \" + targetTime);\n            // playback stalled in buffered area ... let's nudge currentTime to try to overcome this\n            media.currentTime = targetTime;\n            hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.MEDIA_ERROR,\n                details: errors_1.ErrorDetails.BUFFER_NUDGE_ON_STALL,\n                fatal: false\n            });\n        }\n        else {\n            logger_1.logger.error(\"still stuck in high buffer @\" + currentTime + \" after \" + config.nudgeMaxRetry + \", raise fatal error\");\n            hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.MEDIA_ERROR,\n                details: errors_1.ErrorDetails.BUFFER_STALLED_ERROR,\n                fatal: true\n            });\n        }\n    };\n    return GapController;\n}());\nexports.default = GapController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/id3-track-controller.js\":\n/*!************************************************!*\\\n  !*** ./src/controller/id3-track-controller.js ***!\n  \\************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * id3 metadata track controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar id3_1 = __webpack_require__(/*! ../demux/id3 */ \"./src/demux/id3.js\");\nvar texttrack_utils_1 = __webpack_require__(/*! ../utils/texttrack-utils */ \"./src/utils/texttrack-utils.js\");\nvar ID3TrackController = /** @class */ (function (_super) {\n    __extends(ID3TrackController, _super);\n    function ID3TrackController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHED, events_1.default.MEDIA_DETACHING, events_1.default.FRAG_PARSING_METADATA) || this;\n        _this.id3Track = undefined;\n        _this.media = undefined;\n        return _this;\n    }\n    ID3TrackController.prototype.destroy = function () {\n        event_handler_1.default.prototype.destroy.call(this);\n    };\n    // Add ID3 metatadata text track.\n    ID3TrackController.prototype.onMediaAttached = function (data) {\n        this.media = data.media;\n        if (!this.media) {\n        }\n    };\n    ID3TrackController.prototype.onMediaDetaching = function () {\n        texttrack_utils_1.clearCurrentCues(this.id3Track);\n        this.id3Track = undefined;\n        this.media = undefined;\n    };\n    ID3TrackController.prototype.getID3Track = function (textTracks) {\n        for (var i = 0; i < textTracks.length; i++) {\n            var textTrack = textTracks[i];\n            if (textTrack.kind === 'metadata' && textTrack.label === 'id3') {\n                // send 'addtrack' when reusing the textTrack for metadata,\n                // same as what we do for captions\n                texttrack_utils_1.sendAddTrackEvent(textTrack, this.media);\n                return textTrack;\n            }\n        }\n        return this.media.addTextTrack('metadata', 'id3');\n    };\n    ID3TrackController.prototype.onFragParsingMetadata = function (data) {\n        var fragment = data.frag;\n        var samples = data.samples;\n        // create track dynamically\n        if (!this.id3Track) {\n            this.id3Track = this.getID3Track(this.media.textTracks);\n            this.id3Track.mode = 'hidden';\n        }\n        // Attempt to recreate Safari functionality by creating\n        // WebKitDataCue objects when available and store the decoded\n        // ID3 data in the value property of the cue\n        var Cue = window.WebKitDataCue || window.VTTCue || window.TextTrackCue;\n        for (var i = 0; i < samples.length; i++) {\n            var frames_1 = id3_1.default.getID3Frames(samples[i].data);\n            if (frames_1) {\n                var startTime = samples[i].pts;\n                var endTime = i < samples.length - 1 ? samples[i + 1].pts : fragment.endPTS;\n                // Give a slight bump to the endTime if it's equal to startTime to avoid a SyntaxError in IE\n                if (startTime === endTime) {\n                    endTime += 0.0001;\n                }\n                for (var j = 0; j < frames_1.length; j++) {\n                    var frame = frames_1[j];\n                    // Safari doesn't put the timestamp frame in the TextTrack\n                    if (!id3_1.default.isTimeStampFrame(frame)) {\n                        var cue = new Cue(startTime, endTime, '');\n                        cue.value = frame;\n                        this.id3Track.addCue(cue);\n                    }\n                }\n            }\n        }\n    };\n    return ID3TrackController;\n}(event_handler_1.default));\nexports.default = ID3TrackController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/level-controller.js\":\n/*!********************************************!*\\\n  !*** ./src/controller/level-controller.js ***!\n  \\********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * Level Controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar codecs_1 = __webpack_require__(/*! ../utils/codecs */ \"./src/utils/codecs.js\");\nvar level_helper_1 = __webpack_require__(/*! ./level-helper */ \"./src/controller/level-helper.js\");\nvar performance = window.performance;\nvar chromeOrFirefox;\nvar LevelController = /** @class */ (function (_super) {\n    __extends(LevelController, _super);\n    function LevelController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MANIFEST_LOADED, events_1.default.LEVEL_LOADED, events_1.default.AUDIO_TRACK_SWITCHED, events_1.default.FRAG_LOADED, events_1.default.ERROR) || this;\n        _this.canload = false;\n        _this.currentLevelIndex = null;\n        _this.manualLevelIndex = -1;\n        _this.timer = null;\n        chromeOrFirefox = /chrome|firefox/.test(navigator.userAgent.toLowerCase());\n        return _this;\n    }\n    LevelController.prototype.onHandlerDestroying = function () {\n        this.clearTimer();\n        this.manualLevelIndex = -1;\n    };\n    LevelController.prototype.clearTimer = function () {\n        if (this.timer !== null) {\n            clearTimeout(this.timer);\n            this.timer = null;\n        }\n    };\n    LevelController.prototype.startLoad = function () {\n        var levels = this._levels;\n        this.canload = true;\n        this.levelRetryCount = 0;\n        // clean up live level details to force reload them, and reset load errors\n        if (levels) {\n            levels.forEach(function (level) {\n                level.loadError = 0;\n                var levelDetails = level.details;\n                if (levelDetails && levelDetails.live) {\n                    level.details = undefined;\n                }\n            });\n        }\n        // speed up live playlist refresh if timer exists\n        if (this.timer !== null) {\n            this.loadLevel();\n        }\n    };\n    LevelController.prototype.stopLoad = function () {\n        this.canload = false;\n    };\n    LevelController.prototype.onManifestLoaded = function (data) {\n        var levels = [];\n        var audioTracks = [];\n        var bitrateStart;\n        var levelSet = {};\n        var levelFromSet = null;\n        var videoCodecFound = false;\n        var audioCodecFound = false;\n        // regroup redundant levels together\n        data.levels.forEach(function (level) {\n            var attributes = level.attrs;\n            level.loadError = 0;\n            level.fragmentError = false;\n            videoCodecFound = videoCodecFound || !!level.videoCodec;\n            audioCodecFound = audioCodecFound || !!level.audioCodec;\n            // erase audio codec info if browser does not support mp4a.40.34.\n            // demuxer will autodetect codec and fallback to mpeg/audio\n            if (chromeOrFirefox && level.audioCodec && level.audioCodec.indexOf('mp4a.40.34') !== -1) {\n                level.audioCodec = undefined;\n            }\n            levelFromSet = levelSet[level.bitrate]; // FIXME: we would also have to match the resolution here\n            if (!levelFromSet) {\n                level.url = [level.url];\n                level.urlId = 0;\n                levelSet[level.bitrate] = level;\n                levels.push(level);\n            }\n            else {\n                levelFromSet.url.push(level.url);\n            }\n            if (attributes) {\n                if (attributes.AUDIO) {\n                    audioCodecFound = true;\n                    level_helper_1.addGroupId(levelFromSet || level, 'audio', attributes.AUDIO);\n                }\n                if (attributes.SUBTITLES) {\n                    level_helper_1.addGroupId(levelFromSet || level, 'text', attributes.SUBTITLES);\n                }\n            }\n        });\n        // remove audio-only level if we also have levels with audio+video codecs signalled\n        if (videoCodecFound && audioCodecFound) {\n            levels = levels.filter(function (_a) {\n                var videoCodec = _a.videoCodec;\n                return !!videoCodec;\n            });\n        }\n        // only keep levels with supported audio/video codecs\n        levels = levels.filter(function (_a) {\n            var audioCodec = _a.audioCodec, videoCodec = _a.videoCodec;\n            return (!audioCodec || codecs_1.isCodecSupportedInMp4(audioCodec, 'audio')) && (!videoCodec || codecs_1.isCodecSupportedInMp4(videoCodec, 'video'));\n        });\n        if (data.audioTracks) {\n            audioTracks = data.audioTracks.filter(function (track) { return !track.audioCodec || codecs_1.isCodecSupportedInMp4(track.audioCodec, 'audio'); });\n            // Reassign id's after filtering since they're used as array indices\n            audioTracks.forEach(function (track, index) {\n                track.id = index;\n            });\n        }\n        if (levels.length > 0) {\n            // start bitrate is the first bitrate of the manifest\n            bitrateStart = levels[0].bitrate;\n            // sort level on bitrate\n            levels.sort(function (a, b) { return a.bitrate - b.bitrate; });\n            this._levels = levels;\n            // find index of first level in sorted levels\n            for (var i = 0; i < levels.length; i++) {\n                if (levels[i].bitrate === bitrateStart) {\n                    this._firstLevel = i;\n                    logger_1.logger.log(\"manifest loaded,\" + levels.length + \" level(s) found, first bitrate:\" + bitrateStart);\n                    break;\n                }\n            }\n            // Audio is only alternate if manifest include a URI along with the audio group tag\n            this.hls.trigger(events_1.default.MANIFEST_PARSED, {\n                levels: levels,\n                audioTracks: audioTracks,\n                firstLevel: this._firstLevel,\n                stats: data.stats,\n                audio: audioCodecFound,\n                video: videoCodecFound,\n                altAudio: audioTracks.some(function (t) { return !!t.url; })\n            });\n        }\n        else {\n            this.hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.MEDIA_ERROR,\n                details: errors_1.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,\n                fatal: true,\n                url: this.hls.url,\n                reason: 'no level with compatible codecs found in manifest'\n            });\n        }\n    };\n    Object.defineProperty(LevelController.prototype, \"levels\", {\n        get: function () {\n            return this._levels;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(LevelController.prototype, \"level\", {\n        get: function () {\n            return this.currentLevelIndex;\n        },\n        set: function (newLevel) {\n            var levels = this._levels;\n            if (levels) {\n                newLevel = Math.min(newLevel, levels.length - 1);\n                if (this.currentLevelIndex !== newLevel || !levels[newLevel].details) {\n                    this.setLevelInternal(newLevel);\n                }\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    LevelController.prototype.setLevelInternal = function (newLevel) {\n        var levels = this._levels;\n        var hls = this.hls;\n        // check if level idx is valid\n        if (newLevel >= 0 && newLevel < levels.length) {\n            // stopping live reloading timer if any\n            this.clearTimer();\n            if (this.currentLevelIndex !== newLevel) {\n                logger_1.logger.log(\"switching to level \" + newLevel);\n                this.currentLevelIndex = newLevel;\n                var levelProperties = levels[newLevel];\n                levelProperties.level = newLevel;\n                hls.trigger(events_1.default.LEVEL_SWITCHING, levelProperties);\n            }\n            var level = levels[newLevel];\n            var levelDetails = level.details;\n            // check if we need to load playlist for this level\n            if (!levelDetails || levelDetails.live) {\n                // level not retrieved yet, or live playlist we need to (re)load it\n                var urlId = level.urlId;\n                hls.trigger(events_1.default.LEVEL_LOADING, { url: level.url[urlId], level: newLevel, id: urlId });\n            }\n        }\n        else {\n            // invalid level id given, trigger error\n            hls.trigger(events_1.default.ERROR, {\n                type: errors_1.ErrorTypes.OTHER_ERROR,\n                details: errors_1.ErrorDetails.LEVEL_SWITCH_ERROR,\n                level: newLevel,\n                fatal: false,\n                reason: 'invalid level idx'\n            });\n        }\n    };\n    Object.defineProperty(LevelController.prototype, \"manualLevel\", {\n        get: function () {\n            return this.manualLevelIndex;\n        },\n        set: function (newLevel) {\n            this.manualLevelIndex = newLevel;\n            if (this._startLevel === undefined) {\n                this._startLevel = newLevel;\n            }\n            if (newLevel !== -1) {\n                this.level = newLevel;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(LevelController.prototype, \"firstLevel\", {\n        get: function () {\n            return this._firstLevel;\n        },\n        set: function (newLevel) {\n            this._firstLevel = newLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(LevelController.prototype, \"startLevel\", {\n        get: function () {\n            // hls.startLevel takes precedence over config.startLevel\n            // if none of these values are defined, fallback on this._firstLevel (first quality level appearing in variant manifest)\n            if (this._startLevel === undefined) {\n                var configStartLevel = this.hls.config.startLevel;\n                if (configStartLevel !== undefined) {\n                    return configStartLevel;\n                }\n                else {\n                    return this._firstLevel;\n                }\n            }\n            else {\n                return this._startLevel;\n            }\n        },\n        set: function (newLevel) {\n            this._startLevel = newLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    LevelController.prototype.onError = function (data) {\n        if (data.fatal) {\n            if (data.type === errors_1.ErrorTypes.NETWORK_ERROR) {\n                this.clearTimer();\n            }\n            return;\n        }\n        var levelError = false, fragmentError = false;\n        var levelIndex;\n        // try to recover not fatal errors\n        switch (data.details) {\n            case errors_1.ErrorDetails.FRAG_LOAD_ERROR:\n            case errors_1.ErrorDetails.FRAG_LOAD_TIMEOUT:\n            case errors_1.ErrorDetails.KEY_LOAD_ERROR:\n            case errors_1.ErrorDetails.KEY_LOAD_TIMEOUT:\n                levelIndex = data.frag.level;\n                fragmentError = true;\n                break;\n            case errors_1.ErrorDetails.LEVEL_LOAD_ERROR:\n            case errors_1.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n                levelIndex = data.context.level;\n                levelError = true;\n                break;\n            case errors_1.ErrorDetails.REMUX_ALLOC_ERROR:\n                levelIndex = data.level;\n                levelError = true;\n                break;\n        }\n        if (levelIndex !== undefined) {\n            this.recoverLevel(data, levelIndex, levelError, fragmentError);\n        }\n    };\n    /**\n     * Switch to a redundant stream if any available.\n     * If redundant stream is not available, emergency switch down if ABR mode is enabled.\n     *\n     * @param {Object} errorEvent\n     * @param {Number} levelIndex current level index\n     * @param {Boolean} levelError\n     * @param {Boolean} fragmentError\n     */\n    // FIXME Find a better abstraction where fragment/level retry management is well decoupled\n    LevelController.prototype.recoverLevel = function (errorEvent, levelIndex, levelError, fragmentError) {\n        var _this = this;\n        var config = this.hls.config;\n        var errorDetails = errorEvent.details;\n        var level = this._levels[levelIndex];\n        var redundantLevels, delay, nextLevel;\n        level.loadError++;\n        level.fragmentError = fragmentError;\n        if (levelError) {\n            if ((this.levelRetryCount + 1) <= config.levelLoadingMaxRetry) {\n                // exponential backoff capped to max retry timeout\n                delay = Math.min(Math.pow(2, this.levelRetryCount) * config.levelLoadingRetryDelay, config.levelLoadingMaxRetryTimeout);\n                // Schedule level reload\n                this.timer = setTimeout(function () { return _this.loadLevel(); }, delay);\n                // boolean used to inform stream controller not to switch back to IDLE on non fatal error\n                errorEvent.levelRetry = true;\n                this.levelRetryCount++;\n                logger_1.logger.warn(\"level controller, \" + errorDetails + \", retry in \" + delay + \" ms, current retry count is \" + this.levelRetryCount);\n            }\n            else {\n                logger_1.logger.error(\"level controller, cannot recover from \" + errorDetails + \" error\");\n                this.currentLevelIndex = null;\n                // stopping live reloading timer if any\n                this.clearTimer();\n                // switch error to fatal\n                errorEvent.fatal = true;\n                return;\n            }\n        }\n        // Try any redundant streams if available for both errors: level and fragment\n        // If level.loadError reaches redundantLevels it means that we tried them all, no hope  => let's switch down\n        if (levelError || fragmentError) {\n            redundantLevels = level.url.length;\n            if (redundantLevels > 1 && level.loadError < redundantLevels) {\n                level.urlId = (level.urlId + 1) % redundantLevels;\n                level.details = undefined;\n                logger_1.logger.warn(\"level controller, \" + errorDetails + \" for level \" + levelIndex + \": switching to redundant URL-id \" + level.urlId);\n                // console.log('Current audio track group ID:', this.hls.audioTracks[this.hls.audioTrack].groupId);\n                // console.log('New video quality level audio group id:', level.attrs.AUDIO);\n            }\n            else {\n                // Search for available level\n                if (this.manualLevelIndex === -1) {\n                    // When lowest level has been reached, let's start hunt from the top\n                    nextLevel = (levelIndex === 0) ? this._levels.length - 1 : levelIndex - 1;\n                    logger_1.logger.warn(\"level controller, \" + errorDetails + \": switch to \" + nextLevel);\n                    this.hls.nextAutoLevel = this.currentLevelIndex = nextLevel;\n                }\n                else if (fragmentError) {\n                    // Allow fragment retry as long as configuration allows.\n                    // reset this._level so that another call to set level() will trigger again a frag load\n                    logger_1.logger.warn(\"level controller, \" + errorDetails + \": reload a fragment\");\n                    this.currentLevelIndex = null;\n                }\n            }\n        }\n    };\n    // reset errors on the successful load of a fragment\n    LevelController.prototype.onFragLoaded = function (_a) {\n        var frag = _a.frag;\n        if (frag !== undefined && frag.type === 'main') {\n            var level = this._levels[frag.level];\n            if (level !== undefined) {\n                level.fragmentError = false;\n                level.loadError = 0;\n                this.levelRetryCount = 0;\n            }\n        }\n    };\n    LevelController.prototype.onLevelLoaded = function (data) {\n        var _this = this;\n        var levelId = data.level;\n        // only process level loaded events matching with expected level\n        if (levelId !== this.currentLevelIndex) {\n            return;\n        }\n        var curLevel = this._levels[levelId];\n        // reset level load error counter on successful level loaded only if there is no issues with fragments\n        if (!curLevel.fragmentError) {\n            curLevel.loadError = 0;\n            this.levelRetryCount = 0;\n        }\n        var newDetails = data.details;\n        // if current playlist is a live playlist, arm a timer to reload it\n        if (newDetails.live) {\n            var targetdurationMs = 1000 * (newDetails.averagetargetduration ? newDetails.averagetargetduration : newDetails.targetduration);\n            var reloadInterval = targetdurationMs, curDetails = curLevel.details;\n            if (curDetails && newDetails.endSN === curDetails.endSN) {\n                // follow HLS Spec, If the client reloads a Playlist file and finds that it has not\n                // changed then it MUST wait for a period of one-half the target\n                // duration before retrying.\n                reloadInterval /= 2;\n                logger_1.logger.log('same live playlist, reload twice faster');\n            }\n            // decrement reloadInterval with level loading delay\n            reloadInterval -= performance.now() - data.stats.trequest;\n            // in any case, don't reload more than half of target duration\n            reloadInterval = Math.max(targetdurationMs / 2, Math.round(reloadInterval));\n            logger_1.logger.log(\"live playlist, reload in \" + Math.round(reloadInterval) + \" ms\");\n            this.timer = setTimeout(function () { return _this.loadLevel(); }, reloadInterval);\n        }\n        else {\n            this.clearTimer();\n        }\n    };\n    LevelController.prototype.onAudioTrackSwitched = function (data) {\n        var audioGroupId = this.hls.audioTracks[data.id].groupId;\n        var currentLevel = this.hls.levels[this.currentLevelIndex];\n        if (!currentLevel) {\n            return;\n        }\n        if (currentLevel.audioGroupIds) {\n            var urlId = currentLevel.audioGroupIds.findIndex(function (groupId) { return groupId === audioGroupId; });\n            if (urlId !== currentLevel.urlId) {\n                currentLevel.urlId = urlId;\n                this.startLoad();\n            }\n        }\n    };\n    LevelController.prototype.loadLevel = function () {\n        logger_1.logger.debug('call to loadLevel');\n        if (this.currentLevelIndex !== null && this.canload) {\n            var levelObject = this._levels[this.currentLevelIndex];\n            if (typeof levelObject === 'object' &&\n                levelObject.url.length > 0) {\n                var level = this.currentLevelIndex;\n                var id = levelObject.urlId;\n                var url = levelObject.url[id];\n                logger_1.logger.log(\"Attempt loading level index \" + level + \" with URL-id \" + id);\n                // console.log('Current audio track group ID:', this.hls.audioTracks[this.hls.audioTrack].groupId);\n                // console.log('New video quality level audio group id:', levelObject.attrs.AUDIO, level);\n                this.hls.trigger(events_1.default.LEVEL_LOADING, { url: url, level: level, id: id });\n            }\n        }\n    };\n    Object.defineProperty(LevelController.prototype, \"nextLoadLevel\", {\n        get: function () {\n            if (this.manualLevelIndex !== -1) {\n                return this.manualLevelIndex;\n            }\n            else {\n                return this.hls.nextAutoLevel;\n            }\n        },\n        set: function (nextLevel) {\n            this.level = nextLevel;\n            if (this.manualLevelIndex === -1) {\n                this.hls.nextAutoLevel = nextLevel;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return LevelController;\n}(event_handler_1.default));\nexports.default = LevelController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/level-helper.js\":\n/*!****************************************!*\\\n  !*** ./src/controller/level-helper.js ***!\n  \\****************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/**\n * @module LevelHelper\n *\n * Providing methods dealing with playlist sliding and drift\n *\n * TODO: Create an actual `Level` class/model that deals with all this logic in an object-oriented-manner.\n *\n * */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nfunction addGroupId(level, type, id) {\n    switch (type) {\n        case 'audio':\n            if (!level.audioGroupIds) {\n                level.audioGroupIds = [];\n            }\n            level.audioGroupIds.push(id);\n            break;\n        case 'text':\n            if (!level.textGroupIds) {\n                level.textGroupIds = [];\n            }\n            level.textGroupIds.push(id);\n            break;\n    }\n}\nexports.addGroupId = addGroupId;\nfunction updatePTS(fragments, fromIdx, toIdx) {\n    var fragFrom = fragments[fromIdx], fragTo = fragments[toIdx], fragToPTS = fragTo.startPTS;\n    // if we know startPTS[toIdx]\n    if (Number.isFinite(fragToPTS)) {\n        // update fragment duration.\n        // it helps to fix drifts between playlist reported duration and fragment real duration\n        if (toIdx > fromIdx) {\n            fragFrom.duration = fragToPTS - fragFrom.start;\n            if (fragFrom.duration < 0) {\n                logger_1.logger.warn(\"negative duration computed for frag \" + fragFrom.sn + \",level \" + fragFrom.level + \", there should be some duration drift between playlist and fragment!\");\n            }\n        }\n        else {\n            fragTo.duration = fragFrom.start - fragToPTS;\n            if (fragTo.duration < 0) {\n                logger_1.logger.warn(\"negative duration computed for frag \" + fragTo.sn + \",level \" + fragTo.level + \", there should be some duration drift between playlist and fragment!\");\n            }\n        }\n    }\n    else {\n        // we dont know startPTS[toIdx]\n        if (toIdx > fromIdx) {\n            fragTo.start = fragFrom.start + fragFrom.duration;\n        }\n        else {\n            fragTo.start = Math.max(fragFrom.start - fragTo.duration, 0);\n        }\n    }\n}\nexports.updatePTS = updatePTS;\nfunction updateFragPTSDTS(details, frag, startPTS, endPTS, startDTS, endDTS) {\n    // update frag PTS/DTS\n    var maxStartPTS = startPTS;\n    if (Number.isFinite(frag.startPTS)) {\n        // delta PTS between audio and video\n        var deltaPTS = Math.abs(frag.startPTS - startPTS);\n        if (!Number.isFinite(frag.deltaPTS)) {\n            frag.deltaPTS = deltaPTS;\n        }\n        else {\n            frag.deltaPTS = Math.max(deltaPTS, frag.deltaPTS);\n        }\n        maxStartPTS = Math.max(startPTS, frag.startPTS);\n        startPTS = Math.min(startPTS, frag.startPTS);\n        endPTS = Math.max(endPTS, frag.endPTS);\n        startDTS = Math.min(startDTS, frag.startDTS);\n        endDTS = Math.max(endDTS, frag.endDTS);\n    }\n    var drift = startPTS - frag.start;\n    frag.start = frag.startPTS = startPTS;\n    frag.maxStartPTS = maxStartPTS;\n    frag.endPTS = endPTS;\n    frag.startDTS = startDTS;\n    frag.endDTS = endDTS;\n    frag.duration = endPTS - startPTS;\n    var sn = frag.sn;\n    // exit if sn out of range\n    if (!details || sn < details.startSN || sn > details.endSN) {\n        return 0;\n    }\n    var fragIdx, fragments, i;\n    fragIdx = sn - details.startSN;\n    fragments = details.fragments;\n    // update frag reference in fragments array\n    // rationale is that fragments array might not contain this frag object.\n    // this will happen if playlist has been refreshed between frag loading and call to updateFragPTSDTS()\n    // if we don't update frag, we won't be able to propagate PTS info on the playlist\n    // resulting in invalid sliding computation\n    fragments[fragIdx] = frag;\n    // adjust fragment PTS/duration from seqnum-1 to frag 0\n    for (i = fragIdx; i > 0; i--) {\n        updatePTS(fragments, i, i - 1);\n    }\n    // adjust fragment PTS/duration from seqnum to last frag\n    for (i = fragIdx; i < fragments.length - 1; i++) {\n        updatePTS(fragments, i, i + 1);\n    }\n    details.PTSKnown = true;\n    return drift;\n}\nexports.updateFragPTSDTS = updateFragPTSDTS;\nfunction mergeDetails(oldDetails, newDetails) {\n    var start = Math.max(oldDetails.startSN, newDetails.startSN) - newDetails.startSN, end = Math.min(oldDetails.endSN, newDetails.endSN) - newDetails.startSN, delta = newDetails.startSN - oldDetails.startSN, oldfragments = oldDetails.fragments, newfragments = newDetails.fragments, ccOffset = 0, PTSFrag;\n    // potentially retrieve cached initsegment\n    if (newDetails.initSegment && oldDetails.initSegment) {\n        newDetails.initSegment = oldDetails.initSegment;\n    }\n    // check if old/new playlists have fragments in common\n    if (end < start) {\n        newDetails.PTSKnown = false;\n        return;\n    }\n    // loop through overlapping SN and update startPTS , cc, and duration if any found\n    for (var i = start; i <= end; i++) {\n        var oldFrag = oldfragments[delta + i], newFrag = newfragments[i];\n        if (newFrag && oldFrag) {\n            ccOffset = oldFrag.cc - newFrag.cc;\n            if (Number.isFinite(oldFrag.startPTS)) {\n                newFrag.start = newFrag.startPTS = oldFrag.startPTS;\n                newFrag.endPTS = oldFrag.endPTS;\n                newFrag.duration = oldFrag.duration;\n                newFrag.backtracked = oldFrag.backtracked;\n                newFrag.dropped = oldFrag.dropped;\n                PTSFrag = newFrag;\n            }\n        }\n    }\n    if (ccOffset) {\n        logger_1.logger.log('discontinuity sliding from playlist, take drift into account');\n        for (i = 0; i < newfragments.length; i++) {\n            newfragments[i].cc += ccOffset;\n        }\n    }\n    // if at least one fragment contains PTS info, recompute PTS information for all fragments\n    if (PTSFrag) {\n        updateFragPTSDTS(newDetails, PTSFrag, PTSFrag.startPTS, PTSFrag.endPTS, PTSFrag.startDTS, PTSFrag.endDTS);\n    }\n    else {\n        // ensure that delta is within oldfragments range\n        // also adjust sliding in case delta is 0 (we could have old=[50-60] and new=old=[50-61])\n        // in that case we also need to adjust start offset of all fragments\n        if (delta >= 0 && delta < oldfragments.length) {\n            // adjust start by sliding offset\n            var sliding = oldfragments[delta].start;\n            for (i = 0; i < newfragments.length; i++) {\n                newfragments[i].start += sliding;\n            }\n        }\n    }\n    // if we are here, it means we have fragments overlapping between\n    // old and new level. reliable PTS info is thus relying on old level\n    newDetails.PTSKnown = oldDetails.PTSKnown;\n}\nexports.mergeDetails = mergeDetails;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/stream-controller.js\":\n/*!*********************************************!*\\\n  !*** ./src/controller/stream-controller.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * Stream Controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_search_1 = __webpack_require__(/*! ../utils/binary-search */ \"./src/utils/binary-search.js\");\nvar buffer_helper_1 = __webpack_require__(/*! ../utils/buffer-helper */ \"./src/utils/buffer-helper.js\");\nvar demuxer_1 = __webpack_require__(/*! ../demux/demuxer */ \"./src/demux/demuxer.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar fragment_tracker_1 = __webpack_require__(/*! ./fragment-tracker */ \"./src/controller/fragment-tracker.js\");\nvar fragment_1 = __webpack_require__(/*! ../loader/fragment */ \"./src/loader/fragment.js\");\nvar playlist_loader_1 = __webpack_require__(/*! ../loader/playlist-loader */ \"./src/loader/playlist-loader.js\");\nvar LevelHelper = __webpack_require__(/*! ./level-helper */ \"./src/controller/level-helper.js\");\nvar time_ranges_1 = __webpack_require__(/*! ../utils/time-ranges */ \"./src/utils/time-ranges.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar discontinuities_1 = __webpack_require__(/*! ../utils/discontinuities */ \"./src/utils/discontinuities.js\");\nvar fragment_finders_1 = __webpack_require__(/*! ./fragment-finders */ \"./src/controller/fragment-finders.js\");\nvar gap_controller_1 = __webpack_require__(/*! ./gap-controller */ \"./src/controller/gap-controller.js\");\nvar base_stream_controller_1 = __webpack_require__(/*! ./base-stream-controller */ \"./src/controller/base-stream-controller.js\");\nvar TICK_INTERVAL = 100; // how often to tick in ms\nvar StreamController = /** @class */ (function (_super) {\n    __extends(StreamController, _super);\n    function StreamController(hls, fragmentTracker) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHED, events_1.default.MEDIA_DETACHING, events_1.default.MANIFEST_LOADING, events_1.default.MANIFEST_PARSED, events_1.default.LEVEL_LOADED, events_1.default.KEY_LOADED, events_1.default.FRAG_LOADED, events_1.default.FRAG_LOAD_EMERGENCY_ABORTED, events_1.default.FRAG_PARSING_INIT_SEGMENT, events_1.default.FRAG_PARSING_DATA, events_1.default.FRAG_PARSED, events_1.default.ERROR, events_1.default.AUDIO_TRACK_SWITCHING, events_1.default.AUDIO_TRACK_SWITCHED, events_1.default.BUFFER_CREATED, events_1.default.BUFFER_APPENDED, events_1.default.BUFFER_FLUSHED) || this;\n        _this.fragmentTracker = fragmentTracker;\n        _this.config = hls.config;\n        _this.audioCodecSwap = false;\n        _this._state = base_stream_controller_1.State.STOPPED;\n        _this.stallReported = false;\n        _this.gapController = null;\n        return _this;\n    }\n    StreamController.prototype.onHandlerDestroying = function () {\n        this.stopLoad();\n        _super.prototype.onHandlerDestroying.call(this);\n    };\n    StreamController.prototype.onHandlerDestroyed = function () {\n        this.state = base_stream_controller_1.State.STOPPED;\n        this.fragmentTracker = null;\n        _super.prototype.onHandlerDestroyed.call(this);\n    };\n    StreamController.prototype.startLoad = function (startPosition) {\n        if (this.levels) {\n            var lastCurrentTime = this.lastCurrentTime, hls_1 = this.hls;\n            this.stopLoad();\n            this.setInterval(TICK_INTERVAL);\n            this.level = -1;\n            this.fragLoadError = 0;\n            if (!this.startFragRequested) {\n                // determine load level\n                var startLevel = hls_1.startLevel;\n                if (startLevel === -1) {\n                    // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level\n                    startLevel = 0;\n                    this.bitrateTest = true;\n                }\n                // set new level to playlist loader : this will trigger start level load\n                // hls.nextLoadLevel remains until it is set to a new value or until a new frag is successfully loaded\n                this.level = hls_1.nextLoadLevel = startLevel;\n                this.loadedmetadata = false;\n            }\n            // if startPosition undefined but lastCurrentTime set, set startPosition to last currentTime\n            if (lastCurrentTime > 0 && startPosition === -1) {\n                logger_1.logger.log(\"override startPosition with lastCurrentTime @\" + lastCurrentTime.toFixed(3));\n                startPosition = lastCurrentTime;\n            }\n            this.state = base_stream_controller_1.State.IDLE;\n            this.nextLoadPosition = this.startPosition = this.lastCurrentTime = startPosition;\n            this.tick();\n        }\n        else {\n            this.forceStartLoad = true;\n            this.state = base_stream_controller_1.State.STOPPED;\n        }\n    };\n    StreamController.prototype.stopLoad = function () {\n        var frag = this.fragCurrent;\n        if (frag) {\n            if (frag.loader) {\n                frag.loader.abort();\n            }\n            this.fragmentTracker.removeFragment(frag);\n            this.fragCurrent = null;\n        }\n        this.fragPrevious = null;\n        if (this.demuxer) {\n            this.demuxer.destroy();\n            this.demuxer = null;\n        }\n        this.clearInterval();\n        this.state = base_stream_controller_1.State.STOPPED;\n        this.forceStartLoad = false;\n    };\n    StreamController.prototype.doTick = function () {\n        switch (this.state) {\n            case base_stream_controller_1.State.BUFFER_FLUSHING:\n                // in buffer flushing state, reset fragLoadError counter\n                this.fragLoadError = 0;\n                break;\n            case base_stream_controller_1.State.IDLE:\n                this._doTickIdle();\n                break;\n            case base_stream_controller_1.State.WAITING_LEVEL:\n                var level = this.levels[this.level];\n                // check if playlist is already loaded\n                if (level && level.details) {\n                    this.state = base_stream_controller_1.State.IDLE;\n                }\n                break;\n            case base_stream_controller_1.State.FRAG_LOADING_WAITING_RETRY:\n                var now = window.performance.now();\n                var retryDate = this.retryDate;\n                // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n                if (!retryDate || (now >= retryDate) || (this.media && this.media.seeking)) {\n                    logger_1.logger.log('mediaController: retryDate reached, switch back to IDLE state');\n                    this.state = base_stream_controller_1.State.IDLE;\n                }\n                break;\n            case base_stream_controller_1.State.ERROR:\n            case base_stream_controller_1.State.STOPPED:\n            case base_stream_controller_1.State.FRAG_LOADING:\n            case base_stream_controller_1.State.PARSING:\n            case base_stream_controller_1.State.PARSED:\n            case base_stream_controller_1.State.ENDED:\n                break;\n            default:\n                break;\n        }\n        // check buffer\n        this._checkBuffer();\n        // check/update current fragment\n        this._checkFragmentChanged();\n    };\n    // Ironically the \"idle\" state is the on we do the most logic in it seems ....\n    // NOTE: Maybe we could rather schedule a check for buffer length after half of the currently\n    //       played segment, or on pause/play/seek instead of naively checking every 100ms?\n    StreamController.prototype._doTickIdle = function () {\n        var hls = this.hls, config = hls.config, media = this.media;\n        // if start level not parsed yet OR\n        // if video not attached AND start fragment already requested OR start frag prefetch disable\n        // exit loop, as we either need more info (level not parsed) or we need media to be attached to load new fragment\n        if (this.levelLastLoaded === undefined || (!media && (this.startFragRequested || !config.startFragPrefetch))) {\n            return;\n        }\n        // if we have not yet loaded any fragment, start loading from start position\n        var pos;\n        if (this.loadedmetadata) {\n            pos = media.currentTime;\n        }\n        else {\n            pos = this.nextLoadPosition;\n        }\n        // determine next load level\n        var level = hls.nextLoadLevel, levelInfo = this.levels[level];\n        if (!levelInfo) {\n            return;\n        }\n        var levelBitrate = levelInfo.bitrate, maxBufLen;\n        // compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s\n        if (levelBitrate) {\n            maxBufLen = Math.max(8 * config.maxBufferSize / levelBitrate, config.maxBufferLength);\n        }\n        else {\n            maxBufLen = config.maxBufferLength;\n        }\n        maxBufLen = Math.min(maxBufLen, config.maxMaxBufferLength);\n        // determine next candidate fragment to be loaded, based on current position and end of buffer position\n        // ensure up to `config.maxMaxBufferLength` of buffer upfront\n        var bufferInfo = buffer_helper_1.BufferHelper.bufferInfo(this.mediaBuffer ? this.mediaBuffer : media, pos, config.maxBufferHole), bufferLen = bufferInfo.len;\n        // Stay idle if we are still with buffer margins\n        if (bufferLen >= maxBufLen) {\n            return;\n        }\n        // if buffer length is less than maxBufLen try to load a new fragment ...\n        logger_1.logger.trace(\"buffer length of \" + bufferLen.toFixed(3) + \" is below max of \" + maxBufLen.toFixed(3) + \". checking for more payload ...\");\n        // set next load level : this will trigger a playlist load if needed\n        this.level = hls.nextLoadLevel = level;\n        var levelDetails = levelInfo.details;\n        // if level info not retrieved yet, switch state and wait for level retrieval\n        // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load\n        // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist)\n        if (!levelDetails || (levelDetails.live && this.levelLastLoaded !== level)) {\n            this.state = base_stream_controller_1.State.WAITING_LEVEL;\n            return;\n        }\n        if (this._streamEnded(bufferInfo, levelDetails)) {\n            var data = {};\n            if (this.altAudio) {\n                data.type = 'video';\n            }\n            this.hls.trigger(events_1.default.BUFFER_EOS, data);\n            this.state = base_stream_controller_1.State.ENDED;\n            return;\n        }\n        // if we have the levelDetails for the selected variant, lets continue enrichen our stream (load keys/fragments or trigger EOS, etc..)\n        this._fetchPayloadOrEos(pos, bufferInfo, levelDetails);\n    };\n    StreamController.prototype._fetchPayloadOrEos = function (pos, bufferInfo, levelDetails) {\n        var fragPrevious = this.fragPrevious, level = this.level, fragments = levelDetails.fragments, fragLen = fragments.length;\n        // empty playlist\n        if (fragLen === 0) {\n            return;\n        }\n        // find fragment index, contiguous with end of buffer position\n        var start = fragments[0].start, end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration, bufferEnd = bufferInfo.end, frag;\n        if (levelDetails.initSegment && !levelDetails.initSegment.data) {\n            frag = levelDetails.initSegment;\n        }\n        else {\n            // in case of live playlist we need to ensure that requested position is not located before playlist start\n            if (levelDetails.live) {\n                var initialLiveManifestSize = this.config.initialLiveManifestSize;\n                if (fragLen < initialLiveManifestSize) {\n                    logger_1.logger.warn(\"Can not start playback of a level, reason: not enough fragments \" + fragLen + \" < \" + initialLiveManifestSize);\n                    return;\n                }\n                frag = this._ensureFragmentAtLivePoint(levelDetails, bufferEnd, start, end, fragPrevious, fragments, fragLen);\n                // if it explicitely returns null don't load any fragment and exit function now\n                if (frag === null) {\n                    return;\n                }\n            }\n            else {\n                // VoD playlist: if bufferEnd before start of playlist, load first fragment\n                if (bufferEnd < start) {\n                    frag = fragments[0];\n                }\n            }\n        }\n        if (!frag) {\n            frag = this._findFragment(start, fragPrevious, fragLen, fragments, bufferEnd, end, levelDetails);\n        }\n        if (frag) {\n            if (frag.encrypted) {\n                logger_1.logger.log(\"Loading key for \" + frag.sn + \" of [\" + levelDetails.startSN + \" ,\" + levelDetails.endSN + \"],level \" + level);\n                this._loadKey(frag);\n            }\n            else {\n                logger_1.logger.log(\"Loading \" + frag.sn + \" of [\" + levelDetails.startSN + \" ,\" + levelDetails.endSN + \"],level \" + level + \", currentTime:\" + pos.toFixed(3) + \",bufferEnd:\" + bufferEnd.toFixed(3));\n                this._loadFragment(frag);\n            }\n        }\n    };\n    StreamController.prototype._ensureFragmentAtLivePoint = function (levelDetails, bufferEnd, start, end, fragPrevious, fragments, fragLen) {\n        var config = this.hls.config, media = this.media;\n        var frag;\n        // check if requested position is within seekable boundaries :\n        // logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);\n        var maxLatency = config.liveMaxLatencyDuration !== undefined ? config.liveMaxLatencyDuration : config.liveMaxLatencyDurationCount * levelDetails.targetduration;\n        if (bufferEnd < Math.max(start - config.maxFragLookUpTolerance, end - maxLatency)) {\n            var liveSyncPosition = this.liveSyncPosition = this.computeLivePosition(start, levelDetails);\n            logger_1.logger.log(\"buffer end: \" + bufferEnd.toFixed(3) + \" is located too far from the end of live sliding playlist, reset currentTime to : \" + liveSyncPosition.toFixed(3));\n            bufferEnd = liveSyncPosition;\n            if (media && media.readyState && media.duration > liveSyncPosition) {\n                media.currentTime = liveSyncPosition;\n            }\n            this.nextLoadPosition = liveSyncPosition;\n        }\n        // if end of buffer greater than live edge, don't load any fragment\n        // this could happen if live playlist intermittently slides in the past.\n        // level 1 loaded [182580161,182580167]\n        // level 1 loaded [182580162,182580169]\n        // Loading 182580168 of [182580162 ,182580169],level 1 ..\n        // Loading 182580169 of [182580162 ,182580169],level 1 ..\n        // level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168\n        // level 1 loaded [182580164,182580171]\n        //\n        // don't return null in case media not loaded yet (readystate === 0)\n        if (levelDetails.PTSKnown && bufferEnd > end && media && media.readyState) {\n            return null;\n        }\n        if (this.startFragRequested && !levelDetails.PTSKnown) {\n            /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...\n               try to load frag matching with next SN.\n               even if SN are not synchronized between playlists, loading this frag will help us\n               compute playlist sliding and find the right one after in case it was not the right consecutive one */\n            if (fragPrevious) {\n                if (levelDetails.hasProgramDateTime) {\n                    // Relies on PDT in order to switch bitrates (Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE)\n                    logger_1.logger.log(\"live playlist, switching playlist, load frag with same PDT: \" + fragPrevious.programDateTime);\n                    frag = fragment_finders_1.findFragmentByPDT(fragments, fragPrevious.endProgramDateTime, config.maxFragLookUpTolerance);\n                }\n                else {\n                    // Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)\n                    var targetSN = fragPrevious.sn + 1;\n                    if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {\n                        var fragNext = fragments[targetSN - levelDetails.startSN];\n                        if (fragPrevious.cc === fragNext.cc) {\n                            frag = fragNext;\n                            logger_1.logger.log(\"live playlist, switching playlist, load frag with next SN: \" + frag.sn);\n                        }\n                    }\n                    // next frag SN not available (or not with same continuity counter)\n                    // look for a frag sharing the same CC\n                    if (!frag) {\n                        frag = binary_search_1.default.search(fragments, function (frag) {\n                            return fragPrevious.cc - frag.cc;\n                        });\n                        if (frag) {\n                            logger_1.logger.log(\"live playlist, switching playlist, load frag with same CC: \" + frag.sn);\n                        }\n                    }\n                }\n            }\n            if (!frag) {\n                /* we have no idea about which fragment should be loaded.\n                   so let's load mid fragment. it will help computing playlist sliding and find the right one\n                */\n                frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];\n                logger_1.logger.log(\"live playlist, switching playlist, unknown, load middle frag : \" + frag.sn);\n            }\n        }\n        return frag;\n    };\n    StreamController.prototype._findFragment = function (start, fragPrevious, fragLen, fragments, bufferEnd, end, levelDetails) {\n        var config = this.hls.config;\n        var frag;\n        if (bufferEnd < end) {\n            var lookupTolerance = (bufferEnd > end - config.maxFragLookUpTolerance) ? 0 : config.maxFragLookUpTolerance;\n            // Remove the tolerance if it would put the bufferEnd past the actual end of stream\n            // Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)\n            frag = fragment_finders_1.findFragmentByPTS(fragPrevious, fragments, bufferEnd, lookupTolerance);\n        }\n        else {\n            // reach end of playlist\n            frag = fragments[fragLen - 1];\n        }\n        if (frag) {\n            var curSNIdx = frag.sn - levelDetails.startSN;\n            var sameLevel = fragPrevious && frag.level === fragPrevious.level;\n            var prevFrag = fragments[curSNIdx - 1];\n            var nextFrag = fragments[curSNIdx + 1];\n            // logger.log('find SN matching with pos:' +  bufferEnd + ':' + frag.sn);\n            if (fragPrevious && frag.sn === fragPrevious.sn) {\n                if (sameLevel && !frag.backtracked) {\n                    if (frag.sn < levelDetails.endSN) {\n                        var deltaPTS = fragPrevious.deltaPTS;\n                        // if there is a significant delta between audio and video, larger than max allowed hole,\n                        // and if previous remuxed fragment did not start with a keyframe. (fragPrevious.dropped)\n                        // let's try to load previous fragment again to get last keyframe\n                        // then we will reload again current fragment (that way we should be able to fill the buffer hole ...)\n                        if (deltaPTS && deltaPTS > config.maxBufferHole && fragPrevious.dropped && curSNIdx) {\n                            frag = prevFrag;\n                            logger_1.logger.warn('SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this');\n                        }\n                        else {\n                            frag = nextFrag;\n                            logger_1.logger.log(\"SN just loaded, load next one: \" + frag.sn, frag);\n                        }\n                    }\n                    else {\n                        frag = null;\n                    }\n                }\n                else if (frag.backtracked) {\n                    // Only backtrack a max of 1 consecutive fragment to prevent sliding back too far when little or no frags start with keyframes\n                    if (nextFrag && nextFrag.backtracked) {\n                        logger_1.logger.warn(\"Already backtracked from fragment \" + nextFrag.sn + \", will not backtrack to fragment \" + frag.sn + \". Loading fragment \" + nextFrag.sn);\n                        frag = nextFrag;\n                    }\n                    else {\n                        // If a fragment has dropped frames and it's in a same level/sequence, load the previous fragment to try and find the keyframe\n                        // Reset the dropped count now since it won't be reset until we parse the fragment again, which prevents infinite backtracking on the same segment\n                        logger_1.logger.warn('Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe');\n                        frag.dropped = 0;\n                        if (prevFrag) {\n                            frag = prevFrag;\n                            frag.backtracked = true;\n                        }\n                        else if (curSNIdx) {\n                            // can't backtrack on very first fragment\n                            frag = null;\n                        }\n                    }\n                }\n            }\n        }\n        return frag;\n    };\n    StreamController.prototype._loadKey = function (frag) {\n        this.state = base_stream_controller_1.State.KEY_LOADING;\n        this.hls.trigger(events_1.default.KEY_LOADING, { frag: frag });\n    };\n    StreamController.prototype._loadFragment = function (frag) {\n        // Check if fragment is not loaded\n        var fragState = this.fragmentTracker.getState(frag);\n        this.fragCurrent = frag;\n        this.startFragRequested = true;\n        // Don't update nextLoadPosition for fragments which are not buffered\n        if (Number.isFinite(frag.sn) && !frag.bitrateTest) {\n            this.nextLoadPosition = frag.start + frag.duration;\n        }\n        // Allow backtracked fragments to load\n        if (frag.backtracked || fragState === fragment_tracker_1.FragmentState.NOT_LOADED || fragState === fragment_tracker_1.FragmentState.PARTIAL) {\n            frag.autoLevel = this.hls.autoLevelEnabled;\n            frag.bitrateTest = this.bitrateTest;\n            this.hls.trigger(events_1.default.FRAG_LOADING, { frag: frag });\n            // lazy demuxer init, as this could take some time ... do it during frag loading\n            if (!this.demuxer) {\n                this.demuxer = new demuxer_1.default(this.hls, 'main');\n            }\n            this.state = base_stream_controller_1.State.FRAG_LOADING;\n        }\n        else if (fragState === fragment_tracker_1.FragmentState.APPENDING) {\n            // Lower the buffer size and try again\n            if (this._reduceMaxBufferLength(frag.duration)) {\n                this.fragmentTracker.removeFragment(frag);\n            }\n        }\n    };\n    Object.defineProperty(StreamController.prototype, \"state\", {\n        get: function () {\n            return this._state;\n        },\n        set: function (nextState) {\n            if (this.state !== nextState) {\n                var previousState = this.state;\n                this._state = nextState;\n                logger_1.logger.log(\"main stream:\" + previousState + \"->\" + nextState);\n                this.hls.trigger(events_1.default.STREAM_STATE_TRANSITION, { previousState: previousState, nextState: nextState });\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    StreamController.prototype.getBufferedFrag = function (position) {\n        return this.fragmentTracker.getBufferedFrag(position, playlist_loader_1.default.LevelType.MAIN);\n    };\n    Object.defineProperty(StreamController.prototype, \"currentLevel\", {\n        get: function () {\n            var media = this.media;\n            if (media) {\n                var frag = this.getBufferedFrag(media.currentTime);\n                if (frag) {\n                    return frag.level;\n                }\n            }\n            return -1;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(StreamController.prototype, \"nextBufferedFrag\", {\n        get: function () {\n            var media = this.media;\n            if (media) {\n                // first get end range of current fragment\n                return this.followingBufferedFrag(this.getBufferedFrag(media.currentTime));\n            }\n            else {\n                return null;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    StreamController.prototype.followingBufferedFrag = function (frag) {\n        if (frag) {\n            // try to get range of next fragment (500ms after this range)\n            return this.getBufferedFrag(frag.endPTS + 0.5);\n        }\n        return null;\n    };\n    Object.defineProperty(StreamController.prototype, \"nextLevel\", {\n        get: function () {\n            var frag = this.nextBufferedFrag;\n            if (frag) {\n                return frag.level;\n            }\n            else {\n                return -1;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    StreamController.prototype._checkFragmentChanged = function () {\n        var fragPlayingCurrent, currentTime, video = this.media;\n        if (video && video.readyState && video.seeking === false) {\n            currentTime = video.currentTime;\n            /* if video element is in seeked state, currentTime can only increase.\n              (assuming that playback rate is positive ...)\n              As sometimes currentTime jumps back to zero after a\n              media decode error, check this, to avoid seeking back to\n              wrong position after a media decode error\n            */\n            if (currentTime > this.lastCurrentTime) {\n                this.lastCurrentTime = currentTime;\n            }\n            if (buffer_helper_1.BufferHelper.isBuffered(video, currentTime)) {\n                fragPlayingCurrent = this.getBufferedFrag(currentTime);\n            }\n            else if (buffer_helper_1.BufferHelper.isBuffered(video, currentTime + 0.1)) {\n                /* ensure that FRAG_CHANGED event is triggered at startup,\n                  when first video frame is displayed and playback is paused.\n                  add a tolerance of 100ms, in case current position is not buffered,\n                  check if current pos+100ms is buffered and use that buffer range\n                  for FRAG_CHANGED event reporting */\n                fragPlayingCurrent = this.getBufferedFrag(currentTime + 0.1);\n            }\n            if (fragPlayingCurrent) {\n                var fragPlaying = fragPlayingCurrent;\n                if (fragPlaying !== this.fragPlaying) {\n                    this.hls.trigger(events_1.default.FRAG_CHANGED, { frag: fragPlaying });\n                    var fragPlayingLevel = fragPlaying.level;\n                    if (!this.fragPlaying || this.fragPlaying.level !== fragPlayingLevel) {\n                        this.hls.trigger(events_1.default.LEVEL_SWITCHED, { level: fragPlayingLevel });\n                    }\n                    this.fragPlaying = fragPlaying;\n                }\n            }\n        }\n    };\n    /*\n      on immediate level switch :\n       - pause playback if playing\n       - cancel any pending load request\n       - and trigger a buffer flush\n    */\n    StreamController.prototype.immediateLevelSwitch = function () {\n        logger_1.logger.log('immediateLevelSwitch');\n        if (!this.immediateSwitch) {\n            this.immediateSwitch = true;\n            var media = this.media, previouslyPaused = void 0;\n            if (media) {\n                previouslyPaused = media.paused;\n                media.pause();\n            }\n            else {\n                // don't restart playback after instant level switch in case media not attached\n                previouslyPaused = true;\n            }\n            this.previouslyPaused = previouslyPaused;\n        }\n        var fragCurrent = this.fragCurrent;\n        if (fragCurrent && fragCurrent.loader) {\n            fragCurrent.loader.abort();\n        }\n        this.fragCurrent = null;\n        // flush everything\n        this.flushMainBuffer(0, Number.POSITIVE_INFINITY);\n    };\n    /**\n     * on immediate level switch end, after new fragment has been buffered:\n     * - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered)\n     * - resume the playback if needed\n     */\n    StreamController.prototype.immediateLevelSwitchEnd = function () {\n        var media = this.media;\n        if (media && media.buffered.length) {\n            this.immediateSwitch = false;\n            if (buffer_helper_1.BufferHelper.isBuffered(media, media.currentTime)) {\n                // only nudge if currentTime is buffered\n                media.currentTime -= 0.0001;\n            }\n            if (!this.previouslyPaused) {\n                media.play();\n            }\n        }\n    };\n    /**\n     * try to switch ASAP without breaking video playback:\n     * in order to ensure smooth but quick level switching,\n     * we need to find the next flushable buffer range\n     * we should take into account new segment fetch time\n     */\n    StreamController.prototype.nextLevelSwitch = function () {\n        var media = this.media;\n        // ensure that media is defined and that metadata are available (to retrieve currentTime)\n        if (media && media.readyState) {\n            var fetchdelay = void 0, fragPlayingCurrent = void 0, nextBufferedFrag = void 0;\n            fragPlayingCurrent = this.getBufferedFrag(media.currentTime);\n            if (fragPlayingCurrent && fragPlayingCurrent.startPTS > 1) {\n                // flush buffer preceding current fragment (flush until current fragment start offset)\n                // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...\n                this.flushMainBuffer(0, fragPlayingCurrent.startPTS - 1);\n            }\n            if (!media.paused) {\n                // add a safety delay of 1s\n                var nextLevelId = this.hls.nextLoadLevel, nextLevel = this.levels[nextLevelId], fragLastKbps = this.fragLastKbps;\n                if (fragLastKbps && this.fragCurrent) {\n                    fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;\n                }\n                else {\n                    fetchdelay = 0;\n                }\n            }\n            else {\n                fetchdelay = 0;\n            }\n            // logger.log('fetchdelay:'+fetchdelay);\n            // find buffer range that will be reached once new fragment will be fetched\n            nextBufferedFrag = this.getBufferedFrag(media.currentTime + fetchdelay);\n            if (nextBufferedFrag) {\n                // we can flush buffer range following this one without stalling playback\n                nextBufferedFrag = this.followingBufferedFrag(nextBufferedFrag);\n                if (nextBufferedFrag) {\n                    // if we are here, we can also cancel any loading/demuxing in progress, as they are useless\n                    var fragCurrent = this.fragCurrent;\n                    if (fragCurrent && fragCurrent.loader) {\n                        fragCurrent.loader.abort();\n                    }\n                    this.fragCurrent = null;\n                    // start flush position is the start PTS of next buffered frag.\n                    // we use frag.naxStartPTS which is max(audio startPTS, video startPTS).\n                    // in case there is a small PTS Delta between audio and video, using maxStartPTS avoids flushing last samples from current fragment\n                    this.flushMainBuffer(nextBufferedFrag.maxStartPTS, Number.POSITIVE_INFINITY);\n                }\n            }\n        }\n    };\n    StreamController.prototype.flushMainBuffer = function (startOffset, endOffset) {\n        this.state = base_stream_controller_1.State.BUFFER_FLUSHING;\n        var flushScope = { startOffset: startOffset, endOffset: endOffset };\n        // if alternate audio tracks are used, only flush video, otherwise flush everything\n        if (this.altAudio) {\n            flushScope.type = 'video';\n        }\n        this.hls.trigger(events_1.default.BUFFER_FLUSHING, flushScope);\n    };\n    StreamController.prototype.onMediaAttached = function (data) {\n        var media = this.media = this.mediaBuffer = data.media;\n        this.onvseeking = this.onMediaSeeking.bind(this);\n        this.onvseeked = this.onMediaSeeked.bind(this);\n        this.onvended = this.onMediaEnded.bind(this);\n        media.addEventListener('seeking', this.onvseeking);\n        media.addEventListener('seeked', this.onvseeked);\n        media.addEventListener('ended', this.onvended);\n        var config = this.config;\n        if (this.levels && config.autoStartLoad) {\n            this.hls.startLoad(config.startPosition);\n        }\n        this.gapController = new gap_controller_1.default(config, media, this.fragmentTracker, this.hls);\n    };\n    StreamController.prototype.onMediaDetaching = function () {\n        var media = this.media;\n        if (media && media.ended) {\n            logger_1.logger.log('MSE detaching and video ended, reset startPosition');\n            this.startPosition = this.lastCurrentTime = 0;\n        }\n        // reset fragment backtracked flag\n        var levels = this.levels;\n        if (levels) {\n            levels.forEach(function (level) {\n                if (level.details) {\n                    level.details.fragments.forEach(function (fragment) {\n                        fragment.backtracked = undefined;\n                    });\n                }\n            });\n        }\n        // remove video listeners\n        if (media) {\n            media.removeEventListener('seeking', this.onvseeking);\n            media.removeEventListener('seeked', this.onvseeked);\n            media.removeEventListener('ended', this.onvended);\n            this.onvseeking = this.onvseeked = this.onvended = null;\n        }\n        this.media = this.mediaBuffer = null;\n        this.loadedmetadata = false;\n        this.stopLoad();\n    };\n    StreamController.prototype.onMediaSeeked = function () {\n        var media = this.media, currentTime = media ? media.currentTime : undefined;\n        if (Number.isFinite(currentTime)) {\n            logger_1.logger.log(\"media seeked to \" + currentTime.toFixed(3));\n        }\n        // tick to speed up FRAGMENT_PLAYING triggering\n        this.tick();\n    };\n    StreamController.prototype.onManifestLoading = function () {\n        // reset buffer on manifest loading\n        logger_1.logger.log('trigger BUFFER_RESET');\n        this.hls.trigger(events_1.default.BUFFER_RESET);\n        this.fragmentTracker.removeAllFragments();\n        this.stalled = false;\n        this.startPosition = this.lastCurrentTime = 0;\n    };\n    StreamController.prototype.onManifestParsed = function (data) {\n        var aac = false, heaac = false, codec;\n        data.levels.forEach(function (level) {\n            // detect if we have different kind of audio codecs used amongst playlists\n            codec = level.audioCodec;\n            if (codec) {\n                if (codec.indexOf('mp4a.40.2') !== -1) {\n                    aac = true;\n                }\n                if (codec.indexOf('mp4a.40.5') !== -1) {\n                    heaac = true;\n                }\n            }\n        });\n        this.audioCodecSwitch = (aac && heaac);\n        if (this.audioCodecSwitch) {\n            logger_1.logger.log('both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC');\n        }\n        this.levels = data.levels;\n        this.startFragRequested = false;\n        var config = this.config;\n        if (config.autoStartLoad || this.forceStartLoad) {\n            this.hls.startLoad(config.startPosition);\n        }\n    };\n    StreamController.prototype.onLevelLoaded = function (data) {\n        var newDetails = data.details;\n        var newLevelId = data.level;\n        var lastLevel = this.levels[this.levelLastLoaded];\n        var curLevel = this.levels[newLevelId];\n        var duration = newDetails.totalduration;\n        var sliding = 0;\n        logger_1.logger.log(\"level \" + newLevelId + \" loaded [\" + newDetails.startSN + \",\" + newDetails.endSN + \"],duration:\" + duration);\n        if (newDetails.live) {\n            var curDetails = curLevel.details;\n            if (curDetails && newDetails.fragments.length > 0) {\n                // we already have details for that level, merge them\n                LevelHelper.mergeDetails(curDetails, newDetails);\n                sliding = newDetails.fragments[0].start;\n                this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);\n                if (newDetails.PTSKnown && Number.isFinite(sliding)) {\n                    logger_1.logger.log(\"live playlist sliding:\" + sliding.toFixed(3));\n                }\n                else {\n                    logger_1.logger.log('live playlist - outdated PTS, unknown sliding');\n                    discontinuities_1.alignStream(this.fragPrevious, lastLevel, newDetails);\n                }\n            }\n            else {\n                logger_1.logger.log('live playlist - first load, unknown sliding');\n                newDetails.PTSKnown = false;\n                discontinuities_1.alignStream(this.fragPrevious, lastLevel, newDetails);\n            }\n        }\n        else {\n            newDetails.PTSKnown = false;\n        }\n        // override level info\n        curLevel.details = newDetails;\n        this.levelLastLoaded = newLevelId;\n        this.hls.trigger(events_1.default.LEVEL_UPDATED, { details: newDetails, level: newLevelId });\n        if (this.startFragRequested === false) {\n            // compute start position if set to -1. use it straight away if value is defined\n            if (this.startPosition === -1 || this.lastCurrentTime === -1) {\n                // first, check if start time offset has been set in playlist, if yes, use this value\n                var startTimeOffset = newDetails.startTimeOffset;\n                if (Number.isFinite(startTimeOffset)) {\n                    if (startTimeOffset < 0) {\n                        logger_1.logger.log(\"negative start time offset \" + startTimeOffset + \", count from end of last fragment\");\n                        startTimeOffset = sliding + duration + startTimeOffset;\n                    }\n                    logger_1.logger.log(\"start time offset found in playlist, adjust startPosition to \" + startTimeOffset);\n                    this.startPosition = startTimeOffset;\n                }\n                else {\n                    // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)\n                    if (newDetails.live) {\n                        this.startPosition = this.computeLivePosition(sliding, newDetails);\n                        logger_1.logger.log(\"configure startPosition to \" + this.startPosition);\n                    }\n                    else {\n                        this.startPosition = 0;\n                    }\n                }\n                this.lastCurrentTime = this.startPosition;\n            }\n            this.nextLoadPosition = this.startPosition;\n        }\n        // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment\n        if (this.state === base_stream_controller_1.State.WAITING_LEVEL) {\n            this.state = base_stream_controller_1.State.IDLE;\n        }\n        // trigger handler right now\n        this.tick();\n    };\n    StreamController.prototype.onKeyLoaded = function () {\n        if (this.state === base_stream_controller_1.State.KEY_LOADING) {\n            this.state = base_stream_controller_1.State.IDLE;\n            this.tick();\n        }\n    };\n    StreamController.prototype.onFragLoaded = function (data) {\n        var _a = this, fragCurrent = _a.fragCurrent, hls = _a.hls, levels = _a.levels, media = _a.media;\n        var fragLoaded = data.frag;\n        if (this.state === base_stream_controller_1.State.FRAG_LOADING &&\n            fragCurrent &&\n            fragLoaded.type === 'main' &&\n            fragLoaded.level === fragCurrent.level &&\n            fragLoaded.sn === fragCurrent.sn) {\n            var stats = data.stats;\n            var currentLevel = levels[fragCurrent.level];\n            var details = currentLevel.details;\n            // reset frag bitrate test in any case after frag loaded event\n            // if this frag was loaded to perform a bitrate test AND if hls.nextLoadLevel is greater than 0\n            // then this means that we should be able to load a fragment at a higher quality level\n            this.bitrateTest = false;\n            this.stats = stats;\n            logger_1.logger.log(\"Loaded \" + fragCurrent.sn + \" of [\" + details.startSN + \" ,\" + details.endSN + \"],level \" + fragCurrent.level);\n            if (fragLoaded.bitrateTest && hls.nextLoadLevel) {\n                // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo\n                this.state = base_stream_controller_1.State.IDLE;\n                this.startFragRequested = false;\n                stats.tparsed = stats.tbuffered = window.performance.now();\n                hls.trigger(events_1.default.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });\n                this.tick();\n            }\n            else if (fragLoaded.sn === 'initSegment') {\n                this.state = base_stream_controller_1.State.IDLE;\n                stats.tparsed = stats.tbuffered = window.performance.now();\n                details.initSegment.data = data.payload;\n                hls.trigger(events_1.default.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });\n                this.tick();\n            }\n            else {\n                logger_1.logger.log(\"Parsing \" + fragCurrent.sn + \" of [\" + details.startSN + \" ,\" + details.endSN + \"],level \" + fragCurrent.level + \", cc \" + fragCurrent.cc);\n                this.state = base_stream_controller_1.State.PARSING;\n                this.pendingBuffering = true;\n                this.appended = false;\n                // Bitrate test frags are not usually buffered so the fragment tracker ignores them. If Hls.js decides to buffer\n                // it (and therefore ends up at this line), then the fragment tracker needs to be manually informed.\n                if (fragLoaded.bitrateTest) {\n                    fragLoaded.bitrateTest = false;\n                    this.fragmentTracker.onFragLoaded({\n                        frag: fragLoaded\n                    });\n                }\n                // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live) and if media is not seeking (this is to overcome potential timestamp drifts between playlists and fragments)\n                var accurateTimeOffset = !(media && media.seeking) && (details.PTSKnown || !details.live);\n                var initSegmentData = details.initSegment ? details.initSegment.data : [];\n                var audioCodec = this._getAudioCodec(currentLevel);\n                // transmux the MPEG-TS data to ISO-BMFF segments\n                var demuxer = this.demuxer = this.demuxer || new demuxer_1.default(this.hls, 'main');\n                demuxer.push(data.payload, initSegmentData, audioCodec, currentLevel.videoCodec, fragCurrent, details.totalduration, accurateTimeOffset);\n            }\n        }\n        this.fragLoadError = 0;\n    };\n    StreamController.prototype.onFragParsingInitSegment = function (data) {\n        var fragCurrent = this.fragCurrent;\n        var fragNew = data.frag;\n        if (fragCurrent &&\n            data.id === 'main' &&\n            fragNew.sn === fragCurrent.sn &&\n            fragNew.level === fragCurrent.level &&\n            this.state === base_stream_controller_1.State.PARSING) {\n            var tracks = data.tracks, trackName = void 0, track = void 0;\n            // if audio track is expected to come from audio stream controller, discard any coming from main\n            if (tracks.audio && this.altAudio) {\n                delete tracks.audio;\n            }\n            // include levelCodec in audio and video tracks\n            track = tracks.audio;\n            if (track) {\n                var audioCodec = this.levels[this.level].audioCodec, ua = navigator.userAgent.toLowerCase();\n                if (audioCodec && this.audioCodecSwap) {\n                    logger_1.logger.log('swapping playlist audio codec');\n                    if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n                        audioCodec = 'mp4a.40.2';\n                    }\n                    else {\n                        audioCodec = 'mp4a.40.5';\n                    }\n                }\n                // in case AAC and HE-AAC audio codecs are signalled in manifest\n                // force HE-AAC , as it seems that most browsers prefers that way,\n                // except for mono streams OR on FF\n                // these conditions might need to be reviewed ...\n                if (this.audioCodecSwitch) {\n                    // don't force HE-AAC if mono stream\n                    if (track.metadata.channelCount !== 1 &&\n                        // don't force HE-AAC if firefox\n                        ua.indexOf('firefox') === -1) {\n                        audioCodec = 'mp4a.40.5';\n                    }\n                }\n                // HE-AAC is broken on Android, always signal audio codec as AAC even if variant manifest states otherwise\n                if (ua.indexOf('android') !== -1 && track.container !== 'audio/mpeg') { // Exclude mpeg audio\n                    audioCodec = 'mp4a.40.2';\n                    logger_1.logger.log(\"Android: force audio codec to \" + audioCodec);\n                }\n                track.levelCodec = audioCodec;\n                track.id = data.id;\n            }\n            track = tracks.video;\n            if (track) {\n                track.levelCodec = this.levels[this.level].videoCodec;\n                track.id = data.id;\n            }\n            this.hls.trigger(events_1.default.BUFFER_CODECS, tracks);\n            // loop through tracks that are going to be provided to bufferController\n            for (trackName in tracks) {\n                track = tracks[trackName];\n                logger_1.logger.log(\"main track:\" + trackName + \",container:\" + track.container + \",codecs[level/parsed]=[\" + track.levelCodec + \"/\" + track.codec + \"]\");\n                var initSegment = track.initSegment;\n                if (initSegment) {\n                    this.appended = true;\n                    // arm pending Buffering flag before appending a segment\n                    this.pendingBuffering = true;\n                    this.hls.trigger(events_1.default.BUFFER_APPENDING, { type: trackName, data: initSegment, parent: 'main', content: 'initSegment' });\n                }\n            }\n            // trigger handler right now\n            this.tick();\n        }\n    };\n    StreamController.prototype.onFragParsingData = function (data) {\n        var _this = this;\n        var fragCurrent = this.fragCurrent;\n        var fragNew = data.frag;\n        if (fragCurrent &&\n            data.id === 'main' &&\n            fragNew.sn === fragCurrent.sn &&\n            fragNew.level === fragCurrent.level &&\n            !(data.type === 'audio' && this.altAudio) && // filter out main audio if audio track is loaded through audio stream controller\n            this.state === base_stream_controller_1.State.PARSING) {\n            var level = this.levels[this.level], frag = fragCurrent;\n            if (!Number.isFinite(data.endPTS)) {\n                data.endPTS = data.startPTS + fragCurrent.duration;\n                data.endDTS = data.startDTS + fragCurrent.duration;\n            }\n            if (data.hasAudio === true) {\n                frag.addElementaryStream(fragment_1.default.ElementaryStreamTypes.AUDIO);\n            }\n            if (data.hasVideo === true) {\n                frag.addElementaryStream(fragment_1.default.ElementaryStreamTypes.VIDEO);\n            }\n            logger_1.logger.log(\"Parsed \" + data.type + \",PTS:[\" + data.startPTS.toFixed(3) + \",\" + data.endPTS.toFixed(3) + \"],DTS:[\" + data.startDTS.toFixed(3) + \"/\" + data.endDTS.toFixed(3) + \"],nb:\" + data.nb + \",dropped:\" + (data.dropped || 0));\n            // Detect gaps in a fragment  and try to fix it by finding a keyframe in the previous fragment (see _findFragments)\n            if (data.type === 'video') {\n                frag.dropped = data.dropped;\n                if (frag.dropped) {\n                    if (!frag.backtracked) {\n                        var levelDetails = level.details;\n                        if (levelDetails && frag.sn === levelDetails.startSN) {\n                            logger_1.logger.warn('missing video frame(s) on first frag, appending with gap', frag.sn);\n                        }\n                        else {\n                            logger_1.logger.warn('missing video frame(s), backtracking fragment', frag.sn);\n                            // Return back to the IDLE state without appending to buffer\n                            // Causes findFragments to backtrack a segment and find the keyframe\n                            // Audio fragments arriving before video sets the nextLoadPosition, causing _findFragments to skip the backtracked fragment\n                            this.fragmentTracker.removeFragment(frag);\n                            frag.backtracked = true;\n                            this.nextLoadPosition = data.startPTS;\n                            this.state = base_stream_controller_1.State.IDLE;\n                            this.fragPrevious = frag;\n                            this.tick();\n                            return;\n                        }\n                    }\n                    else {\n                        logger_1.logger.warn('Already backtracked on this fragment, appending with the gap', frag.sn);\n                    }\n                }\n                else {\n                    // Only reset the backtracked flag if we've loaded the frag without any dropped frames\n                    frag.backtracked = false;\n                }\n            }\n            var drift = LevelHelper.updateFragPTSDTS(level.details, frag, data.startPTS, data.endPTS, data.startDTS, data.endDTS), hls_2 = this.hls;\n            hls_2.trigger(events_1.default.LEVEL_PTS_UPDATED, { details: level.details, level: this.level, drift: drift, type: data.type, start: data.startPTS, end: data.endPTS });\n            // has remuxer dropped video frames located before first keyframe ?\n            [data.data1, data.data2].forEach(function (buffer) {\n                // only append in PARSING state (rationale is that an appending error could happen synchronously on first segment appending)\n                // in that case it is useless to append following segments\n                if (buffer && buffer.length && _this.state === base_stream_controller_1.State.PARSING) {\n                    _this.appended = true;\n                    // arm pending Buffering flag before appending a segment\n                    _this.pendingBuffering = true;\n                    hls_2.trigger(events_1.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'main', content: 'data' });\n                }\n            });\n            // trigger handler right now\n            this.tick();\n        }\n    };\n    StreamController.prototype.onFragParsed = function (data) {\n        var fragCurrent = this.fragCurrent;\n        var fragNew = data.frag;\n        if (fragCurrent &&\n            data.id === 'main' &&\n            fragNew.sn === fragCurrent.sn &&\n            fragNew.level === fragCurrent.level &&\n            this.state === base_stream_controller_1.State.PARSING) {\n            this.stats.tparsed = window.performance.now();\n            this.state = base_stream_controller_1.State.PARSED;\n            this._checkAppendedParsed();\n        }\n    };\n    StreamController.prototype.onAudioTrackSwitching = function (data) {\n        // if any URL found on new audio track, it is an alternate audio track\n        var altAudio = !!data.url, trackId = data.id;\n        // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered\n        // don't do anything if we switch to alt audio: audio stream controller is handling it.\n        // we will just have to change buffer scheduling on audioTrackSwitched\n        if (!altAudio) {\n            if (this.mediaBuffer !== this.media) {\n                logger_1.logger.log('switching on main audio, use media.buffered to schedule main fragment loading');\n                this.mediaBuffer = this.media;\n                var fragCurrent = this.fragCurrent;\n                // we need to refill audio buffer from main: cancel any frag loading to speed up audio switch\n                if (fragCurrent.loader) {\n                    logger_1.logger.log('switching to main audio track, cancel main fragment load');\n                    fragCurrent.loader.abort();\n                }\n                this.fragCurrent = null;\n                this.fragPrevious = null;\n                // destroy demuxer to force init segment generation (following audio switch)\n                if (this.demuxer) {\n                    this.demuxer.destroy();\n                    this.demuxer = null;\n                }\n                // switch to IDLE state to load new fragment\n                this.state = base_stream_controller_1.State.IDLE;\n            }\n            var hls_3 = this.hls;\n            // switching to main audio, flush all audio and trigger track switched\n            hls_3.trigger(events_1.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n            hls_3.trigger(events_1.default.AUDIO_TRACK_SWITCHED, { id: trackId });\n            this.altAudio = false;\n        }\n    };\n    StreamController.prototype.onAudioTrackSwitched = function (data) {\n        var trackId = data.id, altAudio = !!this.hls.audioTracks[trackId].url;\n        if (altAudio) {\n            var videoBuffer = this.videoBuffer;\n            // if we switched on alternate audio, ensure that main fragment scheduling is synced with video sourcebuffer buffered\n            if (videoBuffer && this.mediaBuffer !== videoBuffer) {\n                logger_1.logger.log('switching on alternate audio, use video.buffered to schedule main fragment loading');\n                this.mediaBuffer = videoBuffer;\n            }\n        }\n        this.altAudio = altAudio;\n        this.tick();\n    };\n    StreamController.prototype.onBufferCreated = function (data) {\n        var tracks = data.tracks, mediaTrack, name, alternate = false;\n        for (var type in tracks) {\n            var track = tracks[type];\n            if (track.id === 'main') {\n                name = type;\n                mediaTrack = track;\n                // keep video source buffer reference\n                if (type === 'video') {\n                    this.videoBuffer = tracks[type].buffer;\n                }\n            }\n            else {\n                alternate = true;\n            }\n        }\n        if (alternate && mediaTrack) {\n            logger_1.logger.log(\"alternate track found, use \" + name + \".buffered to schedule main fragment loading\");\n            this.mediaBuffer = mediaTrack.buffer;\n        }\n        else {\n            this.mediaBuffer = this.media;\n        }\n    };\n    StreamController.prototype.onBufferAppended = function (data) {\n        if (data.parent === 'main') {\n            var state = this.state;\n            if (state === base_stream_controller_1.State.PARSING || state === base_stream_controller_1.State.PARSED) {\n                // check if all buffers have been appended\n                this.pendingBuffering = (data.pending > 0);\n                this._checkAppendedParsed();\n            }\n        }\n    };\n    StreamController.prototype._checkAppendedParsed = function () {\n        // trigger handler right now\n        if (this.state === base_stream_controller_1.State.PARSED && (!this.appended || !this.pendingBuffering)) {\n            var frag = this.fragCurrent;\n            if (frag) {\n                var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n                logger_1.logger.log(\"main buffered : \" + time_ranges_1.default.toString(media.buffered));\n                this.fragPrevious = frag;\n                var stats = this.stats;\n                stats.tbuffered = window.performance.now();\n                // we should get rid of this.fragLastKbps\n                this.fragLastKbps = Math.round(8 * stats.total / (stats.tbuffered - stats.tfirst));\n                this.hls.trigger(events_1.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'main' });\n                this.state = base_stream_controller_1.State.IDLE;\n            }\n            this.tick();\n        }\n    };\n    StreamController.prototype.onError = function (data) {\n        var frag = data.frag || this.fragCurrent;\n        // don't handle frag error not related to main fragment\n        if (frag && frag.type !== 'main') {\n            return;\n        }\n        // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end\n        var mediaBuffered = !!this.media && buffer_helper_1.BufferHelper.isBuffered(this.media, this.media.currentTime) && buffer_helper_1.BufferHelper.isBuffered(this.media, this.media.currentTime + 0.5);\n        switch (data.details) {\n            case errors_1.ErrorDetails.FRAG_LOAD_ERROR:\n            case errors_1.ErrorDetails.FRAG_LOAD_TIMEOUT:\n            case errors_1.ErrorDetails.KEY_LOAD_ERROR:\n            case errors_1.ErrorDetails.KEY_LOAD_TIMEOUT:\n                if (!data.fatal) {\n                    // keep retrying until the limit will be reached\n                    if ((this.fragLoadError + 1) <= this.config.fragLoadingMaxRetry) {\n                        // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n                        var delay = Math.min(Math.pow(2, this.fragLoadError) * this.config.fragLoadingRetryDelay, this.config.fragLoadingMaxRetryTimeout);\n                        logger_1.logger.warn(\"mediaController: frag loading failed, retry in \" + delay + \" ms\");\n                        this.retryDate = window.performance.now() + delay;\n                        // retry loading state\n                        // if loadedmetadata is not set, it means that we are emergency switch down on first frag\n                        // in that case, reset startFragRequested flag\n                        if (!this.loadedmetadata) {\n                            this.startFragRequested = false;\n                            this.nextLoadPosition = this.startPosition;\n                        }\n                        this.fragLoadError++;\n                        this.state = base_stream_controller_1.State.FRAG_LOADING_WAITING_RETRY;\n                    }\n                    else {\n                        logger_1.logger.error(\"mediaController: \" + data.details + \" reaches max retry, redispatch as fatal ...\");\n                        // switch error to fatal\n                        data.fatal = true;\n                        this.state = base_stream_controller_1.State.ERROR;\n                    }\n                }\n                break;\n            case errors_1.ErrorDetails.LEVEL_LOAD_ERROR:\n            case errors_1.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n                if (this.state !== base_stream_controller_1.State.ERROR) {\n                    if (data.fatal) {\n                        // if fatal error, stop processing\n                        this.state = base_stream_controller_1.State.ERROR;\n                        logger_1.logger.warn(\"streamController: \" + data.details + \",switch to \" + this.state + \" state ...\");\n                    }\n                    else {\n                        // in case of non fatal error while loading level, if level controller is not retrying to load level , switch back to IDLE\n                        if (!data.levelRetry && this.state === base_stream_controller_1.State.WAITING_LEVEL) {\n                            this.state = base_stream_controller_1.State.IDLE;\n                        }\n                    }\n                }\n                break;\n            case errors_1.ErrorDetails.BUFFER_FULL_ERROR:\n                // if in appending state\n                if (data.parent === 'main' && (this.state === base_stream_controller_1.State.PARSING || this.state === base_stream_controller_1.State.PARSED)) {\n                    // reduce max buf len if current position is buffered\n                    if (mediaBuffered) {\n                        this._reduceMaxBufferLength(this.config.maxBufferLength);\n                        this.state = base_stream_controller_1.State.IDLE;\n                    }\n                    else {\n                        // current position is not buffered, but browser is still complaining about buffer full error\n                        // this happens on IE/Edge, refer to https://github.com/video-dev/hls.js/pull/708\n                        // in that case flush the whole buffer to recover\n                        logger_1.logger.warn('buffer full error also media.currentTime is not buffered, flush everything');\n                        this.fragCurrent = null;\n                        // flush everything\n                        this.flushMainBuffer(0, Number.POSITIVE_INFINITY);\n                    }\n                }\n                break;\n            default:\n                break;\n        }\n    };\n    StreamController.prototype._reduceMaxBufferLength = function (minLength) {\n        var config = this.config;\n        if (config.maxMaxBufferLength >= minLength) {\n            // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...\n            config.maxMaxBufferLength /= 2;\n            logger_1.logger.warn(\"main:reduce max buffer length to \" + config.maxMaxBufferLength + \"s\");\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Checks the health of the buffer and attempts to resolve playback stalls.\n     * @private\n     */\n    StreamController.prototype._checkBuffer = function () {\n        var media = this.media;\n        if (!media || media.readyState === 0) {\n            // Exit early if we don't have media or if the media hasn't bufferd anything yet (readyState 0)\n            return;\n        }\n        var mediaBuffer = this.mediaBuffer ? this.mediaBuffer : media;\n        var buffered = mediaBuffer.buffered;\n        if (!this.loadedmetadata && buffered.length) {\n            this.loadedmetadata = true;\n            this._seekToStartPos();\n        }\n        else if (this.immediateSwitch) {\n            this.immediateLevelSwitchEnd();\n        }\n        else {\n            this.gapController.poll(this.lastCurrentTime, buffered);\n        }\n    };\n    StreamController.prototype.onFragLoadEmergencyAborted = function () {\n        this.state = base_stream_controller_1.State.IDLE;\n        // if loadedmetadata is not set, it means that we are emergency switch down on first frag\n        // in that case, reset startFragRequested flag\n        if (!this.loadedmetadata) {\n            this.startFragRequested = false;\n            this.nextLoadPosition = this.startPosition;\n        }\n        this.tick();\n    };\n    StreamController.prototype.onBufferFlushed = function () {\n        /* after successful buffer flushing, filter flushed fragments from bufferedFrags\n          use mediaBuffered instead of media (so that we will check against video.buffered ranges in case of alt audio track)\n        */\n        var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n        if (media) {\n            // filter fragments potentially evicted from buffer. this is to avoid memleak on live streams\n            this.fragmentTracker.detectEvictedFragments(fragment_1.default.ElementaryStreamTypes.VIDEO, media.buffered);\n        }\n        // move to IDLE once flush complete. this should trigger new fragment loading\n        this.state = base_stream_controller_1.State.IDLE;\n        // reset reference to frag\n        this.fragPrevious = null;\n    };\n    StreamController.prototype.swapAudioCodec = function () {\n        this.audioCodecSwap = !this.audioCodecSwap;\n    };\n    StreamController.prototype.computeLivePosition = function (sliding, levelDetails) {\n        var targetLatency = this.config.liveSyncDuration !== undefined ? this.config.liveSyncDuration : this.config.liveSyncDurationCount * levelDetails.targetduration;\n        return sliding + Math.max(0, levelDetails.totalduration - targetLatency);\n    };\n    /**\n     * Seeks to the set startPosition if not equal to the mediaElement's current time.\n     * @private\n     */\n    StreamController.prototype._seekToStartPos = function () {\n        var media = this.media;\n        var currentTime = media.currentTime;\n        // only adjust currentTime if different from startPosition or if startPosition not buffered\n        // at that stage, there should be only one buffered range, as we reach that code after first fragment has been buffered\n        var startPosition = media.seeking ? currentTime : this.startPosition;\n        // if currentTime not matching with expected startPosition or startPosition not buffered but close to first buffered\n        if (currentTime !== startPosition) {\n            // if startPosition not buffered, let's seek to buffered.start(0)\n            logger_1.logger.log(\"target start position not buffered, seek to buffered.start(0) \" + startPosition + \" from current time \" + currentTime + \" \");\n            media.currentTime = startPosition;\n        }\n    };\n    StreamController.prototype._getAudioCodec = function (currentLevel) {\n        var audioCodec = this.config.defaultAudioCodec || currentLevel.audioCodec;\n        if (this.audioCodecSwap) {\n            logger_1.logger.log('swapping playlist audio codec');\n            if (audioCodec) {\n                if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n                    audioCodec = 'mp4a.40.2';\n                }\n                else {\n                    audioCodec = 'mp4a.40.5';\n                }\n            }\n        }\n        return audioCodec;\n    };\n    Object.defineProperty(StreamController.prototype, \"liveSyncPosition\", {\n        get: function () {\n            return this._liveSyncPosition;\n        },\n        set: function (value) {\n            this._liveSyncPosition = value;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return StreamController;\n}(base_stream_controller_1.default));\nexports.default = StreamController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/controller/subtitle-stream-controller.js\":\n/*!******************************************************!*\\\n  !*** ./src/controller/subtitle-stream-controller.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @class SubtitleStreamController\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar decrypter_1 = __webpack_require__(/*! ../crypt/decrypter */ \"./src/crypt/decrypter.js\");\nvar task_loop_1 = __webpack_require__(/*! ../task-loop */ \"./src/task-loop.js\");\nvar buffer_helper_1 = __webpack_require__(/*! ../utils/buffer-helper */ \"./src/utils/buffer-helper.js\");\nvar fragment_finders_1 = __webpack_require__(/*! ./fragment-finders */ \"./src/controller/fragment-finders.js\");\nvar fragment_tracker_1 = __webpack_require__(/*! ./fragment-tracker */ \"./src/controller/fragment-tracker.js\");\nvar performance = window.performance;\nexports.SubtitleStreamControllerState = {\n    STOPPED: 'STOPPED',\n    IDLE: 'IDLE',\n    KEY_LOADING: 'KEY_LOADING',\n    FRAG_LOADING: 'FRAG_LOADING'\n};\nvar State = exports.SubtitleStreamControllerState;\nvar TICK_INTERVAL = 500; // how often to tick in ms\nvar SubtitleStreamController = /** @class */ (function (_super) {\n    __extends(SubtitleStreamController, _super);\n    function SubtitleStreamController(hls, fragmentTracker) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHED, events_1.default.MEDIA_DETACHING, events_1.default.ERROR, events_1.default.KEY_LOADED, events_1.default.FRAG_LOADED, events_1.default.SUBTITLE_TRACKS_UPDATED, events_1.default.SUBTITLE_TRACK_SWITCH, events_1.default.SUBTITLE_TRACK_LOADED, events_1.default.SUBTITLE_FRAG_PROCESSED) || this;\n        _this.fragmentTracker = fragmentTracker;\n        _this.config = hls.config;\n        _this.state = State.STOPPED;\n        _this.tracks = [];\n        _this.tracksBuffered = [];\n        _this.currentTrackId = -1;\n        _this.decrypter = new decrypter_1.default(hls, hls.config);\n        return _this;\n    }\n    SubtitleStreamController.prototype.onHandlerDestroyed = function () {\n        this.fragmentTracker = null;\n        this.state = State.STOPPED;\n        _super.prototype.onHandlerDestroyed.call(this);\n    };\n    SubtitleStreamController.prototype.onSubtitleFragProcessed = function (data) {\n        this.state = State.IDLE;\n        if (!data.success) {\n            return;\n        }\n        var buffered = this.tracksBuffered[this.currentTrackId];\n        var frag = data.frag;\n        this.fragPrevious = frag;\n        if (!buffered) {\n            return;\n        }\n        // Create/update a buffered array matching the interface used by BufferHelper.bufferedInfo\n        // so we can re-use the logic used to detect how much have been buffered\n        // FIXME: put this in a utility function or proper object for time-ranges manipulation?\n        var timeRange;\n        for (var i = 0; i < buffered.length; i++) {\n            if (frag.start >= buffered[i].start && frag.start <= buffered[i].end) {\n                timeRange = buffered[i];\n                break;\n            }\n        }\n        if (timeRange) {\n            timeRange.end = frag.start + frag.duration;\n        }\n        else {\n            buffered.push({\n                start: frag.start,\n                end: frag.start + frag.duration\n            });\n        }\n    };\n    SubtitleStreamController.prototype.onMediaAttached = function (data) {\n        this.media = data.media;\n        this.state = State.IDLE;\n    };\n    SubtitleStreamController.prototype.onMediaDetaching = function () {\n        this.media = null;\n        this.state = State.STOPPED;\n    };\n    // If something goes wrong, procede to next frag, if we were processing one.\n    SubtitleStreamController.prototype.onError = function (data) {\n        var frag = data.frag;\n        // don't handle error not related to subtitle fragment\n        if (!frag || frag.type !== 'subtitle') {\n            return;\n        }\n        this.state = State.IDLE;\n    };\n    // Got all new subtitle tracks.\n    SubtitleStreamController.prototype.onSubtitleTracksUpdated = function (data) {\n        var _this = this;\n        logger_1.logger.log('subtitle tracks updated');\n        this.tracksBuffered = [];\n        this.tracks = data.subtitleTracks;\n        this.tracks.forEach(function (track) {\n            _this.tracksBuffered[track.id] = [];\n        });\n    };\n    SubtitleStreamController.prototype.onSubtitleTrackSwitch = function (data) {\n        this.currentTrackId = data.id;\n        if (!this.tracks || this.currentTrackId === -1) {\n            this.clearInterval();\n            return;\n        }\n        // Check if track has the necessary details to load fragments\n        var currentTrack = this.tracks[this.currentTrackId];\n        if (currentTrack && currentTrack.details) {\n            this.setInterval(TICK_INTERVAL);\n        }\n    };\n    // Got a new set of subtitle fragments.\n    SubtitleStreamController.prototype.onSubtitleTrackLoaded = function (data) {\n        var id = data.id, details = data.details;\n        if (!this.tracks) {\n            logger_1.logger.warn('Can not update subtitle details, no tracks found');\n            return;\n        }\n        if (this.tracks[id]) {\n            logger_1.logger.log('Updating subtitle track details');\n            this.tracks[id].details = details;\n        }\n        this.setInterval(TICK_INTERVAL);\n    };\n    SubtitleStreamController.prototype.onKeyLoaded = function () {\n        if (this.state === State.KEY_LOADING) {\n            this.state = State.IDLE;\n        }\n    };\n    SubtitleStreamController.prototype.onFragLoaded = function (data) {\n        var fragCurrent = this.fragCurrent;\n        var decryptData = data.frag.decryptdata;\n        var fragLoaded = data.frag;\n        var hls = this.hls;\n        if (this.state === State.FRAG_LOADING &&\n            fragCurrent &&\n            data.frag.type === 'subtitle' &&\n            fragCurrent.sn === data.frag.sn) {\n            // check to see if the payload needs to be decrypted\n            if (data.payload.byteLength > 0 && (decryptData && decryptData.key && decryptData.method === 'AES-128')) {\n                var startTime_1 = performance.now();\n                // decrypt the subtitles\n                this.decrypter.decrypt(data.payload, decryptData.key.buffer, decryptData.iv.buffer, function (decryptedData) {\n                    var endTime = performance.now();\n                    hls.trigger(events_1.default.FRAG_DECRYPTED, { frag: fragLoaded, payload: decryptedData, stats: { tstart: startTime_1, tdecrypt: endTime } });\n                });\n            }\n        }\n    };\n    SubtitleStreamController.prototype.doTick = function () {\n        if (!this.media) {\n            this.state = State.IDLE;\n            return;\n        }\n        switch (this.state) {\n            case State.IDLE:\n                var tracks = this.tracks;\n                var trackId = this.currentTrackId;\n                if (!tracks || !tracks[trackId] || !tracks[trackId].details) {\n                    break;\n                }\n                var trackDetails = tracks[trackId].details;\n                var config = this.config;\n                var maxBufferHole = config.maxBufferHole;\n                var maxConfigBuffer = Math.min(config.maxBufferLength, config.maxMaxBufferLength);\n                var maxFragLookUpTolerance = config.maxFragLookUpTolerance;\n                var bufferedInfo = buffer_helper_1.BufferHelper.bufferedInfo(this._getBuffered(), this.media.currentTime, maxBufferHole);\n                var bufferEnd = bufferedInfo.end;\n                var bufferLen = bufferedInfo.len;\n                var fragments = trackDetails.fragments;\n                var fragLen = fragments.length;\n                var end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration;\n                var foundFrag = void 0;\n                if (bufferLen < maxConfigBuffer && bufferEnd < end) {\n                    foundFrag = fragment_finders_1.findFragmentByPTS(this.fragPrevious, fragments, bufferEnd, maxFragLookUpTolerance);\n                }\n                else if (trackDetails.hasProgramDateTime && this.fragPrevious) {\n                    foundFrag = fragment_finders_1.findFragmentByPDT(fragments, this.fragPrevious.endProgramDateTime, maxFragLookUpTolerance);\n                }\n                if (foundFrag && foundFrag.encrypted) {\n                    logger_1.logger.log(\"Loading key for \" + foundFrag.sn);\n                    this.state = State.KEY_LOADING;\n                    this.hls.trigger(events_1.default.KEY_LOADING, { frag: foundFrag });\n                }\n                else if (foundFrag && this.fragmentTracker.getState(foundFrag) === fragment_tracker_1.FragmentState.NOT_LOADED) {\n                    // only load if fragment is not loaded\n                    foundFrag.trackId = trackId; // Frags don't know their subtitle track ID, so let's just add that...\n                    this.fragCurrent = foundFrag;\n                    this.state = State.FRAG_LOADING;\n                    this.hls.trigger(events_1.default.FRAG_LOADING, { frag: foundFrag });\n                }\n        }\n    };\n    SubtitleStreamController.prototype._getBuffered = function () {\n        return this.tracksBuffered[this.currentTrackId] || [];\n    };\n    return SubtitleStreamController;\n}(task_loop_1.default));\nexports.SubtitleStreamController = SubtitleStreamController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/subtitle-track-controller.js\":\n/*!*****************************************************!*\\\n  !*** ./src/controller/subtitle-track-controller.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * subtitle track controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nfunction filterSubtitleTracks(textTrackList) {\n    var tracks = [];\n    for (var i = 0; i < textTrackList.length; i++) {\n        if (textTrackList[i].kind === 'subtitles') {\n            tracks.push(textTrackList[i]);\n        }\n    }\n    return tracks;\n}\nvar SubtitleTrackController = /** @class */ (function (_super) {\n    __extends(SubtitleTrackController, _super);\n    function SubtitleTrackController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHED, events_1.default.MEDIA_DETACHING, events_1.default.MANIFEST_LOADING, events_1.default.MANIFEST_LOADED, events_1.default.SUBTITLE_TRACK_LOADED) || this;\n        _this.tracks = [];\n        _this.trackId = -1;\n        _this.media = null;\n        /**\n         * @member {boolean} subtitleDisplay Enable/disable subtitle display rendering\n         */\n        _this.subtitleDisplay = true;\n        return _this;\n    }\n    SubtitleTrackController.prototype._onTextTracksChanged = function () {\n        // Media is undefined when switching streams via loadSource()\n        if (!this.media) {\n            return;\n        }\n        var trackId = -1;\n        var tracks = filterSubtitleTracks(this.media.textTracks);\n        for (var id = 0; id < tracks.length; id++) {\n            if (tracks[id].mode === 'hidden') {\n                // Do not break in case there is a following track with showing.\n                trackId = id;\n            }\n            else if (tracks[id].mode === 'showing') {\n                trackId = id;\n                break;\n            }\n        }\n        // Setting current subtitleTrack will invoke code.\n        this.subtitleTrack = trackId;\n    };\n    SubtitleTrackController.prototype.destroy = function () {\n        event_handler_1.default.prototype.destroy.call(this);\n    };\n    // Listen for subtitle track change, then extract the current track ID.\n    SubtitleTrackController.prototype.onMediaAttached = function (data) {\n        var _this = this;\n        this.media = data.media;\n        if (!this.media) {\n            return;\n        }\n        if (this.queuedDefaultTrack) {\n            this.subtitleTrack = this.queuedDefaultTrack;\n            delete this.queuedDefaultTrack;\n        }\n        this.trackChangeListener = this._onTextTracksChanged.bind(this);\n        this.useTextTrackPolling = !(this.media.textTracks && 'onchange' in this.media.textTracks);\n        if (this.useTextTrackPolling) {\n            this.subtitlePollingInterval = setInterval(function () {\n                _this.trackChangeListener();\n            }, 500);\n        }\n        else {\n            this.media.textTracks.addEventListener('change', this.trackChangeListener);\n        }\n    };\n    SubtitleTrackController.prototype.onMediaDetaching = function () {\n        if (!this.media) {\n            return;\n        }\n        if (this.useTextTrackPolling) {\n            clearInterval(this.subtitlePollingInterval);\n        }\n        else {\n            this.media.textTracks.removeEventListener('change', this.trackChangeListener);\n        }\n        this.media = null;\n    };\n    // Reset subtitle tracks on manifest loading\n    SubtitleTrackController.prototype.onManifestLoading = function () {\n        this.tracks = [];\n        this.trackId = -1;\n    };\n    // Fired whenever a new manifest is loaded.\n    SubtitleTrackController.prototype.onManifestLoaded = function (data) {\n        var _this = this;\n        var tracks = data.subtitles || [];\n        this.tracks = tracks;\n        this.trackId = -1;\n        this.hls.trigger(events_1.default.SUBTITLE_TRACKS_UPDATED, { subtitleTracks: tracks });\n        // loop through available subtitle tracks and autoselect default if needed\n        // TODO: improve selection logic to handle forced, etc\n        tracks.forEach(function (track) {\n            if (track.default) {\n                // setting this.subtitleTrack will trigger internal logic\n                // if media has not been attached yet, it will fail\n                // we keep a reference to the default track id\n                // and we'll set subtitleTrack when onMediaAttached is triggered\n                if (_this.media) {\n                    _this.subtitleTrack = track.id;\n                }\n                else {\n                    _this.queuedDefaultTrack = track.id;\n                }\n            }\n        });\n    };\n    // Trigger subtitle track playlist reload.\n    SubtitleTrackController.prototype.onTick = function () {\n        var trackId = this.trackId;\n        var subtitleTrack = this.tracks[trackId];\n        if (!subtitleTrack) {\n            return;\n        }\n        var details = subtitleTrack.details;\n        // check if we need to load playlist for this subtitle Track\n        if (!details || details.live) {\n            // track not retrieved yet, or live playlist we need to (re)load it\n            logger_1.logger.log(\"(re)loading playlist for subtitle track \" + trackId);\n            this.hls.trigger(events_1.default.SUBTITLE_TRACK_LOADING, { url: subtitleTrack.url, id: trackId });\n        }\n    };\n    SubtitleTrackController.prototype.onSubtitleTrackLoaded = function (data) {\n        var _this = this;\n        if (data.id < this.tracks.length) {\n            logger_1.logger.log(\"subtitle track \" + data.id + \" loaded\");\n            this.tracks[data.id].details = data.details;\n            // check if current playlist is a live playlist\n            if (data.details.live && !this.timer) {\n                // if live playlist we will have to reload it periodically\n                // set reload period to playlist target duration\n                this.timer = setInterval(function () {\n                    _this.onTick();\n                }, 1000 * data.details.targetduration, this);\n            }\n            if (!data.details.live && this.timer) {\n                // playlist is not live and timer is armed : stopping it\n                this._stopTimer();\n            }\n        }\n    };\n    Object.defineProperty(SubtitleTrackController.prototype, \"subtitleTracks\", {\n        /** get alternate subtitle tracks list from playlist **/\n        get: function () {\n            return this.tracks;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(SubtitleTrackController.prototype, \"subtitleTrack\", {\n        /** get index of the selected subtitle track (index in subtitle track lists) **/\n        get: function () {\n            return this.trackId;\n        },\n        /** select a subtitle track, based on its index in subtitle track lists**/\n        set: function (subtitleTrackId) {\n            if (this.trackId !== subtitleTrackId) {\n                this._toggleTrackModes(subtitleTrackId);\n                this.setSubtitleTrackInternal(subtitleTrackId);\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n     * This method is responsible for validating the subtitle index and periodically reloading if live.\n     * Dispatches the SUBTITLE_TRACK_SWITCH event, which instructs the subtitle-stream-controller to load the selected track.\n     * @param newId - The id of the subtitle track to activate.\n     */\n    SubtitleTrackController.prototype.setSubtitleTrackInternal = function (newId) {\n        var _a = this, hls = _a.hls, tracks = _a.tracks;\n        if (typeof newId !== 'number' || newId < -1 || newId >= tracks.length) {\n            return;\n        }\n        this._stopTimer();\n        this.trackId = newId;\n        logger_1.logger.log(\"switching to subtitle track \" + newId);\n        hls.trigger(events_1.default.SUBTITLE_TRACK_SWITCH, { id: newId });\n        if (newId === -1) {\n            return;\n        }\n        // check if we need to load playlist for this subtitle Track\n        var subtitleTrack = tracks[newId];\n        var details = subtitleTrack.details;\n        if (!details || details.live) {\n            // track not retrieved yet, or live playlist we need to (re)load it\n            logger_1.logger.log(\"(re)loading playlist for subtitle track \" + newId);\n            hls.trigger(events_1.default.SUBTITLE_TRACK_LOADING, { url: subtitleTrack.url, id: newId });\n        }\n    };\n    SubtitleTrackController.prototype._stopTimer = function () {\n        if (this.timer) {\n            clearInterval(this.timer);\n            this.timer = null;\n        }\n    };\n    /**\n     * Disables the old subtitleTrack and sets current mode on the next subtitleTrack.\n     * This operates on the DOM textTracks.\n     * A value of -1 will disable all subtitle tracks.\n     * @param newId - The id of the next track to enable\n     * @private\n     */\n    SubtitleTrackController.prototype._toggleTrackModes = function (newId) {\n        var _a = this, media = _a.media, subtitleDisplay = _a.subtitleDisplay, trackId = _a.trackId;\n        if (!media) {\n            return;\n        }\n        var textTracks = filterSubtitleTracks(media.textTracks);\n        if (newId === -1) {\n            [].slice.call(textTracks).forEach(function (track) {\n                track.mode = 'disabled';\n            });\n        }\n        else {\n            var oldTrack = textTracks[trackId];\n            if (oldTrack) {\n                oldTrack.mode = 'disabled';\n            }\n        }\n        var nextTrack = textTracks[newId];\n        if (nextTrack) {\n            nextTrack.mode = subtitleDisplay ? 'showing' : 'hidden';\n        }\n    };\n    return SubtitleTrackController;\n}(event_handler_1.default));\nexports.default = SubtitleTrackController;\n\n\n/***/ }),\n\n/***/ \"./src/controller/timeline-controller.js\":\n/*!***********************************************!*\\\n  !*** ./src/controller/timeline-controller.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * Timeline Controller\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar cea_608_parser_1 = __webpack_require__(/*! ../utils/cea-608-parser */ \"./src/utils/cea-608-parser.js\");\nvar output_filter_1 = __webpack_require__(/*! ../utils/output-filter */ \"./src/utils/output-filter.js\");\nvar webvtt_parser_1 = __webpack_require__(/*! ../utils/webvtt-parser */ \"./src/utils/webvtt-parser.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar texttrack_utils_1 = __webpack_require__(/*! ../utils/texttrack-utils */ \"./src/utils/texttrack-utils.js\");\nfunction canReuseVttTextTrack(inUseTrack, manifestTrack) {\n    return inUseTrack && inUseTrack.label === manifestTrack.name && !(inUseTrack.textTrack1 || inUseTrack.textTrack2);\n}\nfunction intersection(x1, x2, y1, y2) {\n    return Math.min(x2, y2) - Math.max(x1, y1);\n}\nvar TimelineController = /** @class */ (function (_super) {\n    __extends(TimelineController, _super);\n    function TimelineController(hls) {\n        var _this = _super.call(this, hls, events_1.default.MEDIA_ATTACHING, events_1.default.MEDIA_DETACHING, events_1.default.FRAG_PARSING_USERDATA, events_1.default.FRAG_DECRYPTED, events_1.default.MANIFEST_LOADING, events_1.default.MANIFEST_LOADED, events_1.default.FRAG_LOADED, events_1.default.LEVEL_SWITCHING, events_1.default.INIT_PTS_FOUND) || this;\n        _this.hls = hls;\n        _this.config = hls.config;\n        _this.enabled = true;\n        _this.Cues = hls.config.cueHandler;\n        _this.textTracks = [];\n        _this.tracks = [];\n        _this.unparsedVttFrags = [];\n        _this.initPTS = [];\n        _this.cueRanges = [];\n        _this.captionsTracks = {};\n        _this.captionsProperties = {\n            textTrack1: {\n                label: _this.config.captionsTextTrack1Label,\n                languageCode: _this.config.captionsTextTrack1LanguageCode\n            },\n            textTrack2: {\n                label: _this.config.captionsTextTrack2Label,\n                languageCode: _this.config.captionsTextTrack2LanguageCode\n            }\n        };\n        if (_this.config.enableCEA708Captions) {\n            var channel1 = new output_filter_1.default(_this, 'textTrack1');\n            var channel2 = new output_filter_1.default(_this, 'textTrack2');\n            _this.cea608Parser = new cea_608_parser_1.default(0, channel1, channel2);\n        }\n        return _this;\n    }\n    TimelineController.prototype.addCues = function (trackName, startTime, endTime, screen) {\n        // skip cues which overlap more than 50% with previously parsed time ranges\n        var ranges = this.cueRanges;\n        var merged = false;\n        for (var i = ranges.length; i--;) {\n            var cueRange = ranges[i];\n            var overlap = intersection(cueRange[0], cueRange[1], startTime, endTime);\n            if (overlap >= 0) {\n                cueRange[0] = Math.min(cueRange[0], startTime);\n                cueRange[1] = Math.max(cueRange[1], endTime);\n                merged = true;\n                if ((overlap / (endTime - startTime)) > 0.5) {\n                    return;\n                }\n            }\n        }\n        if (!merged) {\n            ranges.push([startTime, endTime]);\n        }\n        this.Cues.newCue(this.captionsTracks[trackName], startTime, endTime, screen);\n    };\n    // Triggered when an initial PTS is found; used for synchronisation of WebVTT.\n    TimelineController.prototype.onInitPtsFound = function (data) {\n        var _this = this;\n        if (data.id === 'main') {\n            this.initPTS[data.frag.cc] = data.initPTS;\n        }\n        // Due to asynchronous processing, initial PTS may arrive later than the first VTT fragments are loaded.\n        // Parse any unparsed fragments upon receiving the initial PTS.\n        if (this.unparsedVttFrags.length) {\n            var unparsedVttFrags = this.unparsedVttFrags;\n            this.unparsedVttFrags = [];\n            unparsedVttFrags.forEach(function (frag) {\n                _this.onFragLoaded(frag);\n            });\n        }\n    };\n    TimelineController.prototype.getExistingTrack = function (trackName) {\n        var media = this.media;\n        if (media) {\n            for (var i = 0; i < media.textTracks.length; i++) {\n                var textTrack = media.textTracks[i];\n                if (textTrack[trackName]) {\n                    return textTrack;\n                }\n            }\n        }\n        return null;\n    };\n    TimelineController.prototype.createCaptionsTrack = function (trackName) {\n        var _a = this.captionsProperties[trackName], label = _a.label, languageCode = _a.languageCode;\n        var captionsTracks = this.captionsTracks;\n        if (!captionsTracks[trackName]) {\n            // Enable reuse of existing text track.\n            var existingTrack = this.getExistingTrack(trackName);\n            if (!existingTrack) {\n                var textTrack = this.createTextTrack('captions', label, languageCode);\n                if (textTrack) {\n                    // Set a special property on the track so we know it's managed by Hls.js\n                    textTrack[trackName] = true;\n                    captionsTracks[trackName] = textTrack;\n                }\n            }\n            else {\n                captionsTracks[trackName] = existingTrack;\n                texttrack_utils_1.clearCurrentCues(captionsTracks[trackName]);\n                texttrack_utils_1.sendAddTrackEvent(captionsTracks[trackName], this.media);\n            }\n        }\n    };\n    TimelineController.prototype.createTextTrack = function (kind, label, lang) {\n        var media = this.media;\n        if (media) {\n            return media.addTextTrack(kind, label, lang);\n        }\n    };\n    TimelineController.prototype.destroy = function () {\n        event_handler_1.default.prototype.destroy.call(this);\n    };\n    TimelineController.prototype.onMediaAttaching = function (data) {\n        this.media = data.media;\n        this._cleanTracks();\n    };\n    TimelineController.prototype.onMediaDetaching = function () {\n        var captionsTracks = this.captionsTracks;\n        Object.keys(captionsTracks).forEach(function (trackName) {\n            texttrack_utils_1.clearCurrentCues(captionsTracks[trackName]);\n            delete captionsTracks[trackName];\n        });\n    };\n    TimelineController.prototype.onManifestLoading = function () {\n        this.lastSn = -1; // Detect discontiguity in fragment parsing\n        this.prevCC = -1;\n        this.vttCCs = {\n            ccOffset: 0,\n            presentationOffset: 0,\n            0: {\n                start: 0, prevCC: -1, new: false\n            }\n        };\n        this._cleanTracks();\n    };\n    TimelineController.prototype._cleanTracks = function () {\n        // clear outdated subtitles\n        var media = this.media;\n        if (media) {\n            var textTracks = media.textTracks;\n            if (textTracks) {\n                for (var i = 0; i < textTracks.length; i++) {\n                    texttrack_utils_1.clearCurrentCues(textTracks[i]);\n                }\n            }\n        }\n    };\n    TimelineController.prototype.onManifestLoaded = function (data) {\n        var _this = this;\n        this.textTracks = [];\n        this.unparsedVttFrags = this.unparsedVttFrags || [];\n        this.initPTS = [];\n        this.cueRanges = [];\n        if (this.config.enableWebVTT) {\n            this.tracks = data.subtitles || [];\n            var inUseTracks_1 = this.media ? this.media.textTracks : [];\n            this.tracks.forEach(function (track, index) {\n                var textTrack;\n                if (index < inUseTracks_1.length) {\n                    var inUseTrack = [].slice.call(inUseTracks_1).find(function (inUseTrack) { return canReuseVttTextTrack(inUseTrack, track); });\n                    // Reuse tracks with the same label, but do not reuse 608/708 tracks\n                    if (inUseTrack) {\n                        textTrack = inUseTrack;\n                    }\n                }\n                if (!textTrack) {\n                    textTrack = _this.createTextTrack('subtitles', track.name, track.lang);\n                }\n                if (track.default) {\n                    textTrack.mode = _this.hls.subtitleDisplay ? 'showing' : 'hidden';\n                }\n                else {\n                    textTrack.mode = 'disabled';\n                }\n                _this.textTracks.push(textTrack);\n            });\n        }\n    };\n    TimelineController.prototype.onLevelSwitching = function () {\n        this.enabled = this.hls.currentLevel.closedCaptions !== 'NONE';\n    };\n    TimelineController.prototype.onFragLoaded = function (data) {\n        var frag = data.frag, payload = data.payload;\n        if (frag.type === 'main') {\n            var sn = frag.sn;\n            // if this frag isn't contiguous, clear the parser so cues with bad start/end times aren't added to the textTrack\n            if (sn !== this.lastSn + 1) {\n                var cea608Parser = this.cea608Parser;\n                if (cea608Parser) {\n                    cea608Parser.reset();\n                }\n            }\n            this.lastSn = sn;\n        } // eslint-disable-line brace-style\n        // If fragment is subtitle type, parse as WebVTT.\n        else if (frag.type === 'subtitle') {\n            if (payload.byteLength) {\n                // We need an initial synchronisation PTS. Store fragments as long as none has arrived.\n                if (!Number.isFinite(this.initPTS[frag.cc])) {\n                    this.unparsedVttFrags.push(data);\n                    if (this.initPTS.length) {\n                        // finish unsuccessfully, otherwise the subtitle-stream-controller could be blocked from loading new frags.\n                        this.hls.trigger(events_1.default.SUBTITLE_FRAG_PROCESSED, { success: false, frag: frag });\n                    }\n                    return;\n                }\n                var decryptData = frag.decryptdata;\n                // If the subtitles are not encrypted, parse VTTs now. Otherwise, we need to wait.\n                if ((decryptData == null) || (decryptData.key == null) || (decryptData.method !== 'AES-128')) {\n                    this._parseVTTs(frag, payload);\n                }\n            }\n            else {\n                // In case there is no payload, finish unsuccessfully.\n                this.hls.trigger(events_1.default.SUBTITLE_FRAG_PROCESSED, { success: false, frag: frag });\n            }\n        }\n    };\n    TimelineController.prototype._parseVTTs = function (frag, payload) {\n        var vttCCs = this.vttCCs;\n        if (!vttCCs[frag.cc]) {\n            vttCCs[frag.cc] = { start: frag.start, prevCC: this.prevCC, new: true };\n            this.prevCC = frag.cc;\n        }\n        var textTracks = this.textTracks, hls = this.hls;\n        // Parse the WebVTT file contents.\n        webvtt_parser_1.default.parse(payload, this.initPTS[frag.cc], vttCCs, frag.cc, function (cues) {\n            var currentTrack = textTracks[frag.trackId];\n            // WebVTTParser.parse is an async method and if the currently selected text track mode is set to \"disabled\"\n            // before parsing is done then don't try to access currentTrack.cues.getCueById as cues will be null\n            // and trying to access getCueById method of cues will throw an exception\n            if (currentTrack.mode === 'disabled') {\n                hls.trigger(events_1.default.SUBTITLE_FRAG_PROCESSED, { success: false, frag: frag });\n                return;\n            }\n            // Add cues and trigger event with success true.\n            cues.forEach(function (cue) {\n                // Sometimes there are cue overlaps on segmented vtts so the same\n                // cue can appear more than once in different vtt files.\n                // This avoid showing duplicated cues with same timecode and text.\n                if (!currentTrack.cues.getCueById(cue.id)) {\n                    try {\n                        currentTrack.addCue(cue);\n                    }\n                    catch (err) {\n                        var textTrackCue = new window.TextTrackCue(cue.startTime, cue.endTime, cue.text);\n                        textTrackCue.id = cue.id;\n                        currentTrack.addCue(textTrackCue);\n                    }\n                }\n            });\n            hls.trigger(events_1.default.SUBTITLE_FRAG_PROCESSED, { success: true, frag: frag });\n        }, function (e) {\n            // Something went wrong while parsing. Trigger event with success false.\n            logger_1.logger.log(\"Failed to parse VTT cue: \" + e);\n            hls.trigger(events_1.default.SUBTITLE_FRAG_PROCESSED, { success: false, frag: frag });\n        });\n    };\n    TimelineController.prototype.onFragDecrypted = function (data) {\n        var decryptedData = data.payload, frag = data.frag;\n        if (frag.type === 'subtitle') {\n            if (!Number.isFinite(this.initPTS[frag.cc])) {\n                this.unparsedVttFrags.push(data);\n                return;\n            }\n            this._parseVTTs(frag, decryptedData);\n        }\n    };\n    TimelineController.prototype.onFragParsingUserdata = function (data) {\n        // push all of the CEA-708 messages into the interpreter\n        // immediately. It will create the proper timestamps based on our PTS value\n        if (this.enabled && this.config.enableCEA708Captions) {\n            for (var i = 0; i < data.samples.length; i++) {\n                var ccdatas = this.extractCea608Data(data.samples[i].bytes);\n                this.cea608Parser.addData(data.samples[i].pts, ccdatas);\n            }\n        }\n    };\n    TimelineController.prototype.extractCea608Data = function (byteArray) {\n        var count = byteArray[0] & 31;\n        var position = 2;\n        var tmpByte, ccbyte1, ccbyte2, ccValid, ccType;\n        var actualCCBytes = [];\n        for (var j = 0; j < count; j++) {\n            tmpByte = byteArray[position++];\n            ccbyte1 = 0x7F & byteArray[position++];\n            ccbyte2 = 0x7F & byteArray[position++];\n            ccValid = (4 & tmpByte) !== 0;\n            ccType = 3 & tmpByte;\n            if (ccbyte1 === 0 && ccbyte2 === 0) {\n                continue;\n            }\n            if (ccValid) {\n                if (ccType === 0) { // || ccType === 1\n                    actualCCBytes.push(ccbyte1);\n                    actualCCBytes.push(ccbyte2);\n                }\n            }\n        }\n        return actualCCBytes;\n    };\n    return TimelineController;\n}(event_handler_1.default));\nexports.default = TimelineController;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/crypt/aes-crypto.js\":\n/*!*********************************!*\\\n  !*** ./src/crypt/aes-crypto.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AESCrypto = /** @class */ (function () {\n    function AESCrypto(subtle, iv) {\n        this.subtle = subtle;\n        this.aesIV = iv;\n    }\n    AESCrypto.prototype.decrypt = function (data, key) {\n        return this.subtle.decrypt({ name: 'AES-CBC', iv: this.aesIV }, key, data);\n    };\n    return AESCrypto;\n}());\nexports.default = AESCrypto;\n\n\n/***/ }),\n\n/***/ \"./src/crypt/aes-decryptor.js\":\n/*!************************************!*\\\n  !*** ./src/crypt/aes-decryptor.js ***!\n  \\************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// PKCS7\nfunction removePadding(buffer) {\n    var outputBytes = buffer.byteLength;\n    var paddingBytes = outputBytes && (new DataView(buffer)).getUint8(outputBytes - 1);\n    if (paddingBytes) {\n        return buffer.slice(0, outputBytes - paddingBytes);\n    }\n    else {\n        return buffer;\n    }\n}\nexports.removePadding = removePadding;\nvar AESDecryptor = /** @class */ (function () {\n    function AESDecryptor() {\n        // Static after running initTable\n        this.rcon = [0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n        this.subMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)];\n        this.invSubMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)];\n        this.sBox = new Uint32Array(256);\n        this.invSBox = new Uint32Array(256);\n        // Changes during runtime\n        this.key = new Uint32Array(0);\n        this.initTable();\n    }\n    // Using view.getUint32() also swaps the byte order.\n    AESDecryptor.prototype.uint8ArrayToUint32Array_ = function (arrayBuffer) {\n        var view = new DataView(arrayBuffer);\n        var newArray = new Uint32Array(4);\n        for (var i = 0; i < 4; i++) {\n            newArray[i] = view.getUint32(i * 4);\n        }\n        return newArray;\n    };\n    AESDecryptor.prototype.initTable = function () {\n        var sBox = this.sBox;\n        var invSBox = this.invSBox;\n        var subMix = this.subMix;\n        var subMix0 = subMix[0];\n        var subMix1 = subMix[1];\n        var subMix2 = subMix[2];\n        var subMix3 = subMix[3];\n        var invSubMix = this.invSubMix;\n        var invSubMix0 = invSubMix[0];\n        var invSubMix1 = invSubMix[1];\n        var invSubMix2 = invSubMix[2];\n        var invSubMix3 = invSubMix[3];\n        var d = new Uint32Array(256);\n        var x = 0;\n        var xi = 0;\n        var i = 0;\n        for (i = 0; i < 256; i++) {\n            if (i < 128) {\n                d[i] = i << 1;\n            }\n            else {\n                d[i] = (i << 1) ^ 0x11b;\n            }\n        }\n        for (i = 0; i < 256; i++) {\n            var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n            sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n            sBox[x] = sx;\n            invSBox[sx] = x;\n            // Compute multiplication\n            var x2 = d[x];\n            var x4 = d[x2];\n            var x8 = d[x4];\n            // Compute sub/invSub bytes, mix columns tables\n            var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n            subMix0[x] = (t << 24) | (t >>> 8);\n            subMix1[x] = (t << 16) | (t >>> 16);\n            subMix2[x] = (t << 8) | (t >>> 24);\n            subMix3[x] = t;\n            // Compute inv sub bytes, inv mix columns tables\n            t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n            invSubMix0[sx] = (t << 24) | (t >>> 8);\n            invSubMix1[sx] = (t << 16) | (t >>> 16);\n            invSubMix2[sx] = (t << 8) | (t >>> 24);\n            invSubMix3[sx] = t;\n            // Compute next counter\n            if (!x) {\n                x = xi = 1;\n            }\n            else {\n                x = x2 ^ d[d[d[x8 ^ x2]]];\n                xi ^= d[d[xi]];\n            }\n        }\n    };\n    AESDecryptor.prototype.expandKey = function (keyBuffer) {\n        // convert keyBuffer to Uint32Array\n        var key = this.uint8ArrayToUint32Array_(keyBuffer);\n        var sameKey = true;\n        var offset = 0;\n        while (offset < key.length && sameKey) {\n            sameKey = (key[offset] === this.key[offset]);\n            offset++;\n        }\n        if (sameKey) {\n            return;\n        }\n        this.key = key;\n        var keySize = this.keySize = key.length;\n        if (keySize !== 4 && keySize !== 6 && keySize !== 8) {\n            throw new Error('Invalid aes key size=' + keySize);\n        }\n        var ksRows = this.ksRows = (keySize + 6 + 1) * 4;\n        var ksRow;\n        var invKsRow;\n        var keySchedule = this.keySchedule = new Uint32Array(ksRows);\n        var invKeySchedule = this.invKeySchedule = new Uint32Array(ksRows);\n        var sbox = this.sBox;\n        var rcon = this.rcon;\n        var invSubMix = this.invSubMix;\n        var invSubMix0 = invSubMix[0];\n        var invSubMix1 = invSubMix[1];\n        var invSubMix2 = invSubMix[2];\n        var invSubMix3 = invSubMix[3];\n        var prev;\n        var t;\n        for (ksRow = 0; ksRow < ksRows; ksRow++) {\n            if (ksRow < keySize) {\n                prev = keySchedule[ksRow] = key[ksRow];\n                continue;\n            }\n            t = prev;\n            if (ksRow % keySize === 0) {\n                // Rot word\n                t = (t << 8) | (t >>> 24);\n                // Sub word\n                t = (sbox[t >>> 24] << 24) | (sbox[(t >>> 16) & 0xff] << 16) | (sbox[(t >>> 8) & 0xff] << 8) | sbox[t & 0xff];\n                // Mix Rcon\n                t ^= rcon[(ksRow / keySize) | 0] << 24;\n            }\n            else if (keySize > 6 && ksRow % keySize === 4) {\n                // Sub word\n                t = (sbox[t >>> 24] << 24) | (sbox[(t >>> 16) & 0xff] << 16) | (sbox[(t >>> 8) & 0xff] << 8) | sbox[t & 0xff];\n            }\n            keySchedule[ksRow] = prev = (keySchedule[ksRow - keySize] ^ t) >>> 0;\n        }\n        for (invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n            ksRow = ksRows - invKsRow;\n            if (invKsRow & 3) {\n                t = keySchedule[ksRow];\n            }\n            else {\n                t = keySchedule[ksRow - 4];\n            }\n            if (invKsRow < 4 || ksRow <= 4) {\n                invKeySchedule[invKsRow] = t;\n            }\n            else {\n                invKeySchedule[invKsRow] = invSubMix0[sbox[t >>> 24]] ^ invSubMix1[sbox[(t >>> 16) & 0xff]] ^ invSubMix2[sbox[(t >>> 8) & 0xff]] ^ invSubMix3[sbox[t & 0xff]];\n            }\n            invKeySchedule[invKsRow] = invKeySchedule[invKsRow] >>> 0;\n        }\n    };\n    // Adding this as a method greatly improves performance.\n    AESDecryptor.prototype.networkToHostOrderSwap = function (word) {\n        return (word << 24) | ((word & 0xff00) << 8) | ((word & 0xff0000) >> 8) | (word >>> 24);\n    };\n    AESDecryptor.prototype.decrypt = function (inputArrayBuffer, offset, aesIV, removePKCS7Padding) {\n        var nRounds = this.keySize + 6;\n        var invKeySchedule = this.invKeySchedule;\n        var invSBOX = this.invSBox;\n        var invSubMix = this.invSubMix;\n        var invSubMix0 = invSubMix[0];\n        var invSubMix1 = invSubMix[1];\n        var invSubMix2 = invSubMix[2];\n        var invSubMix3 = invSubMix[3];\n        var initVector = this.uint8ArrayToUint32Array_(aesIV);\n        var initVector0 = initVector[0];\n        var initVector1 = initVector[1];\n        var initVector2 = initVector[2];\n        var initVector3 = initVector[3];\n        var inputInt32 = new Int32Array(inputArrayBuffer);\n        var outputInt32 = new Int32Array(inputInt32.length);\n        var t0, t1, t2, t3;\n        var s0, s1, s2, s3;\n        var inputWords0, inputWords1, inputWords2, inputWords3;\n        var ksRow, i;\n        var swapWord = this.networkToHostOrderSwap;\n        while (offset < inputInt32.length) {\n            inputWords0 = swapWord(inputInt32[offset]);\n            inputWords1 = swapWord(inputInt32[offset + 1]);\n            inputWords2 = swapWord(inputInt32[offset + 2]);\n            inputWords3 = swapWord(inputInt32[offset + 3]);\n            s0 = inputWords0 ^ invKeySchedule[0];\n            s1 = inputWords3 ^ invKeySchedule[1];\n            s2 = inputWords2 ^ invKeySchedule[2];\n            s3 = inputWords1 ^ invKeySchedule[3];\n            ksRow = 4;\n            // Iterate through the rounds of decryption\n            for (i = 1; i < nRounds; i++) {\n                t0 = invSubMix0[s0 >>> 24] ^ invSubMix1[(s1 >> 16) & 0xff] ^ invSubMix2[(s2 >> 8) & 0xff] ^ invSubMix3[s3 & 0xff] ^ invKeySchedule[ksRow];\n                t1 = invSubMix0[s1 >>> 24] ^ invSubMix1[(s2 >> 16) & 0xff] ^ invSubMix2[(s3 >> 8) & 0xff] ^ invSubMix3[s0 & 0xff] ^ invKeySchedule[ksRow + 1];\n                t2 = invSubMix0[s2 >>> 24] ^ invSubMix1[(s3 >> 16) & 0xff] ^ invSubMix2[(s0 >> 8) & 0xff] ^ invSubMix3[s1 & 0xff] ^ invKeySchedule[ksRow + 2];\n                t3 = invSubMix0[s3 >>> 24] ^ invSubMix1[(s0 >> 16) & 0xff] ^ invSubMix2[(s1 >> 8) & 0xff] ^ invSubMix3[s2 & 0xff] ^ invKeySchedule[ksRow + 3];\n                // Update state\n                s0 = t0;\n                s1 = t1;\n                s2 = t2;\n                s3 = t3;\n                ksRow = ksRow + 4;\n            }\n            // Shift rows, sub bytes, add round key\n            t0 = ((invSBOX[s0 >>> 24] << 24) ^ (invSBOX[(s1 >> 16) & 0xff] << 16) ^ (invSBOX[(s2 >> 8) & 0xff] << 8) ^ invSBOX[s3 & 0xff]) ^ invKeySchedule[ksRow];\n            t1 = ((invSBOX[s1 >>> 24] << 24) ^ (invSBOX[(s2 >> 16) & 0xff] << 16) ^ (invSBOX[(s3 >> 8) & 0xff] << 8) ^ invSBOX[s0 & 0xff]) ^ invKeySchedule[ksRow + 1];\n            t2 = ((invSBOX[s2 >>> 24] << 24) ^ (invSBOX[(s3 >> 16) & 0xff] << 16) ^ (invSBOX[(s0 >> 8) & 0xff] << 8) ^ invSBOX[s1 & 0xff]) ^ invKeySchedule[ksRow + 2];\n            t3 = ((invSBOX[s3 >>> 24] << 24) ^ (invSBOX[(s0 >> 16) & 0xff] << 16) ^ (invSBOX[(s1 >> 8) & 0xff] << 8) ^ invSBOX[s2 & 0xff]) ^ invKeySchedule[ksRow + 3];\n            ksRow = ksRow + 3;\n            // Write\n            outputInt32[offset] = swapWord(t0 ^ initVector0);\n            outputInt32[offset + 1] = swapWord(t3 ^ initVector1);\n            outputInt32[offset + 2] = swapWord(t2 ^ initVector2);\n            outputInt32[offset + 3] = swapWord(t1 ^ initVector3);\n            // reset initVector to last 4 unsigned int\n            initVector0 = inputWords0;\n            initVector1 = inputWords1;\n            initVector2 = inputWords2;\n            initVector3 = inputWords3;\n            offset = offset + 4;\n        }\n        return removePKCS7Padding ? removePadding(outputInt32.buffer) : outputInt32.buffer;\n    };\n    AESDecryptor.prototype.destroy = function () {\n        this.key = undefined;\n        this.keySize = undefined;\n        this.ksRows = undefined;\n        this.sBox = undefined;\n        this.invSBox = undefined;\n        this.subMix = undefined;\n        this.invSubMix = undefined;\n        this.keySchedule = undefined;\n        this.invKeySchedule = undefined;\n        this.rcon = undefined;\n    };\n    return AESDecryptor;\n}());\nexports.default = AESDecryptor;\n\n\n/***/ }),\n\n/***/ \"./src/crypt/decrypter.js\":\n/*!********************************!*\\\n  !*** ./src/crypt/decrypter.js ***!\n  \\********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar aes_crypto_1 = __webpack_require__(/*! ./aes-crypto */ \"./src/crypt/aes-crypto.js\");\nvar fast_aes_key_1 = __webpack_require__(/*! ./fast-aes-key */ \"./src/crypt/fast-aes-key.js\");\nvar aes_decryptor_1 = __webpack_require__(/*! ./aes-decryptor */ \"./src/crypt/aes-decryptor.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar get_self_scope_1 = __webpack_require__(/*! ../utils/get-self-scope */ \"./src/utils/get-self-scope.js\");\n// see https://stackoverflow.com/a/11237259/589493\nvar global = get_self_scope_1.getSelfScope(); // safeguard for code that might run both on worker and main thread\nvar Decrypter = /** @class */ (function () {\n    function Decrypter(observer, config, _a) {\n        var _b = (_a === void 0 ? {} : _a).removePKCS7Padding, removePKCS7Padding = _b === void 0 ? true : _b;\n        this.logEnabled = true;\n        this.observer = observer;\n        this.config = config;\n        this.removePKCS7Padding = removePKCS7Padding;\n        // built in decryptor expects PKCS7 padding\n        if (removePKCS7Padding) {\n            try {\n                var browserCrypto = global.crypto;\n                if (browserCrypto) {\n                    this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;\n                }\n            }\n            catch (e) { }\n        }\n        this.disableWebCrypto = !this.subtle;\n    }\n    Decrypter.prototype.isSync = function () {\n        return (this.disableWebCrypto && this.config.enableSoftwareAES);\n    };\n    Decrypter.prototype.decrypt = function (data, key, iv, callback) {\n        var _this = this;\n        if (this.disableWebCrypto && this.config.enableSoftwareAES) {\n            if (this.logEnabled) {\n                logger_1.logger.log('JS AES decrypt');\n                this.logEnabled = false;\n            }\n            var decryptor = this.decryptor;\n            if (!decryptor) {\n                this.decryptor = decryptor = new aes_decryptor_1.default();\n            }\n            decryptor.expandKey(key);\n            callback(decryptor.decrypt(data, 0, iv, this.removePKCS7Padding));\n        }\n        else {\n            if (this.logEnabled) {\n                logger_1.logger.log('WebCrypto AES decrypt');\n                this.logEnabled = false;\n            }\n            var subtle_1 = this.subtle;\n            if (this.key !== key) {\n                this.key = key;\n                this.fastAesKey = new fast_aes_key_1.default(subtle_1, key);\n            }\n            this.fastAesKey.expandKey()\n                .then(function (aesKey) {\n                // decrypt using web crypto\n                var crypto = new aes_crypto_1.default(subtle_1, iv);\n                crypto.decrypt(data, aesKey)\n                    .catch(function (err) {\n                    _this.onWebCryptoError(err, data, key, iv, callback);\n                })\n                    .then(function (result) {\n                    callback(result);\n                });\n            })\n                .catch(function (err) {\n                _this.onWebCryptoError(err, data, key, iv, callback);\n            });\n        }\n    };\n    Decrypter.prototype.onWebCryptoError = function (err, data, key, iv, callback) {\n        if (this.config.enableSoftwareAES) {\n            logger_1.logger.log('WebCrypto Error, disable WebCrypto API');\n            this.disableWebCrypto = true;\n            this.logEnabled = true;\n            this.decrypt(data, key, iv, callback);\n        }\n        else {\n            logger_1.logger.error(\"decrypting error : \" + err.message);\n            this.observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.FRAG_DECRYPT_ERROR, fatal: true, reason: err.message });\n        }\n    };\n    Decrypter.prototype.destroy = function () {\n        var decryptor = this.decryptor;\n        if (decryptor) {\n            decryptor.destroy();\n            this.decryptor = undefined;\n        }\n    };\n    return Decrypter;\n}());\nexports.default = Decrypter;\n\n\n/***/ }),\n\n/***/ \"./src/crypt/fast-aes-key.js\":\n/*!***********************************!*\\\n  !*** ./src/crypt/fast-aes-key.js ***!\n  \\***********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar FastAESKey = /** @class */ (function () {\n    function FastAESKey(subtle, key) {\n        this.subtle = subtle;\n        this.key = key;\n    }\n    FastAESKey.prototype.expandKey = function () {\n        return this.subtle.importKey('raw', this.key, { name: 'AES-CBC' }, false, ['encrypt', 'decrypt']);\n    };\n    return FastAESKey;\n}());\nexports.default = FastAESKey;\n\n\n/***/ }),\n\n/***/ \"./src/demux/aacdemuxer.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/aacdemuxer.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * AAC demuxer\n */\nvar ADTS = __webpack_require__(/*! ./adts */ \"./src/demux/adts.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar id3_1 = __webpack_require__(/*! ../demux/id3 */ \"./src/demux/id3.js\");\nvar AACDemuxer = /** @class */ (function () {\n    function AACDemuxer(observer, remuxer, config) {\n        this.observer = observer;\n        this.config = config;\n        this.remuxer = remuxer;\n    }\n    AACDemuxer.prototype.resetInitSegment = function (initSegment, audioCodec, videoCodec, duration) {\n        this._audioTrack = { container: 'audio/adts', type: 'audio', id: 0, sequenceNumber: 0, isAAC: true, samples: [], len: 0, manifestCodec: audioCodec, duration: duration, inputTimeScale: 90000 };\n    };\n    AACDemuxer.prototype.resetTimeStamp = function () {\n    };\n    AACDemuxer.probe = function (data) {\n        if (!data) {\n            return false;\n        }\n        // Check for the ADTS sync word\n        // Look for ADTS header | 1111 1111 | 1111 X00X | where X can be either 0 or 1\n        // Layer bits (position 14 and 15) in header should be always 0 for ADTS\n        // More info https://wiki.multimedia.cx/index.php?title=ADTS\n        var id3Data = id3_1.default.getID3Data(data, 0) || [];\n        var offset = id3Data.length;\n        for (var length_1 = data.length; offset < length_1; offset++) {\n            if (ADTS.probe(data, offset)) {\n                logger_1.logger.log('ADTS sync word found !');\n                return true;\n            }\n        }\n        return false;\n    };\n    // feed incoming data to the front of the parsing pipeline\n    AACDemuxer.prototype.append = function (data, timeOffset, contiguous, accurateTimeOffset) {\n        var track = this._audioTrack;\n        var id3Data = id3_1.default.getID3Data(data, 0) || [];\n        var timestamp = id3_1.default.getTimeStamp(id3Data);\n        var pts = Number.isFinite(timestamp) ? timestamp * 90 : timeOffset * 90000;\n        var frameIndex = 0;\n        var stamp = pts;\n        var length = data.length;\n        var offset = id3Data.length;\n        var id3Samples = [{ pts: stamp, dts: stamp, data: id3Data }];\n        while (offset < length - 1) {\n            if (ADTS.isHeader(data, offset) && (offset + 5) < length) {\n                ADTS.initTrackConfig(track, this.observer, data, offset, track.manifestCodec);\n                var frame = ADTS.appendFrame(track, data, offset, pts, frameIndex);\n                if (frame) {\n                    offset += frame.length;\n                    stamp = frame.sample.pts;\n                    frameIndex++;\n                }\n                else {\n                    logger_1.logger.log('Unable to parse AAC frame');\n                    break;\n                }\n            }\n            else if (id3_1.default.isHeader(data, offset)) {\n                id3Data = id3_1.default.getID3Data(data, offset);\n                id3Samples.push({ pts: stamp, dts: stamp, data: id3Data });\n                offset += id3Data.length;\n            }\n            else {\n                // nothing found, keep looking\n                offset++;\n            }\n        }\n        this.remuxer.remux(track, { samples: [] }, { samples: id3Samples, inputTimeScale: 90000 }, { samples: [] }, timeOffset, contiguous, accurateTimeOffset);\n    };\n    AACDemuxer.prototype.destroy = function () {\n    };\n    return AACDemuxer;\n}());\nexports.default = AACDemuxer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/demux/adts.js\":\n/*!***************************!*\\\n  !*** ./src/demux/adts.js ***!\n  \\***************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n *  ADTS parser helper\n */\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nfunction getAudioConfig(observer, data, offset, audioCodec) {\n    var adtsObjectType, // :int\n    adtsSampleingIndex, // :int\n    adtsExtensionSampleingIndex, // :int\n    adtsChanelConfig, // :int\n    config, userAgent = navigator.userAgent.toLowerCase(), manifestCodec = audioCodec, adtsSampleingRates = [\n        96000, 88200,\n        64000, 48000,\n        44100, 32000,\n        24000, 22050,\n        16000, 12000,\n        11025, 8000,\n        7350\n    ];\n    // byte 2\n    adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;\n    adtsSampleingIndex = ((data[offset + 2] & 0x3C) >>> 2);\n    if (adtsSampleingIndex > adtsSampleingRates.length - 1) {\n        observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: \"invalid ADTS sampling index:\" + adtsSampleingIndex });\n        return;\n    }\n    adtsChanelConfig = ((data[offset + 2] & 0x01) << 2);\n    // byte 3\n    adtsChanelConfig |= ((data[offset + 3] & 0xC0) >>> 6);\n    logger_1.logger.log(\"manifest codec:\" + audioCodec + \",ADTS data:type:\" + adtsObjectType + \",sampleingIndex:\" + adtsSampleingIndex + \"[\" + adtsSampleingRates[adtsSampleingIndex] + \"Hz],channelConfig:\" + adtsChanelConfig);\n    // firefox: freq less than 24kHz = AAC SBR (HE-AAC)\n    if (/firefox/i.test(userAgent)) {\n        if (adtsSampleingIndex >= 6) {\n            adtsObjectType = 5;\n            config = new Array(4);\n            // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n            // there is a factor 2 between frame sample rate and output sample rate\n            // multiply frequency by 2 (see table below, equivalent to substract 3)\n            adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n        }\n        else {\n            adtsObjectType = 2;\n            config = new Array(2);\n            adtsExtensionSampleingIndex = adtsSampleingIndex;\n        }\n        // Android : always use AAC\n    }\n    else if (userAgent.indexOf('android') !== -1) {\n        adtsObjectType = 2;\n        config = new Array(2);\n        adtsExtensionSampleingIndex = adtsSampleingIndex;\n    }\n    else {\n        /*  for other browsers (Chrome/Vivaldi/Opera ...)\n            always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)\n        */\n        adtsObjectType = 5;\n        config = new Array(4);\n        // if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)\n        if ((audioCodec && ((audioCodec.indexOf('mp4a.40.29') !== -1) ||\n            (audioCodec.indexOf('mp4a.40.5') !== -1))) ||\n            (!audioCodec && adtsSampleingIndex >= 6)) {\n            // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n            // there is a factor 2 between frame sample rate and output sample rate\n            // multiply frequency by 2 (see table below, equivalent to substract 3)\n            adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n        }\n        else {\n            // if (manifest codec is AAC) AND (frequency less than 24kHz AND nb channel is 1) OR (manifest codec not specified and mono audio)\n            // Chrome fails to play back with low frequency AAC LC mono when initialized with HE-AAC.  This is not a problem with stereo.\n            if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && ((adtsSampleingIndex >= 6 && adtsChanelConfig === 1) ||\n                /vivaldi/i.test(userAgent)) ||\n                (!audioCodec && adtsChanelConfig === 1)) {\n                adtsObjectType = 2;\n                config = new Array(2);\n            }\n            adtsExtensionSampleingIndex = adtsSampleingIndex;\n        }\n    }\n    /* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config\n        ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()\n      Audio Profile / Audio Object Type\n      0: Null\n      1: AAC Main\n      2: AAC LC (Low Complexity)\n      3: AAC SSR (Scalable Sample Rate)\n      4: AAC LTP (Long Term Prediction)\n      5: SBR (Spectral Band Replication)\n      6: AAC Scalable\n     sampling freq\n      0: 96000 Hz\n      1: 88200 Hz\n      2: 64000 Hz\n      3: 48000 Hz\n      4: 44100 Hz\n      5: 32000 Hz\n      6: 24000 Hz\n      7: 22050 Hz\n      8: 16000 Hz\n      9: 12000 Hz\n      10: 11025 Hz\n      11: 8000 Hz\n      12: 7350 Hz\n      13: Reserved\n      14: Reserved\n      15: frequency is written explictly\n      Channel Configurations\n      These are the channel configurations:\n      0: Defined in AOT Specifc Config\n      1: 1 channel: front-center\n      2: 2 channels: front-left, front-right\n    */\n    // audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1\n    config[0] = adtsObjectType << 3;\n    // samplingFrequencyIndex\n    config[0] |= (adtsSampleingIndex & 0x0E) >> 1;\n    config[1] |= (adtsSampleingIndex & 0x01) << 7;\n    // channelConfiguration\n    config[1] |= adtsChanelConfig << 3;\n    if (adtsObjectType === 5) {\n        // adtsExtensionSampleingIndex\n        config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;\n        config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;\n        // adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???\n        //    https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc\n        config[2] |= 2 << 2;\n        config[3] = 0;\n    }\n    return { config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: ('mp4a.40.' + adtsObjectType), manifestCodec: manifestCodec };\n}\nexports.getAudioConfig = getAudioConfig;\nfunction isHeaderPattern(data, offset) {\n    return data[offset] === 0xff && (data[offset + 1] & 0xf6) === 0xf0;\n}\nexports.isHeaderPattern = isHeaderPattern;\nfunction getHeaderLength(data, offset) {\n    return (data[offset + 1] & 0x01 ? 7 : 9);\n}\nexports.getHeaderLength = getHeaderLength;\nfunction getFullFrameLength(data, offset) {\n    return ((data[offset + 3] & 0x03) << 11) |\n        (data[offset + 4] << 3) |\n        ((data[offset + 5] & 0xE0) >>> 5);\n}\nexports.getFullFrameLength = getFullFrameLength;\nfunction isHeader(data, offset) {\n    // Look for ADTS header | 1111 1111 | 1111 X00X | where X can be either 0 or 1\n    // Layer bits (position 14 and 15) in header should be always 0 for ADTS\n    // More info https://wiki.multimedia.cx/index.php?title=ADTS\n    if (offset + 1 < data.length && isHeaderPattern(data, offset)) {\n        return true;\n    }\n    return false;\n}\nexports.isHeader = isHeader;\nfunction probe(data, offset) {\n    // same as isHeader but we also check that ADTS frame follows last ADTS frame\n    // or end of data is reached\n    if (offset + 1 < data.length && isHeaderPattern(data, offset)) {\n        // ADTS header Length\n        var headerLength = getHeaderLength(data, offset);\n        // ADTS frame Length\n        var frameLength = headerLength;\n        if (offset + 5 < data.length) {\n            frameLength = getFullFrameLength(data, offset);\n        }\n        var newOffset = offset + frameLength;\n        if (newOffset === data.length || (newOffset + 1 < data.length && isHeaderPattern(data, newOffset))) {\n            return true;\n        }\n    }\n    return false;\n}\nexports.probe = probe;\nfunction initTrackConfig(track, observer, data, offset, audioCodec) {\n    if (!track.samplerate) {\n        var config = getAudioConfig(observer, data, offset, audioCodec);\n        track.config = config.config;\n        track.samplerate = config.samplerate;\n        track.channelCount = config.channelCount;\n        track.codec = config.codec;\n        track.manifestCodec = config.manifestCodec;\n        logger_1.logger.log(\"parsed codec:\" + track.codec + \",rate:\" + config.samplerate + \",nb channel:\" + config.channelCount);\n    }\n}\nexports.initTrackConfig = initTrackConfig;\nfunction getFrameDuration(samplerate) {\n    return 1024 * 90000 / samplerate;\n}\nexports.getFrameDuration = getFrameDuration;\nfunction parseFrameHeader(data, offset, pts, frameIndex, frameDuration) {\n    var headerLength, frameLength, stamp;\n    var length = data.length;\n    // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n    headerLength = getHeaderLength(data, offset);\n    // retrieve frame size\n    frameLength = getFullFrameLength(data, offset);\n    frameLength -= headerLength;\n    if ((frameLength > 0) && ((offset + headerLength + frameLength) <= length)) {\n        stamp = pts + frameIndex * frameDuration;\n        // logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n        return { headerLength: headerLength, frameLength: frameLength, stamp: stamp };\n    }\n    return undefined;\n}\nexports.parseFrameHeader = parseFrameHeader;\nfunction appendFrame(track, data, offset, pts, frameIndex) {\n    var frameDuration = getFrameDuration(track.samplerate);\n    var header = parseFrameHeader(data, offset, pts, frameIndex, frameDuration);\n    if (header) {\n        var stamp = header.stamp;\n        var headerLength = header.headerLength;\n        var frameLength = header.frameLength;\n        // logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n        var aacSample = {\n            unit: data.subarray(offset + headerLength, offset + headerLength + frameLength),\n            pts: stamp,\n            dts: stamp\n        };\n        track.samples.push(aacSample);\n        track.len += frameLength;\n        return { sample: aacSample, length: frameLength + headerLength };\n    }\n    return undefined;\n}\nexports.appendFrame = appendFrame;\n\n\n/***/ }),\n\n/***/ \"./src/demux/demuxer-inline.js\":\n/*!*************************************!*\\\n  !*** ./src/demux/demuxer-inline.js ***!\n  \\*************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n *\n * inline demuxer: probe fragments and instantiate\n * appropriate demuxer depending on content type (TSDemuxer, AACDemuxer, ...)\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar decrypter_1 = __webpack_require__(/*! ../crypt/decrypter */ \"./src/crypt/decrypter.js\");\nvar aacdemuxer_1 = __webpack_require__(/*! ../demux/aacdemuxer */ \"./src/demux/aacdemuxer.js\");\nvar mp4demuxer_1 = __webpack_require__(/*! ../demux/mp4demuxer */ \"./src/demux/mp4demuxer.js\");\nvar tsdemuxer_1 = __webpack_require__(/*! ../demux/tsdemuxer */ \"./src/demux/tsdemuxer.js\");\nvar mp3demuxer_1 = __webpack_require__(/*! ../demux/mp3demuxer */ \"./src/demux/mp3demuxer.js\");\nvar mp4_remuxer_1 = __webpack_require__(/*! ../remux/mp4-remuxer */ \"./src/remux/mp4-remuxer.js\");\nvar passthrough_remuxer_1 = __webpack_require__(/*! ../remux/passthrough-remuxer */ \"./src/remux/passthrough-remuxer.js\");\nvar get_self_scope_1 = __webpack_require__(/*! ../utils/get-self-scope */ \"./src/utils/get-self-scope.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n// see https://stackoverflow.com/a/11237259/589493\nvar global = get_self_scope_1.getSelfScope(); // safeguard for code that might run both on worker and main thread\nvar now;\n// performance.now() not available on WebWorker, at least on Safari Desktop\ntry {\n    now = global.performance.now.bind(global.performance);\n}\ncatch (err) {\n    logger_1.logger.debug('Unable to use Performance API on this environment');\n    now = global.Date.now;\n}\nvar DemuxerInline = /** @class */ (function () {\n    function DemuxerInline(observer, typeSupported, config, vendor) {\n        this.observer = observer;\n        this.typeSupported = typeSupported;\n        this.config = config;\n        this.vendor = vendor;\n    }\n    DemuxerInline.prototype.destroy = function () {\n        var demuxer = this.demuxer;\n        if (demuxer) {\n            demuxer.destroy();\n        }\n    };\n    DemuxerInline.prototype.push = function (data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS) {\n        var _this = this;\n        if ((data.byteLength > 0) && (decryptdata != null) && (decryptdata.key != null) && (decryptdata.method === 'AES-128')) {\n            var decrypter = this.decrypter;\n            if (decrypter == null) {\n                decrypter = this.decrypter = new decrypter_1.default(this.observer, this.config);\n            }\n            var startTime_1 = now();\n            decrypter.decrypt(data, decryptdata.key.buffer, decryptdata.iv.buffer, function (decryptedData) {\n                var endTime = now();\n                _this.observer.trigger(events_1.default.FRAG_DECRYPTED, { stats: { tstart: startTime_1, tdecrypt: endTime } });\n                _this.pushDecrypted(new Uint8Array(decryptedData), decryptdata, new Uint8Array(initSegment), audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS);\n            });\n        }\n        else {\n            this.pushDecrypted(new Uint8Array(data), decryptdata, new Uint8Array(initSegment), audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS);\n        }\n    };\n    DemuxerInline.prototype.pushDecrypted = function (data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS) {\n        var demuxer = this.demuxer;\n        if (!demuxer ||\n            // in case of continuity change, or track switch\n            // we might switch from content type (AAC container to TS container, or TS to fmp4 for example)\n            // so let's check that current demuxer is still valid\n            ((discontinuity || trackSwitch) && !this.probe(data))) {\n            var observer = this.observer;\n            var typeSupported = this.typeSupported;\n            var config = this.config;\n            // probing order is TS/AAC/MP3/MP4\n            var muxConfig = [\n                { demux: tsdemuxer_1.default, remux: mp4_remuxer_1.default },\n                { demux: mp4demuxer_1.default, remux: passthrough_remuxer_1.default },\n                { demux: aacdemuxer_1.default, remux: mp4_remuxer_1.default },\n                { demux: mp3demuxer_1.default, remux: mp4_remuxer_1.default }\n            ];\n            // probe for content type\n            for (var i = 0, len = muxConfig.length; i < len; i++) {\n                var mux = muxConfig[i];\n                var probe = mux.demux.probe;\n                if (probe(data)) {\n                    var remuxer_1 = this.remuxer = new mux.remux(observer, config, typeSupported, this.vendor);\n                    demuxer = new mux.demux(observer, remuxer_1, config, typeSupported);\n                    this.probe = probe;\n                    break;\n                }\n            }\n            if (!demuxer) {\n                observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'no demux matching with content found' });\n                return;\n            }\n            this.demuxer = demuxer;\n        }\n        var remuxer = this.remuxer;\n        if (discontinuity || trackSwitch) {\n            demuxer.resetInitSegment(initSegment, audioCodec, videoCodec, duration);\n            remuxer.resetInitSegment();\n        }\n        if (discontinuity) {\n            demuxer.resetTimeStamp(defaultInitPTS);\n            remuxer.resetTimeStamp(defaultInitPTS);\n        }\n        if (typeof demuxer.setDecryptData === 'function') {\n            demuxer.setDecryptData(decryptdata);\n        }\n        demuxer.append(data, timeOffset, contiguous, accurateTimeOffset);\n    };\n    return DemuxerInline;\n}());\nexports.default = DemuxerInline;\n\n\n/***/ }),\n\n/***/ \"./src/demux/demuxer-worker.js\":\n/*!*************************************!*\\\n  !*** ./src/demux/demuxer-worker.js ***!\n  \\*************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* demuxer web worker.\n *  - listen to worker message, and trigger DemuxerInline upon reception of Fragments.\n *  - provides MP4 Boxes back to main thread using [transferable objects](https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast) in order to minimize message passing overhead.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar demuxer_inline_1 = __webpack_require__(/*! ../demux/demuxer-inline */ \"./src/demux/demuxer-inline.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar events_2 = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar DemuxerWorker = function (self) {\n    // observer setup\n    var observer = new events_2.EventEmitter();\n    observer.trigger = function trigger(event) {\n        var data = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            data[_i - 1] = arguments[_i];\n        }\n        observer.emit.apply(observer, [event, event].concat(data));\n    };\n    observer.off = function off(event) {\n        var data = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            data[_i - 1] = arguments[_i];\n        }\n        observer.removeListener.apply(observer, [event].concat(data));\n    };\n    var forwardMessage = function (ev, data) {\n        self.postMessage({ event: ev, data: data });\n    };\n    self.addEventListener('message', function (ev) {\n        var data = ev.data;\n        // console.log('demuxer cmd:' + data.cmd);\n        switch (data.cmd) {\n            case 'init':\n                var config = JSON.parse(data.config);\n                self.demuxer = new demuxer_inline_1.default(observer, data.typeSupported, config, data.vendor);\n                logger_1.enableLogs(config.debug);\n                // signal end of worker init\n                forwardMessage('init', null);\n                break;\n            case 'demux':\n                self.demuxer.push(data.data, data.decryptdata, data.initSegment, data.audioCodec, data.videoCodec, data.timeOffset, data.discontinuity, data.trackSwitch, data.contiguous, data.duration, data.accurateTimeOffset, data.defaultInitPTS);\n                break;\n            default:\n                break;\n        }\n    });\n    // forward events to main thread\n    observer.on(events_1.default.FRAG_DECRYPTED, forwardMessage);\n    observer.on(events_1.default.FRAG_PARSING_INIT_SEGMENT, forwardMessage);\n    observer.on(events_1.default.FRAG_PARSED, forwardMessage);\n    observer.on(events_1.default.ERROR, forwardMessage);\n    observer.on(events_1.default.FRAG_PARSING_METADATA, forwardMessage);\n    observer.on(events_1.default.FRAG_PARSING_USERDATA, forwardMessage);\n    observer.on(events_1.default.INIT_PTS_FOUND, forwardMessage);\n    // special case for FRAG_PARSING_DATA: pass data1/data2 as transferable object (no copy)\n    observer.on(events_1.default.FRAG_PARSING_DATA, function (ev, data) {\n        var transferable = [];\n        var message = { event: ev, data: data };\n        if (data.data1) {\n            message.data1 = data.data1.buffer;\n            transferable.push(data.data1.buffer);\n            delete data.data1;\n        }\n        if (data.data2) {\n            message.data2 = data.data2.buffer;\n            transferable.push(data.data2.buffer);\n            delete data.data2;\n        }\n        self.postMessage(message, transferable);\n    });\n};\nexports.default = DemuxerWorker;\n\n\n/***/ }),\n\n/***/ \"./src/demux/demuxer.js\":\n/*!******************************!*\\\n  !*** ./src/demux/demuxer.js ***!\n  \\******************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar work = __webpack_require__(/*! webworkify-webpack */ \"./node_modules/webworkify-webpack/index.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar demuxer_inline_1 = __webpack_require__(/*! ../demux/demuxer-inline */ \"./src/demux/demuxer-inline.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar mediasource_helper_1 = __webpack_require__(/*! ../utils/mediasource-helper */ \"./src/utils/mediasource-helper.js\");\nvar get_self_scope_1 = __webpack_require__(/*! ../utils/get-self-scope */ \"./src/utils/get-self-scope.js\");\nvar observer_1 = __webpack_require__(/*! ../observer */ \"./src/observer.js\");\n// see https://stackoverflow.com/a/11237259/589493\nvar global = get_self_scope_1.getSelfScope(); // safeguard for code that might run both on worker and main thread\nvar MediaSource = mediasource_helper_1.getMediaSource();\nvar Demuxer = /** @class */ (function () {\n    function Demuxer(hls, id) {\n        var _this = this;\n        this.hls = hls;\n        this.id = id;\n        var observer = this.observer = new observer_1.Observer();\n        var config = hls.config;\n        var forwardMessage = function (ev, data) {\n            data = data || {};\n            data.frag = _this.frag;\n            data.id = _this.id;\n            hls.trigger(ev, data);\n        };\n        // forward events to main thread\n        observer.on(events_1.default.FRAG_DECRYPTED, forwardMessage);\n        observer.on(events_1.default.FRAG_PARSING_INIT_SEGMENT, forwardMessage);\n        observer.on(events_1.default.FRAG_PARSING_DATA, forwardMessage);\n        observer.on(events_1.default.FRAG_PARSED, forwardMessage);\n        observer.on(events_1.default.ERROR, forwardMessage);\n        observer.on(events_1.default.FRAG_PARSING_METADATA, forwardMessage);\n        observer.on(events_1.default.FRAG_PARSING_USERDATA, forwardMessage);\n        observer.on(events_1.default.INIT_PTS_FOUND, forwardMessage);\n        var typeSupported = {\n            mp4: MediaSource.isTypeSupported('video/mp4'),\n            mpeg: MediaSource.isTypeSupported('audio/mpeg'),\n            mp3: MediaSource.isTypeSupported('audio/mp4; codecs=\"mp3\"')\n        };\n        // navigator.vendor is not always available in Web Worker\n        // refer to https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/navigator\n        var vendor = navigator.vendor;\n        if (config.enableWorker && (typeof (Worker) !== 'undefined')) {\n            logger_1.logger.log('demuxing in webworker');\n            var w = void 0;\n            try {\n                w = this.w = work(/*require.resolve*/(/*! ../demux/demuxer-worker.js */ \"./src/demux/demuxer-worker.js\"));\n                this.onwmsg = this.onWorkerMessage.bind(this);\n                w.addEventListener('message', this.onwmsg);\n                w.onerror = function (event) {\n                    hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.OTHER_ERROR, details: errors_1.ErrorDetails.INTERNAL_EXCEPTION, fatal: true, event: 'demuxerWorker', err: { message: event.message + ' (' + event.filename + ':' + event.lineno + ')' } });\n                };\n                w.postMessage({ cmd: 'init', typeSupported: typeSupported, vendor: vendor, id: id, config: JSON.stringify(config) });\n            }\n            catch (err) {\n                logger_1.logger.warn('Error in worker:', err);\n                logger_1.logger.error('Error while initializing DemuxerWorker, fallback on DemuxerInline');\n                if (w) {\n                    // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n                    global.URL.revokeObjectURL(w.objectURL);\n                }\n                this.demuxer = new demuxer_inline_1.default(observer, typeSupported, config, vendor);\n                this.w = undefined;\n            }\n        }\n        else {\n            this.demuxer = new demuxer_inline_1.default(observer, typeSupported, config, vendor);\n        }\n    }\n    Demuxer.prototype.destroy = function () {\n        var w = this.w;\n        if (w) {\n            w.removeEventListener('message', this.onwmsg);\n            w.terminate();\n            this.w = null;\n        }\n        else {\n            var demuxer = this.demuxer;\n            if (demuxer) {\n                demuxer.destroy();\n                this.demuxer = null;\n            }\n        }\n        var observer = this.observer;\n        if (observer) {\n            observer.removeAllListeners();\n            this.observer = null;\n        }\n    };\n    Demuxer.prototype.push = function (data, initSegment, audioCodec, videoCodec, frag, duration, accurateTimeOffset, defaultInitPTS) {\n        var w = this.w;\n        var timeOffset = Number.isFinite(frag.startPTS) ? frag.startPTS : frag.start;\n        var decryptdata = frag.decryptdata;\n        var lastFrag = this.frag;\n        var discontinuity = !(lastFrag && (frag.cc === lastFrag.cc));\n        var trackSwitch = !(lastFrag && (frag.level === lastFrag.level));\n        var nextSN = lastFrag && (frag.sn === (lastFrag.sn + 1));\n        var contiguous = !trackSwitch && nextSN;\n        if (discontinuity) {\n            logger_1.logger.log(this.id + \":discontinuity detected\");\n        }\n        if (trackSwitch) {\n            logger_1.logger.log(this.id + \":switch detected\");\n        }\n        this.frag = frag;\n        if (w) {\n            // post fragment payload as transferable objects for ArrayBuffer (no copy)\n            w.postMessage({ cmd: 'demux', data: data, decryptdata: decryptdata, initSegment: initSegment, audioCodec: audioCodec, videoCodec: videoCodec, timeOffset: timeOffset, discontinuity: discontinuity, trackSwitch: trackSwitch, contiguous: contiguous, duration: duration, accurateTimeOffset: accurateTimeOffset, defaultInitPTS: defaultInitPTS }, data instanceof ArrayBuffer ? [data] : []);\n        }\n        else {\n            var demuxer = this.demuxer;\n            if (demuxer) {\n                demuxer.push(data, decryptdata, initSegment, audioCodec, videoCodec, timeOffset, discontinuity, trackSwitch, contiguous, duration, accurateTimeOffset, defaultInitPTS);\n            }\n        }\n    };\n    Demuxer.prototype.onWorkerMessage = function (ev) {\n        var data = ev.data, hls = this.hls;\n        switch (data.event) {\n            case 'init':\n                // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n                global.URL.revokeObjectURL(this.w.objectURL);\n                break;\n            // special case for FRAG_PARSING_DATA: data1 and data2 are transferable objects\n            case events_1.default.FRAG_PARSING_DATA:\n                data.data.data1 = new Uint8Array(data.data1);\n                if (data.data2) {\n                    data.data.data2 = new Uint8Array(data.data2);\n                }\n            /* falls through */\n            default:\n                data.data = data.data || {};\n                data.data.frag = this.frag;\n                data.data.id = this.id;\n                hls.trigger(data.event, data.data);\n                break;\n        }\n    };\n    return Demuxer;\n}());\nexports.default = Demuxer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/demux/exp-golomb.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/exp-golomb.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264.\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar ExpGolomb = /** @class */ (function () {\n    function ExpGolomb(data) {\n        this.data = data;\n        // the number of bytes left to examine in this.data\n        this.bytesAvailable = data.byteLength;\n        // the current word being examined\n        this.word = 0; // :uint\n        // the number of bits left to examine in the current word\n        this.bitsAvailable = 0; // :uint\n    }\n    // ():void\n    ExpGolomb.prototype.loadWord = function () {\n        var data = this.data, bytesAvailable = this.bytesAvailable, position = data.byteLength - bytesAvailable, workingBytes = new Uint8Array(4), availableBytes = Math.min(4, bytesAvailable);\n        if (availableBytes === 0) {\n            throw new Error('no bytes available');\n        }\n        workingBytes.set(data.subarray(position, position + availableBytes));\n        this.word = new DataView(workingBytes.buffer).getUint32(0);\n        // track the amount of this.data that has been processed\n        this.bitsAvailable = availableBytes * 8;\n        this.bytesAvailable -= availableBytes;\n    };\n    // (count:int):void\n    ExpGolomb.prototype.skipBits = function (count) {\n        var skipBytes; // :int\n        if (this.bitsAvailable > count) {\n            this.word <<= count;\n            this.bitsAvailable -= count;\n        }\n        else {\n            count -= this.bitsAvailable;\n            skipBytes = count >> 3;\n            count -= (skipBytes >> 3);\n            this.bytesAvailable -= skipBytes;\n            this.loadWord();\n            this.word <<= count;\n            this.bitsAvailable -= count;\n        }\n    };\n    // (size:int):uint\n    ExpGolomb.prototype.readBits = function (size) {\n        var bits = Math.min(this.bitsAvailable, size), // :uint\n        valu = this.word >>> (32 - bits); // :uint\n        if (size > 32) {\n            logger_1.logger.error('Cannot read more than 32 bits at a time');\n        }\n        this.bitsAvailable -= bits;\n        if (this.bitsAvailable > 0) {\n            this.word <<= bits;\n        }\n        else if (this.bytesAvailable > 0) {\n            this.loadWord();\n        }\n        bits = size - bits;\n        if (bits > 0 && this.bitsAvailable) {\n            return valu << bits | this.readBits(bits);\n        }\n        else {\n            return valu;\n        }\n    };\n    // ():uint\n    ExpGolomb.prototype.skipLZ = function () {\n        var leadingZeroCount; // :uint\n        for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) {\n            if ((this.word & (0x80000000 >>> leadingZeroCount)) !== 0) {\n                // the first bit of working word is 1\n                this.word <<= leadingZeroCount;\n                this.bitsAvailable -= leadingZeroCount;\n                return leadingZeroCount;\n            }\n        }\n        // we exhausted word and still have not found a 1\n        this.loadWord();\n        return leadingZeroCount + this.skipLZ();\n    };\n    // ():void\n    ExpGolomb.prototype.skipUEG = function () {\n        this.skipBits(1 + this.skipLZ());\n    };\n    // ():void\n    ExpGolomb.prototype.skipEG = function () {\n        this.skipBits(1 + this.skipLZ());\n    };\n    // ():uint\n    ExpGolomb.prototype.readUEG = function () {\n        var clz = this.skipLZ(); // :uint\n        return this.readBits(clz + 1) - 1;\n    };\n    // ():int\n    ExpGolomb.prototype.readEG = function () {\n        var valu = this.readUEG(); // :int\n        if (0x01 & valu) {\n            // the number is odd if the low order bit is set\n            return (1 + valu) >>> 1; // add 1 to make it even, and divide by 2\n        }\n        else {\n            return -1 * (valu >>> 1); // divide by two then make it negative\n        }\n    };\n    // Some convenience functions\n    // :Boolean\n    ExpGolomb.prototype.readBoolean = function () {\n        return this.readBits(1) === 1;\n    };\n    // ():int\n    ExpGolomb.prototype.readUByte = function () {\n        return this.readBits(8);\n    };\n    // ():int\n    ExpGolomb.prototype.readUShort = function () {\n        return this.readBits(16);\n    };\n    // ():int\n    ExpGolomb.prototype.readUInt = function () {\n        return this.readBits(32);\n    };\n    /**\n     * Advance the ExpGolomb decoder past a scaling list. The scaling\n     * list is optionally transmitted as part of a sequence parameter\n     * set and is not relevant to transmuxing.\n     * @param count {number} the number of entries in this scaling list\n     * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n     */\n    ExpGolomb.prototype.skipScalingList = function (count) {\n        var lastScale = 8, nextScale = 8, j, deltaScale;\n        for (j = 0; j < count; j++) {\n            if (nextScale !== 0) {\n                deltaScale = this.readEG();\n                nextScale = (lastScale + deltaScale + 256) % 256;\n            }\n            lastScale = (nextScale === 0) ? lastScale : nextScale;\n        }\n    };\n    /**\n     * Read a sequence parameter set and return some interesting video\n     * properties. A sequence parameter set is the H264 metadata that\n     * describes the properties of upcoming video frames.\n     * @param data {Uint8Array} the bytes of a sequence parameter set\n     * @return {object} an object with configuration parsed from the\n     * sequence parameter set, including the dimensions of the\n     * associated video frames.\n     */\n    ExpGolomb.prototype.readSPS = function () {\n        var frameCropLeftOffset = 0, frameCropRightOffset = 0, frameCropTopOffset = 0, frameCropBottomOffset = 0, profileIdc, profileCompat, levelIdc, numRefFramesInPicOrderCntCycle, picWidthInMbsMinus1, picHeightInMapUnitsMinus1, frameMbsOnlyFlag, scalingListCount, i, readUByte = this.readUByte.bind(this), readBits = this.readBits.bind(this), readUEG = this.readUEG.bind(this), readBoolean = this.readBoolean.bind(this), skipBits = this.skipBits.bind(this), skipEG = this.skipEG.bind(this), skipUEG = this.skipUEG.bind(this), skipScalingList = this.skipScalingList.bind(this);\n        readUByte();\n        profileIdc = readUByte(); // profile_idc\n        profileCompat = readBits(5); // constraint_set[0-4]_flag, u(5)\n        skipBits(3); // reserved_zero_3bits u(3),\n        levelIdc = readUByte(); // level_idc u(8)\n        skipUEG(); // seq_parameter_set_id\n        // some profiles have more optional data we don't need\n        if (profileIdc === 100 ||\n            profileIdc === 110 ||\n            profileIdc === 122 ||\n            profileIdc === 244 ||\n            profileIdc === 44 ||\n            profileIdc === 83 ||\n            profileIdc === 86 ||\n            profileIdc === 118 ||\n            profileIdc === 128) {\n            var chromaFormatIdc = readUEG();\n            if (chromaFormatIdc === 3) {\n                skipBits(1);\n            } // separate_colour_plane_flag\n            skipUEG(); // bit_depth_luma_minus8\n            skipUEG(); // bit_depth_chroma_minus8\n            skipBits(1); // qpprime_y_zero_transform_bypass_flag\n            if (readBoolean()) { // seq_scaling_matrix_present_flag\n                scalingListCount = (chromaFormatIdc !== 3) ? 8 : 12;\n                for (i = 0; i < scalingListCount; i++) {\n                    if (readBoolean()) { // seq_scaling_list_present_flag[ i ]\n                        if (i < 6) {\n                            skipScalingList(16);\n                        }\n                        else {\n                            skipScalingList(64);\n                        }\n                    }\n                }\n            }\n        }\n        skipUEG(); // log2_max_frame_num_minus4\n        var picOrderCntType = readUEG();\n        if (picOrderCntType === 0) {\n            readUEG(); // log2_max_pic_order_cnt_lsb_minus4\n        }\n        else if (picOrderCntType === 1) {\n            skipBits(1); // delta_pic_order_always_zero_flag\n            skipEG(); // offset_for_non_ref_pic\n            skipEG(); // offset_for_top_to_bottom_field\n            numRefFramesInPicOrderCntCycle = readUEG();\n            for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n                skipEG();\n            } // offset_for_ref_frame[ i ]\n        }\n        skipUEG(); // max_num_ref_frames\n        skipBits(1); // gaps_in_frame_num_value_allowed_flag\n        picWidthInMbsMinus1 = readUEG();\n        picHeightInMapUnitsMinus1 = readUEG();\n        frameMbsOnlyFlag = readBits(1);\n        if (frameMbsOnlyFlag === 0) {\n            skipBits(1);\n        } // mb_adaptive_frame_field_flag\n        skipBits(1); // direct_8x8_inference_flag\n        if (readBoolean()) { // frame_cropping_flag\n            frameCropLeftOffset = readUEG();\n            frameCropRightOffset = readUEG();\n            frameCropTopOffset = readUEG();\n            frameCropBottomOffset = readUEG();\n        }\n        var pixelRatio = [1, 1];\n        if (readBoolean()) {\n            // vui_parameters_present_flag\n            if (readBoolean()) {\n                // aspect_ratio_info_present_flag\n                var aspectRatioIdc = readUByte();\n                switch (aspectRatioIdc) {\n                    case 1:\n                        pixelRatio = [1, 1];\n                        break;\n                    case 2:\n                        pixelRatio = [12, 11];\n                        break;\n                    case 3:\n                        pixelRatio = [10, 11];\n                        break;\n                    case 4:\n                        pixelRatio = [16, 11];\n                        break;\n                    case 5:\n                        pixelRatio = [40, 33];\n                        break;\n                    case 6:\n                        pixelRatio = [24, 11];\n                        break;\n                    case 7:\n                        pixelRatio = [20, 11];\n                        break;\n                    case 8:\n                        pixelRatio = [32, 11];\n                        break;\n                    case 9:\n                        pixelRatio = [80, 33];\n                        break;\n                    case 10:\n                        pixelRatio = [18, 11];\n                        break;\n                    case 11:\n                        pixelRatio = [15, 11];\n                        break;\n                    case 12:\n                        pixelRatio = [64, 33];\n                        break;\n                    case 13:\n                        pixelRatio = [160, 99];\n                        break;\n                    case 14:\n                        pixelRatio = [4, 3];\n                        break;\n                    case 15:\n                        pixelRatio = [3, 2];\n                        break;\n                    case 16:\n                        pixelRatio = [2, 1];\n                        break;\n                    case 255: {\n                        pixelRatio = [readUByte() << 8 | readUByte(), readUByte() << 8 | readUByte()];\n                        break;\n                    }\n                }\n            }\n        }\n        return {\n            width: Math.ceil((((picWidthInMbsMinus1 + 1) * 16) - frameCropLeftOffset * 2 - frameCropRightOffset * 2)),\n            height: ((2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16) - ((frameMbsOnlyFlag ? 2 : 4) * (frameCropTopOffset + frameCropBottomOffset)),\n            pixelRatio: pixelRatio\n        };\n    };\n    ExpGolomb.prototype.readSliceType = function () {\n        // skip NALu type\n        this.readUByte();\n        // discard first_mb_in_slice\n        this.readUEG();\n        // return slice_type\n        return this.readUEG();\n    };\n    return ExpGolomb;\n}());\nexports.default = ExpGolomb;\n\n\n/***/ }),\n\n/***/ \"./src/demux/id3.js\":\n/*!**************************!*\\\n  !*** ./src/demux/id3.js ***!\n  \\**************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * ID3 parser\n */\nvar ID3 = /** @class */ (function () {\n    function ID3() {\n    }\n    /**\n     * Returns true if an ID3 header can be found at offset in data\n     * @param {Uint8Array} data - The data to search in\n     * @param {number} offset - The offset at which to start searching\n     * @return {boolean} - True if an ID3 header is found\n     */\n    ID3.isHeader = function (data, offset) {\n        /*\n        * http://id3.org/id3v2.3.0\n        * [0]     = 'I'\n        * [1]     = 'D'\n        * [2]     = '3'\n        * [3,4]   = {Version}\n        * [5]     = {Flags}\n        * [6-9]   = {ID3 Size}\n        *\n        * An ID3v2 tag can be detected with the following pattern:\n        *  $49 44 33 yy yy xx zz zz zz zz\n        * Where yy is less than $FF, xx is the 'flags' byte and zz is less than $80\n        */\n        if (offset + 10 <= data.length) {\n            // look for 'ID3' identifier\n            if (data[offset] === 0x49 && data[offset + 1] === 0x44 && data[offset + 2] === 0x33) {\n                // check version is within range\n                if (data[offset + 3] < 0xFF && data[offset + 4] < 0xFF) {\n                    // check size is within range\n                    if (data[offset + 6] < 0x80 && data[offset + 7] < 0x80 && data[offset + 8] < 0x80 && data[offset + 9] < 0x80) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * Returns true if an ID3 footer can be found at offset in data\n     * @param {Uint8Array} data - The data to search in\n     * @param {number} offset - The offset at which to start searching\n     * @return {boolean} - True if an ID3 footer is found\n     */\n    ID3.isFooter = function (data, offset) {\n        /*\n        * The footer is a copy of the header, but with a different identifier\n        */\n        if (offset + 10 <= data.length) {\n            // look for '3DI' identifier\n            if (data[offset] === 0x33 && data[offset + 1] === 0x44 && data[offset + 2] === 0x49) {\n                // check version is within range\n                if (data[offset + 3] < 0xFF && data[offset + 4] < 0xFF) {\n                    // check size is within range\n                    if (data[offset + 6] < 0x80 && data[offset + 7] < 0x80 && data[offset + 8] < 0x80 && data[offset + 9] < 0x80) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * Returns any adjacent ID3 tags found in data starting at offset, as one block of data\n     * @param {Uint8Array} data - The data to search in\n     * @param {number} offset - The offset at which to start searching\n     * @return {Uint8Array} - The block of data containing any ID3 tags found\n     */\n    ID3.getID3Data = function (data, offset) {\n        var front = offset;\n        var length = 0;\n        while (ID3.isHeader(data, offset)) {\n            // ID3 header is 10 bytes\n            length += 10;\n            var size = ID3._readSize(data, offset + 6);\n            length += size;\n            if (ID3.isFooter(data, offset + 10)) {\n                // ID3 footer is 10 bytes\n                length += 10;\n            }\n            offset += length;\n        }\n        if (length > 0) {\n            return data.subarray(front, front + length);\n        }\n        return undefined;\n    };\n    ID3._readSize = function (data, offset) {\n        var size = 0;\n        size = ((data[offset] & 0x7f) << 21);\n        size |= ((data[offset + 1] & 0x7f) << 14);\n        size |= ((data[offset + 2] & 0x7f) << 7);\n        size |= (data[offset + 3] & 0x7f);\n        return size;\n    };\n    /**\n     * Searches for the Elementary Stream timestamp found in the ID3 data chunk\n     * @param {Uint8Array} data - Block of data containing one or more ID3 tags\n     * @return {number} - The timestamp\n     */\n    ID3.getTimeStamp = function (data) {\n        var frames = ID3.getID3Frames(data);\n        for (var i = 0; i < frames.length; i++) {\n            var frame = frames[i];\n            if (ID3.isTimeStampFrame(frame)) {\n                return ID3._readTimeStamp(frame);\n            }\n        }\n        return undefined;\n    };\n    /**\n     * Returns true if the ID3 frame is an Elementary Stream timestamp frame\n     * @param {ID3 frame} frame\n     */\n    ID3.isTimeStampFrame = function (frame) {\n        return (frame && frame.key === 'PRIV' && frame.info === 'com.apple.streaming.transportStreamTimestamp');\n    };\n    ID3._getFrameData = function (data) {\n        /*\n        Frame ID       $xx xx xx xx (four characters)\n        Size           $xx xx xx xx\n        Flags          $xx xx\n        */\n        var type = String.fromCharCode(data[0], data[1], data[2], data[3]);\n        var size = ID3._readSize(data, 4);\n        // skip frame id, size, and flags\n        var offset = 10;\n        return { type: type, size: size, data: data.subarray(offset, offset + size) };\n    };\n    /**\n     * Returns an array of ID3 frames found in all the ID3 tags in the id3Data\n     * @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags\n     * @return {ID3 frame[]} - Array of ID3 frame objects\n     */\n    ID3.getID3Frames = function (id3Data) {\n        var offset = 0;\n        var frames = [];\n        while (ID3.isHeader(id3Data, offset)) {\n            var size = ID3._readSize(id3Data, offset + 6);\n            // skip past ID3 header\n            offset += 10;\n            var end = offset + size;\n            // loop through frames in the ID3 tag\n            while (offset + 8 < end) {\n                var frameData = ID3._getFrameData(id3Data.subarray(offset));\n                var frame = ID3._decodeFrame(frameData);\n                if (frame) {\n                    frames.push(frame);\n                }\n                // skip frame header and frame data\n                offset += frameData.size + 10;\n            }\n            if (ID3.isFooter(id3Data, offset)) {\n                offset += 10;\n            }\n        }\n        return frames;\n    };\n    ID3._decodeFrame = function (frame) {\n        if (frame.type === 'PRIV') {\n            return ID3._decodePrivFrame(frame);\n        }\n        else if (frame.type[0] === 'T') {\n            return ID3._decodeTextFrame(frame);\n        }\n        else if (frame.type[0] === 'W') {\n            return ID3._decodeURLFrame(frame);\n        }\n        return undefined;\n    };\n    ID3._readTimeStamp = function (timeStampFrame) {\n        if (timeStampFrame.data.byteLength === 8) {\n            var data = new Uint8Array(timeStampFrame.data);\n            // timestamp is 33 bit expressed as a big-endian eight-octet number,\n            // with the upper 31 bits set to zero.\n            var pts33Bit = data[3] & 0x1;\n            var timestamp = (data[4] << 23) +\n                (data[5] << 15) +\n                (data[6] << 7) +\n                data[7];\n            timestamp /= 45;\n            if (pts33Bit) {\n                timestamp += 47721858.84;\n            } // 2^32 / 90\n            return Math.round(timestamp);\n        }\n        return undefined;\n    };\n    ID3._decodePrivFrame = function (frame) {\n        /*\n        Format: <text string>\\0<binary data>\n        */\n        if (frame.size < 2) {\n            return undefined;\n        }\n        var owner = ID3._utf8ArrayToStr(frame.data, true);\n        var privateData = new Uint8Array(frame.data.subarray(owner.length + 1));\n        return { key: frame.type, info: owner, data: privateData.buffer };\n    };\n    ID3._decodeTextFrame = function (frame) {\n        if (frame.size < 2) {\n            return undefined;\n        }\n        if (frame.type === 'TXXX') {\n            /*\n            Format:\n            [0]   = {Text Encoding}\n            [1-?] = {Description}\\0{Value}\n            */\n            var index = 1;\n            var description = ID3._utf8ArrayToStr(frame.data.subarray(index));\n            index += description.length + 1;\n            var value = ID3._utf8ArrayToStr(frame.data.subarray(index));\n            return { key: frame.type, info: description, data: value };\n        }\n        else {\n            /*\n            Format:\n            [0]   = {Text Encoding}\n            [1-?] = {Value}\n            */\n            var text = ID3._utf8ArrayToStr(frame.data.subarray(1));\n            return { key: frame.type, data: text };\n        }\n    };\n    ID3._decodeURLFrame = function (frame) {\n        if (frame.type === 'WXXX') {\n            /*\n            Format:\n            [0]   = {Text Encoding}\n            [1-?] = {Description}\\0{URL}\n            */\n            if (frame.size < 2) {\n                return undefined;\n            }\n            var index = 1;\n            var description = ID3._utf8ArrayToStr(frame.data.subarray(index));\n            index += description.length + 1;\n            var value = ID3._utf8ArrayToStr(frame.data.subarray(index));\n            return { key: frame.type, info: description, data: value };\n        }\n        else {\n            /*\n            Format:\n            [0-?] = {URL}\n            */\n            var url = ID3._utf8ArrayToStr(frame.data);\n            return { key: frame.type, data: url };\n        }\n    };\n    // http://stackoverflow.com/questions/8936984/uint8array-to-string-in-javascript/22373197\n    // http://www.onicos.com/staff/iz/amuse/javascript/expert/utf.txt\n    /* utf.js - UTF-8 <=> UTF-16 convertion\n     *\n     * Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>\n     * Version: 1.0\n     * LastModified: Dec 25 1999\n     * This library is free.  You can redistribute it and/or modify it.\n     */\n    ID3._utf8ArrayToStr = function (array, exitOnNull) {\n        if (exitOnNull === void 0) { exitOnNull = false; }\n        var len = array.length;\n        var c;\n        var char2;\n        var char3;\n        var out = '';\n        var i = 0;\n        while (i < len) {\n            c = array[i++];\n            if (c === 0x00 && exitOnNull) {\n                return out;\n            }\n            else if (c === 0x00 || c === 0x03) {\n                // If the character is 3 (END_OF_TEXT) or 0 (NULL) then skip it\n                continue;\n            }\n            switch (c >> 4) {\n                case 0:\n                case 1:\n                case 2:\n                case 3:\n                case 4:\n                case 5:\n                case 6:\n                case 7:\n                    // 0xxxxxxx\n                    out += String.fromCharCode(c);\n                    break;\n                case 12:\n                case 13:\n                    // 110x xxxx   10xx xxxx\n                    char2 = array[i++];\n                    out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));\n                    break;\n                case 14:\n                    // 1110 xxxx  10xx xxxx  10xx xxxx\n                    char2 = array[i++];\n                    char3 = array[i++];\n                    out += String.fromCharCode(((c & 0x0F) << 12) |\n                        ((char2 & 0x3F) << 6) |\n                        ((char3 & 0x3F) << 0));\n                    break;\n                default:\n            }\n        }\n        return out;\n    };\n    return ID3;\n}());\nvar utf8ArrayToStr = ID3._utf8ArrayToStr;\nexports.utf8ArrayToStr = utf8ArrayToStr;\nexports.default = ID3;\n\n\n/***/ }),\n\n/***/ \"./src/demux/mp3demuxer.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/mp3demuxer.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * MP3 demuxer\n */\nvar id3_1 = __webpack_require__(/*! ../demux/id3 */ \"./src/demux/id3.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar mpegaudio_1 = __webpack_require__(/*! ./mpegaudio */ \"./src/demux/mpegaudio.js\");\nvar MP3Demuxer = /** @class */ (function () {\n    function MP3Demuxer(observer, remuxer, config) {\n        this.observer = observer;\n        this.config = config;\n        this.remuxer = remuxer;\n    }\n    MP3Demuxer.prototype.resetInitSegment = function (initSegment, audioCodec, videoCodec, duration) {\n        this._audioTrack = { container: 'audio/mpeg', type: 'audio', id: -1, sequenceNumber: 0, isAAC: false, samples: [], len: 0, manifestCodec: audioCodec, duration: duration, inputTimeScale: 90000 };\n    };\n    MP3Demuxer.prototype.resetTimeStamp = function () {\n    };\n    MP3Demuxer.probe = function (data) {\n        // check if data contains ID3 timestamp and MPEG sync word\n        var offset, length;\n        var id3Data = id3_1.default.getID3Data(data, 0);\n        if (id3Data && id3_1.default.getTimeStamp(id3Data) !== undefined) {\n            // Look for MPEG header | 1111 1111 | 111X XYZX | where X can be either 0 or 1 and Y or Z should be 1\n            // Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)\n            // More info http://www.mp3-tech.org/programmer/frame_header.html\n            for (offset = id3Data.length, length = Math.min(data.length - 1, offset + 100); offset < length; offset++) {\n                if (mpegaudio_1.default.probe(data, offset)) {\n                    logger_1.logger.log('MPEG Audio sync word found !');\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    // feed incoming data to the front of the parsing pipeline\n    MP3Demuxer.prototype.append = function (data, timeOffset, contiguous, accurateTimeOffset) {\n        var id3Data = id3_1.default.getID3Data(data, 0);\n        var timestamp = id3_1.default.getTimeStamp(id3Data);\n        var pts = timestamp ? 90 * timestamp : timeOffset * 90000;\n        var offset = id3Data.length;\n        var length = data.length;\n        var frameIndex = 0, stamp = 0;\n        var track = this._audioTrack;\n        var id3Samples = [{ pts: pts, dts: pts, data: id3Data }];\n        while (offset < length) {\n            if (mpegaudio_1.default.isHeader(data, offset)) {\n                var frame = mpegaudio_1.default.appendFrame(track, data, offset, pts, frameIndex);\n                if (frame) {\n                    offset += frame.length;\n                    stamp = frame.sample.pts;\n                    frameIndex++;\n                }\n                else {\n                    // logger.log('Unable to parse Mpeg audio frame');\n                    break;\n                }\n            }\n            else if (id3_1.default.isHeader(data, offset)) {\n                id3Data = id3_1.default.getID3Data(data, offset);\n                id3Samples.push({ pts: stamp, dts: stamp, data: id3Data });\n                offset += id3Data.length;\n            }\n            else {\n                // nothing found, keep looking\n                offset++;\n            }\n        }\n        this.remuxer.remux(track, { samples: [] }, { samples: id3Samples, inputTimeScale: 90000 }, { samples: [] }, timeOffset, contiguous, accurateTimeOffset);\n    };\n    MP3Demuxer.prototype.destroy = function () {\n    };\n    return MP3Demuxer;\n}());\nexports.default = MP3Demuxer;\n\n\n/***/ }),\n\n/***/ \"./src/demux/mp4demuxer.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/mp4demuxer.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * MP4 demuxer\n */\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar UINT32_MAX = Math.pow(2, 32) - 1;\nvar MP4Demuxer = /** @class */ (function () {\n    function MP4Demuxer(observer, remuxer) {\n        this.observer = observer;\n        this.remuxer = remuxer;\n    }\n    MP4Demuxer.prototype.resetTimeStamp = function (initPTS) {\n        this.initPTS = initPTS;\n    };\n    MP4Demuxer.prototype.resetInitSegment = function (initSegment, audioCodec, videoCodec, duration) {\n        // jshint unused:false\n        if (initSegment && initSegment.byteLength) {\n            var initData = this.initData = MP4Demuxer.parseInitSegment(initSegment);\n            // default audio codec if nothing specified\n            // TODO : extract that from initsegment\n            if (audioCodec == null) {\n                audioCodec = 'mp4a.40.5';\n            }\n            if (videoCodec == null) {\n                videoCodec = 'avc1.42e01e';\n            }\n            var tracks = {};\n            if (initData.audio && initData.video) {\n                tracks.audiovideo = { container: 'video/mp4', codec: audioCodec + ',' + videoCodec, initSegment: duration ? initSegment : null };\n            }\n            else {\n                if (initData.audio) {\n                    tracks.audio = { container: 'audio/mp4', codec: audioCodec, initSegment: duration ? initSegment : null };\n                }\n                if (initData.video) {\n                    tracks.video = { container: 'video/mp4', codec: videoCodec, initSegment: duration ? initSegment : null };\n                }\n            }\n            this.observer.trigger(events_1.default.FRAG_PARSING_INIT_SEGMENT, { tracks: tracks });\n        }\n        else {\n            if (audioCodec) {\n                this.audioCodec = audioCodec;\n            }\n            if (videoCodec) {\n                this.videoCodec = videoCodec;\n            }\n        }\n    };\n    MP4Demuxer.probe = function (data) {\n        // ensure we find a moof box in the first 16 kB\n        return MP4Demuxer.findBox({ data: data, start: 0, end: Math.min(data.length, 16384) }, ['moof']).length > 0;\n    };\n    MP4Demuxer.bin2str = function (buffer) {\n        return String.fromCharCode.apply(null, buffer);\n    };\n    MP4Demuxer.readUint16 = function (buffer, offset) {\n        if (buffer.data) {\n            offset += buffer.start;\n            buffer = buffer.data;\n        }\n        var val = buffer[offset] << 8 |\n            buffer[offset + 1];\n        return val < 0 ? 65536 + val : val;\n    };\n    MP4Demuxer.readUint32 = function (buffer, offset) {\n        if (buffer.data) {\n            offset += buffer.start;\n            buffer = buffer.data;\n        }\n        var val = buffer[offset] << 24 |\n            buffer[offset + 1] << 16 |\n            buffer[offset + 2] << 8 |\n            buffer[offset + 3];\n        return val < 0 ? 4294967296 + val : val;\n    };\n    MP4Demuxer.writeUint32 = function (buffer, offset, value) {\n        if (buffer.data) {\n            offset += buffer.start;\n            buffer = buffer.data;\n        }\n        buffer[offset] = value >> 24;\n        buffer[offset + 1] = (value >> 16) & 0xff;\n        buffer[offset + 2] = (value >> 8) & 0xff;\n        buffer[offset + 3] = value & 0xff;\n    };\n    // Find the data for a box specified by its path\n    MP4Demuxer.findBox = function (data, path) {\n        var results = [], i, size, type, end, subresults, start, endbox;\n        if (data.data) {\n            start = data.start;\n            end = data.end;\n            data = data.data;\n        }\n        else {\n            start = 0;\n            end = data.byteLength;\n        }\n        if (!path.length) {\n            // short-circuit the search for empty paths\n            return null;\n        }\n        for (i = start; i < end;) {\n            size = MP4Demuxer.readUint32(data, i);\n            type = MP4Demuxer.bin2str(data.subarray(i + 4, i + 8));\n            endbox = size > 1 ? i + size : end;\n            if (type === path[0]) {\n                if (path.length === 1) {\n                    // this is the end of the path and we've found the box we were\n                    // looking for\n                    results.push({ data: data, start: i + 8, end: endbox });\n                }\n                else {\n                    // recursively search for the next box along the path\n                    subresults = MP4Demuxer.findBox({ data: data, start: i + 8, end: endbox }, path.slice(1));\n                    if (subresults.length) {\n                        results = results.concat(subresults);\n                    }\n                }\n            }\n            i = endbox;\n        }\n        // we've finished searching all of data\n        return results;\n    };\n    MP4Demuxer.parseSegmentIndex = function (initSegment) {\n        var moov = MP4Demuxer.findBox(initSegment, ['moov'])[0];\n        var moovEndOffset = moov ? moov.end : null; // we need this in case we need to chop of garbage of the end of current data\n        var index = 0;\n        var sidx = MP4Demuxer.findBox(initSegment, ['sidx']);\n        var references;\n        if (!sidx || !sidx[0]) {\n            return null;\n        }\n        references = [];\n        sidx = sidx[0];\n        var version = sidx.data[0];\n        // set initial offset, we skip the reference ID (not needed)\n        index = version === 0 ? 8 : 16;\n        var timescale = MP4Demuxer.readUint32(sidx, index);\n        index += 4;\n        // TODO: parse earliestPresentationTime and firstOffset\n        // usually zero in our case\n        var earliestPresentationTime = 0;\n        var firstOffset = 0;\n        if (version === 0) {\n            index += 8;\n        }\n        else {\n            index += 16;\n        }\n        // skip reserved\n        index += 2;\n        var startByte = sidx.end + firstOffset;\n        var referencesCount = MP4Demuxer.readUint16(sidx, index);\n        index += 2;\n        for (var i = 0; i < referencesCount; i++) {\n            var referenceIndex = index;\n            var referenceInfo = MP4Demuxer.readUint32(sidx, referenceIndex);\n            referenceIndex += 4;\n            var referenceSize = referenceInfo & 0x7FFFFFFF;\n            var referenceType = (referenceInfo & 0x80000000) >>> 31;\n            if (referenceType === 1) {\n                console.warn('SIDX has hierarchical references (not supported)');\n                return;\n            }\n            var subsegmentDuration = MP4Demuxer.readUint32(sidx, referenceIndex);\n            referenceIndex += 4;\n            references.push({\n                referenceSize: referenceSize,\n                subsegmentDuration: subsegmentDuration,\n                info: {\n                    duration: subsegmentDuration / timescale,\n                    start: startByte,\n                    end: startByte + referenceSize - 1\n                }\n            });\n            startByte += referenceSize;\n            // Skipping 1 bit for |startsWithSap|, 3 bits for |sapType|, and 28 bits\n            // for |sapDelta|.\n            referenceIndex += 4;\n            // skip to next ref\n            index = referenceIndex;\n        }\n        return {\n            earliestPresentationTime: earliestPresentationTime,\n            timescale: timescale,\n            version: version,\n            referencesCount: referencesCount,\n            references: references,\n            moovEndOffset: moovEndOffset\n        };\n    };\n    /**\n     * Parses an MP4 initialization segment and extracts stream type and\n     * timescale values for any declared tracks. Timescale values indicate the\n     * number of clock ticks per second to assume for time-based values\n     * elsewhere in the MP4.\n     *\n     * To determine the start time of an MP4, you need two pieces of\n     * information: the timescale unit and the earliest base media decode\n     * time. Multiple timescales can be specified within an MP4 but the\n     * base media decode time is always expressed in the timescale from\n     * the media header box for the track:\n     * ```\n     * moov > trak > mdia > mdhd.timescale\n     * moov > trak > mdia > hdlr\n     * ```\n     * @param init {Uint8Array} the bytes of the init segment\n     * @return {object} a hash of track type to timescale values or null if\n     * the init segment is malformed.\n     */\n    MP4Demuxer.parseInitSegment = function (initSegment) {\n        var result = [];\n        var traks = MP4Demuxer.findBox(initSegment, ['moov', 'trak']);\n        traks.forEach(function (trak) {\n            var tkhd = MP4Demuxer.findBox(trak, ['tkhd'])[0];\n            if (tkhd) {\n                var version = tkhd.data[tkhd.start];\n                var index = version === 0 ? 12 : 20;\n                var trackId = MP4Demuxer.readUint32(tkhd, index);\n                var mdhd = MP4Demuxer.findBox(trak, ['mdia', 'mdhd'])[0];\n                if (mdhd) {\n                    version = mdhd.data[mdhd.start];\n                    index = version === 0 ? 12 : 20;\n                    var timescale = MP4Demuxer.readUint32(mdhd, index);\n                    var hdlr = MP4Demuxer.findBox(trak, ['mdia', 'hdlr'])[0];\n                    if (hdlr) {\n                        var hdlrType = MP4Demuxer.bin2str(hdlr.data.subarray(hdlr.start + 8, hdlr.start + 12));\n                        var type = { 'soun': 'audio', 'vide': 'video' }[hdlrType];\n                        if (type) {\n                            // extract codec info. TODO : parse codec details to be able to build MIME type\n                            var codecBox = MP4Demuxer.findBox(trak, ['mdia', 'minf', 'stbl', 'stsd']);\n                            if (codecBox.length) {\n                                codecBox = codecBox[0];\n                                var codecType = MP4Demuxer.bin2str(codecBox.data.subarray(codecBox.start + 12, codecBox.start + 16));\n                                logger_1.logger.log(\"MP4Demuxer:\" + type + \":\" + codecType + \" found\");\n                            }\n                            result[trackId] = { timescale: timescale, type: type };\n                            result[type] = { timescale: timescale, id: trackId };\n                        }\n                    }\n                }\n            }\n        });\n        return result;\n    };\n    /**\n   * Determine the base media decode start time, in seconds, for an MP4\n   * fragment. If multiple fragments are specified, the earliest time is\n   * returned.\n   *\n   * The base media decode time can be parsed from track fragment\n   * metadata:\n   * ```\n   * moof > traf > tfdt.baseMediaDecodeTime\n   * ```\n   * It requires the timescale value from the mdhd to interpret.\n   *\n   * @param timescale {object} a hash of track ids to timescale values.\n   * @return {number} the earliest base media decode start time for the\n   * fragment, in seconds\n   */\n    MP4Demuxer.getStartDTS = function (initData, fragment) {\n        var trafs, baseTimes, result;\n        // we need info from two childrend of each track fragment box\n        trafs = MP4Demuxer.findBox(fragment, ['moof', 'traf']);\n        // determine the start times for each track\n        baseTimes = [].concat.apply([], trafs.map(function (traf) {\n            return MP4Demuxer.findBox(traf, ['tfhd']).map(function (tfhd) {\n                var id, scale, baseTime;\n                // get the track id from the tfhd\n                id = MP4Demuxer.readUint32(tfhd, 4);\n                // assume a 90kHz clock if no timescale was specified\n                scale = initData[id].timescale || 90e3;\n                // get the base media decode time from the tfdt\n                baseTime = MP4Demuxer.findBox(traf, ['tfdt']).map(function (tfdt) {\n                    var version, result;\n                    version = tfdt.data[tfdt.start];\n                    result = MP4Demuxer.readUint32(tfdt, 4);\n                    if (version === 1) {\n                        result *= Math.pow(2, 32);\n                        result += MP4Demuxer.readUint32(tfdt, 8);\n                    }\n                    return result;\n                })[0];\n                // convert base time to seconds\n                return baseTime / scale;\n            });\n        }));\n        // return the minimum\n        result = Math.min.apply(null, baseTimes);\n        return isFinite(result) ? result : 0;\n    };\n    MP4Demuxer.offsetStartDTS = function (initData, fragment, timeOffset) {\n        MP4Demuxer.findBox(fragment, ['moof', 'traf']).map(function (traf) {\n            return MP4Demuxer.findBox(traf, ['tfhd']).map(function (tfhd) {\n                // get the track id from the tfhd\n                var id = MP4Demuxer.readUint32(tfhd, 4);\n                // assume a 90kHz clock if no timescale was specified\n                var timescale = initData[id].timescale || 90e3;\n                // get the base media decode time from the tfdt\n                MP4Demuxer.findBox(traf, ['tfdt']).map(function (tfdt) {\n                    var version = tfdt.data[tfdt.start];\n                    var baseMediaDecodeTime = MP4Demuxer.readUint32(tfdt, 4);\n                    if (version === 0) {\n                        MP4Demuxer.writeUint32(tfdt, 4, baseMediaDecodeTime - timeOffset * timescale);\n                    }\n                    else {\n                        baseMediaDecodeTime *= Math.pow(2, 32);\n                        baseMediaDecodeTime += MP4Demuxer.readUint32(tfdt, 8);\n                        baseMediaDecodeTime -= timeOffset * timescale;\n                        baseMediaDecodeTime = Math.max(baseMediaDecodeTime, 0);\n                        var upper = Math.floor(baseMediaDecodeTime / (UINT32_MAX + 1));\n                        var lower = Math.floor(baseMediaDecodeTime % (UINT32_MAX + 1));\n                        MP4Demuxer.writeUint32(tfdt, 4, upper);\n                        MP4Demuxer.writeUint32(tfdt, 8, lower);\n                    }\n                });\n            });\n        });\n    };\n    // feed incoming data to the front of the parsing pipeline\n    MP4Demuxer.prototype.append = function (data, timeOffset, contiguous, accurateTimeOffset) {\n        var initData = this.initData;\n        if (!initData) {\n            this.resetInitSegment(data, this.audioCodec, this.videoCodec, false);\n            initData = this.initData;\n        }\n        var startDTS, initPTS = this.initPTS;\n        if (initPTS === undefined) {\n            var startDTS_1 = MP4Demuxer.getStartDTS(initData, data);\n            this.initPTS = initPTS = startDTS_1 - timeOffset;\n            this.observer.trigger(events_1.default.INIT_PTS_FOUND, { initPTS: initPTS });\n        }\n        MP4Demuxer.offsetStartDTS(initData, data, initPTS);\n        startDTS = MP4Demuxer.getStartDTS(initData, data);\n        this.remuxer.remux(initData.audio, initData.video, null, null, startDTS, contiguous, accurateTimeOffset, data);\n    };\n    MP4Demuxer.prototype.destroy = function () { };\n    return MP4Demuxer;\n}());\nexports.default = MP4Demuxer;\n\n\n/***/ }),\n\n/***/ \"./src/demux/mpegaudio.js\":\n/*!********************************!*\\\n  !*** ./src/demux/mpegaudio.js ***!\n  \\********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n *  MPEG parser helper\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MpegAudio = {\n    BitratesMap: [\n        32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448,\n        32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384,\n        32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320,\n        32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256,\n        8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160\n    ],\n    SamplingRateMap: [44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000],\n    SamplesCoefficients: [\n        // MPEG 2.5\n        [\n            0,\n            72,\n            144,\n            12 // Layer1\n        ],\n        // Reserved\n        [\n            0,\n            0,\n            0,\n            0 // Layer1\n        ],\n        // MPEG 2\n        [\n            0,\n            72,\n            144,\n            12 // Layer1\n        ],\n        // MPEG 1\n        [\n            0,\n            144,\n            144,\n            12 // Layer1\n        ]\n    ],\n    BytesInSlot: [\n        0,\n        1,\n        1,\n        4 // Layer1\n    ],\n    appendFrame: function (track, data, offset, pts, frameIndex) {\n        // Using http://www.datavoyage.com/mpgscript/mpeghdr.htm as a reference\n        if (offset + 24 > data.length) {\n            return undefined;\n        }\n        var header = this.parseHeader(data, offset);\n        if (header && offset + header.frameLength <= data.length) {\n            var frameDuration = header.samplesPerFrame * 90000 / header.sampleRate;\n            var stamp = pts + frameIndex * frameDuration;\n            var sample = { unit: data.subarray(offset, offset + header.frameLength), pts: stamp, dts: stamp };\n            track.config = [];\n            track.channelCount = header.channelCount;\n            track.samplerate = header.sampleRate;\n            track.samples.push(sample);\n            track.len += header.frameLength;\n            return { sample: sample, length: header.frameLength };\n        }\n        return undefined;\n    },\n    parseHeader: function (data, offset) {\n        var headerB = (data[offset + 1] >> 3) & 3;\n        var headerC = (data[offset + 1] >> 1) & 3;\n        var headerE = (data[offset + 2] >> 4) & 15;\n        var headerF = (data[offset + 2] >> 2) & 3;\n        var headerG = (data[offset + 2] >> 1) & 1;\n        if (headerB !== 1 && headerE !== 0 && headerE !== 15 && headerF !== 3) {\n            var columnInBitrates = headerB === 3 ? (3 - headerC) : (headerC === 3 ? 3 : 4);\n            var bitRate = MpegAudio.BitratesMap[columnInBitrates * 14 + headerE - 1] * 1000;\n            var columnInSampleRates = headerB === 3 ? 0 : headerB === 2 ? 1 : 2;\n            var sampleRate = MpegAudio.SamplingRateMap[columnInSampleRates * 3 + headerF];\n            var channelCount = data[offset + 3] >> 6 === 3 ? 1 : 2; // If bits of channel mode are `11` then it is a single channel (Mono)\n            var sampleCoefficient = MpegAudio.SamplesCoefficients[headerB][headerC];\n            var bytesInSlot = MpegAudio.BytesInSlot[headerC];\n            var samplesPerFrame = sampleCoefficient * 8 * bytesInSlot;\n            var frameLength = parseInt(sampleCoefficient * bitRate / sampleRate + headerG, 10) * bytesInSlot;\n            return { sampleRate: sampleRate, channelCount: channelCount, frameLength: frameLength, samplesPerFrame: samplesPerFrame };\n        }\n        return undefined;\n    },\n    isHeaderPattern: function (data, offset) {\n        return data[offset] === 0xff && (data[offset + 1] & 0xe0) === 0xe0 && (data[offset + 1] & 0x06) !== 0x00;\n    },\n    isHeader: function (data, offset) {\n        // Look for MPEG header | 1111 1111 | 111X XYZX | where X can be either 0 or 1 and Y or Z should be 1\n        // Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)\n        // More info http://www.mp3-tech.org/programmer/frame_header.html\n        if (offset + 1 < data.length && this.isHeaderPattern(data, offset)) {\n            return true;\n        }\n        return false;\n    },\n    probe: function (data, offset) {\n        // same as isHeader but we also check that MPEG frame follows last MPEG frame\n        // or end of data is reached\n        if (offset + 1 < data.length && this.isHeaderPattern(data, offset)) {\n            // MPEG header Length\n            var headerLength = 4;\n            // MPEG frame Length\n            var header = this.parseHeader(data, offset);\n            var frameLength = headerLength;\n            if (header && header.frameLength) {\n                frameLength = header.frameLength;\n            }\n            var newOffset = offset + frameLength;\n            if (newOffset === data.length || (newOffset + 1 < data.length && this.isHeaderPattern(data, newOffset))) {\n                return true;\n            }\n        }\n        return false;\n    }\n};\nexports.default = MpegAudio;\n\n\n/***/ }),\n\n/***/ \"./src/demux/sample-aes.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/sample-aes.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * SAMPLE-AES decrypter\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decrypter_1 = __webpack_require__(/*! ../crypt/decrypter */ \"./src/crypt/decrypter.js\");\nvar SampleAesDecrypter = /** @class */ (function () {\n    function SampleAesDecrypter(observer, config, decryptdata, discardEPB) {\n        this.decryptdata = decryptdata;\n        this.discardEPB = discardEPB;\n        this.decrypter = new decrypter_1.default(observer, config, { removePKCS7Padding: false });\n    }\n    SampleAesDecrypter.prototype.decryptBuffer = function (encryptedData, callback) {\n        this.decrypter.decrypt(encryptedData, this.decryptdata.key.buffer, this.decryptdata.iv.buffer, callback);\n    };\n    // AAC - encrypt all full 16 bytes blocks starting from offset 16\n    SampleAesDecrypter.prototype.decryptAacSample = function (samples, sampleIndex, callback, sync) {\n        var curUnit = samples[sampleIndex].unit;\n        var encryptedData = curUnit.subarray(16, curUnit.length - curUnit.length % 16);\n        var encryptedBuffer = encryptedData.buffer.slice(encryptedData.byteOffset, encryptedData.byteOffset + encryptedData.length);\n        var localthis = this;\n        this.decryptBuffer(encryptedBuffer, function (decryptedData) {\n            decryptedData = new Uint8Array(decryptedData);\n            curUnit.set(decryptedData, 16);\n            if (!sync) {\n                localthis.decryptAacSamples(samples, sampleIndex + 1, callback);\n            }\n        });\n    };\n    SampleAesDecrypter.prototype.decryptAacSamples = function (samples, sampleIndex, callback) {\n        for (;; sampleIndex++) {\n            if (sampleIndex >= samples.length) {\n                callback();\n                return;\n            }\n            if (samples[sampleIndex].unit.length < 32) {\n                continue;\n            }\n            var sync = this.decrypter.isSync();\n            this.decryptAacSample(samples, sampleIndex, callback, sync);\n            if (!sync) {\n                return;\n            }\n        }\n    };\n    // AVC - encrypt one 16 bytes block out of ten, starting from offset 32\n    SampleAesDecrypter.prototype.getAvcEncryptedData = function (decodedData) {\n        var encryptedDataLen = Math.floor((decodedData.length - 48) / 160) * 16 + 16;\n        var encryptedData = new Int8Array(encryptedDataLen);\n        var outputPos = 0;\n        for (var inputPos = 32; inputPos <= decodedData.length - 16; inputPos += 160, outputPos += 16) {\n            encryptedData.set(decodedData.subarray(inputPos, inputPos + 16), outputPos);\n        }\n        return encryptedData;\n    };\n    SampleAesDecrypter.prototype.getAvcDecryptedUnit = function (decodedData, decryptedData) {\n        decryptedData = new Uint8Array(decryptedData);\n        var inputPos = 0;\n        for (var outputPos = 32; outputPos <= decodedData.length - 16; outputPos += 160, inputPos += 16) {\n            decodedData.set(decryptedData.subarray(inputPos, inputPos + 16), outputPos);\n        }\n        return decodedData;\n    };\n    SampleAesDecrypter.prototype.decryptAvcSample = function (samples, sampleIndex, unitIndex, callback, curUnit, sync) {\n        var decodedData = this.discardEPB(curUnit.data);\n        var encryptedData = this.getAvcEncryptedData(decodedData);\n        var localthis = this;\n        this.decryptBuffer(encryptedData.buffer, function (decryptedData) {\n            curUnit.data = localthis.getAvcDecryptedUnit(decodedData, decryptedData);\n            if (!sync) {\n                localthis.decryptAvcSamples(samples, sampleIndex, unitIndex + 1, callback);\n            }\n        });\n    };\n    SampleAesDecrypter.prototype.decryptAvcSamples = function (samples, sampleIndex, unitIndex, callback) {\n        for (;; sampleIndex++, unitIndex = 0) {\n            if (sampleIndex >= samples.length) {\n                callback();\n                return;\n            }\n            var curUnits = samples[sampleIndex].units;\n            for (;; unitIndex++) {\n                if (unitIndex >= curUnits.length) {\n                    break;\n                }\n                var curUnit = curUnits[unitIndex];\n                if (curUnit.length <= 48 || (curUnit.type !== 1 && curUnit.type !== 5)) {\n                    continue;\n                }\n                var sync = this.decrypter.isSync();\n                this.decryptAvcSample(samples, sampleIndex, unitIndex, callback, curUnit, sync);\n                if (!sync) {\n                    return;\n                }\n            }\n        }\n    };\n    return SampleAesDecrypter;\n}());\nexports.default = SampleAesDecrypter;\n\n\n/***/ }),\n\n/***/ \"./src/demux/tsdemuxer.js\":\n/*!********************************!*\\\n  !*** ./src/demux/tsdemuxer.js ***!\n  \\********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * highly optimized TS demuxer:\n * parse PAT, PMT\n * extract PES packet from audio and video PIDs\n * extract AVC/H264 NAL units and AAC/ADTS samples from PES packet\n * trigger the remuxer upon parsing completion\n * it also tries to workaround as best as it can audio codec switch (HE-AAC to AAC and vice versa), without having to restart the MediaSource.\n * it also controls the remuxing process :\n * upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ADTS = __webpack_require__(/*! ./adts */ \"./src/demux/adts.js\");\nvar mpegaudio_1 = __webpack_require__(/*! ./mpegaudio */ \"./src/demux/mpegaudio.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar exp_golomb_1 = __webpack_require__(/*! ./exp-golomb */ \"./src/demux/exp-golomb.js\");\nvar sample_aes_1 = __webpack_require__(/*! ./sample-aes */ \"./src/demux/sample-aes.js\");\n// import Hex from '../utils/hex';\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\n// We are using fixed track IDs for driving the MP4 remuxer\n// instead of following the TS PIDs.\n// There is no reason not to do this and some browsers/SourceBuffer-demuxers\n// may not like if there are TrackID \"switches\"\n// See https://github.com/video-dev/hls.js/issues/1331\n// Here we are mapping our internal track types to constant MP4 track IDs\n// With MSE currently one can only have one track of each, and we are muxing\n// whatever video/audio rendition in them.\nvar RemuxerTrackIdConfig = {\n    video: 1,\n    audio: 2,\n    id3: 3,\n    text: 4\n};\nvar TSDemuxer = /** @class */ (function () {\n    function TSDemuxer(observer, remuxer, config, typeSupported) {\n        this.observer = observer;\n        this.config = config;\n        this.typeSupported = typeSupported;\n        this.remuxer = remuxer;\n        this.sampleAes = null;\n    }\n    TSDemuxer.prototype.setDecryptData = function (decryptdata) {\n        if ((decryptdata != null) && (decryptdata.key != null) && (decryptdata.method === 'SAMPLE-AES')) {\n            this.sampleAes = new sample_aes_1.default(this.observer, this.config, decryptdata, this.discardEPB);\n        }\n        else {\n            this.sampleAes = null;\n        }\n    };\n    TSDemuxer.probe = function (data) {\n        var syncOffset = TSDemuxer._syncOffset(data);\n        if (syncOffset < 0) {\n            return false;\n        }\n        else {\n            if (syncOffset) {\n                logger_1.logger.warn(\"MPEG2-TS detected but first sync word found @ offset \" + syncOffset + \", junk ahead ?\");\n            }\n            return true;\n        }\n    };\n    TSDemuxer._syncOffset = function (data) {\n        // scan 1000 first bytes\n        var scanwindow = Math.min(1000, data.length - 3 * 188);\n        var i = 0;\n        while (i < scanwindow) {\n            // a TS fragment should contain at least 3 TS packets, a PAT, a PMT, and one PID, each starting with 0x47\n            if (data[i] === 0x47 && data[i + 188] === 0x47 && data[i + 2 * 188] === 0x47) {\n                return i;\n            }\n            else {\n                i++;\n            }\n        }\n        return -1;\n    };\n    /**\n     * Creates a track model internal to demuxer used to drive remuxing input\n     *\n     * @param {string} type 'audio' | 'video' | 'id3' | 'text'\n     * @param {number} duration\n     * @return {object} TSDemuxer's internal track model\n     */\n    TSDemuxer.createTrack = function (type, duration) {\n        return {\n            container: type === 'video' || type === 'audio' ? 'video/mp2t' : undefined,\n            type: type,\n            id: RemuxerTrackIdConfig[type],\n            pid: -1,\n            inputTimeScale: 90000,\n            sequenceNumber: 0,\n            samples: [],\n            len: 0,\n            dropped: type === 'video' ? 0 : undefined,\n            isAAC: type === 'audio' ? true : undefined,\n            duration: type === 'audio' ? duration : undefined\n        };\n    };\n    /**\n     * Initializes a new init segment on the demuxer/remuxer interface. Needed for discontinuities/track-switches (or at stream start)\n     * Resets all internal track instances of the demuxer.\n     *\n     * @override Implements generic demuxing/remuxing interface (see DemuxerInline)\n     * @param {object} initSegment\n     * @param {string} audioCodec\n     * @param {string} videoCodec\n     * @param {number} duration (in TS timescale = 90kHz)\n     */\n    TSDemuxer.prototype.resetInitSegment = function (initSegment, audioCodec, videoCodec, duration) {\n        this.pmtParsed = false;\n        this._pmtId = -1;\n        this._avcTrack = TSDemuxer.createTrack('video', duration);\n        this._audioTrack = TSDemuxer.createTrack('audio', duration);\n        this._id3Track = TSDemuxer.createTrack('id3', duration);\n        this._txtTrack = TSDemuxer.createTrack('text', duration);\n        // flush any partial content\n        this.aacOverFlow = null;\n        this.aacLastPTS = null;\n        this.avcSample = null;\n        this.audioCodec = audioCodec;\n        this.videoCodec = videoCodec;\n        this._duration = duration;\n    };\n    /**\n     *\n     * @override\n     */\n    TSDemuxer.prototype.resetTimeStamp = function () { };\n    // feed incoming data to the front of the parsing pipeline\n    TSDemuxer.prototype.append = function (data, timeOffset, contiguous, accurateTimeOffset) {\n        var start, len = data.length, stt, pid, atf, offset, pes, unknownPIDs = false;\n        this.contiguous = contiguous;\n        var pmtParsed = this.pmtParsed, avcTrack = this._avcTrack, audioTrack = this._audioTrack, id3Track = this._id3Track, avcId = avcTrack.pid, audioId = audioTrack.pid, id3Id = id3Track.pid, pmtId = this._pmtId, avcData = avcTrack.pesData, audioData = audioTrack.pesData, id3Data = id3Track.pesData, parsePAT = this._parsePAT, parsePMT = this._parsePMT, parsePES = this._parsePES, parseAVCPES = this._parseAVCPES.bind(this), parseAACPES = this._parseAACPES.bind(this), parseMPEGPES = this._parseMPEGPES.bind(this), parseID3PES = this._parseID3PES.bind(this);\n        var syncOffset = TSDemuxer._syncOffset(data);\n        // don't parse last TS packet if incomplete\n        len -= (len + syncOffset) % 188;\n        // loop through TS packets\n        for (start = syncOffset; start < len; start += 188) {\n            if (data[start] === 0x47) {\n                stt = !!(data[start + 1] & 0x40);\n                // pid is a 13-bit field starting at the last bit of TS[1]\n                pid = ((data[start + 1] & 0x1f) << 8) + data[start + 2];\n                atf = (data[start + 3] & 0x30) >> 4;\n                // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.\n                if (atf > 1) {\n                    offset = start + 5 + data[start + 4];\n                    // continue if there is only adaptation field\n                    if (offset === (start + 188)) {\n                        continue;\n                    }\n                }\n                else {\n                    offset = start + 4;\n                }\n                switch (pid) {\n                    case avcId:\n                        if (stt) {\n                            if (avcData && (pes = parsePES(avcData)) && pes.pts !== undefined) {\n                                parseAVCPES(pes, false);\n                            }\n                            avcData = { data: [], size: 0 };\n                        }\n                        if (avcData) {\n                            avcData.data.push(data.subarray(offset, start + 188));\n                            avcData.size += start + 188 - offset;\n                        }\n                        break;\n                    case audioId:\n                        if (stt) {\n                            if (audioData && (pes = parsePES(audioData)) && pes.pts !== undefined) {\n                                if (audioTrack.isAAC) {\n                                    parseAACPES(pes);\n                                }\n                                else {\n                                    parseMPEGPES(pes);\n                                }\n                            }\n                            audioData = { data: [], size: 0 };\n                        }\n                        if (audioData) {\n                            audioData.data.push(data.subarray(offset, start + 188));\n                            audioData.size += start + 188 - offset;\n                        }\n                        break;\n                    case id3Id:\n                        if (stt) {\n                            if (id3Data && (pes = parsePES(id3Data)) && pes.pts !== undefined) {\n                                parseID3PES(pes);\n                            }\n                            id3Data = { data: [], size: 0 };\n                        }\n                        if (id3Data) {\n                            id3Data.data.push(data.subarray(offset, start + 188));\n                            id3Data.size += start + 188 - offset;\n                        }\n                        break;\n                    case 0:\n                        if (stt) {\n                            offset += data[offset] + 1;\n                        }\n                        pmtId = this._pmtId = parsePAT(data, offset);\n                        break;\n                    case pmtId:\n                        if (stt) {\n                            offset += data[offset] + 1;\n                        }\n                        var parsedPIDs = parsePMT(data, offset, this.typeSupported.mpeg === true || this.typeSupported.mp3 === true, this.sampleAes != null);\n                        // only update track id if track PID found while parsing PMT\n                        // this is to avoid resetting the PID to -1 in case\n                        // track PID transiently disappears from the stream\n                        // this could happen in case of transient missing audio samples for example\n                        // NOTE this is only the PID of the track as found in TS,\n                        // but we are not using this for MP4 track IDs.\n                        avcId = parsedPIDs.avc;\n                        if (avcId > 0) {\n                            avcTrack.pid = avcId;\n                        }\n                        audioId = parsedPIDs.audio;\n                        if (audioId > 0) {\n                            audioTrack.pid = audioId;\n                            audioTrack.isAAC = parsedPIDs.isAAC;\n                        }\n                        id3Id = parsedPIDs.id3;\n                        if (id3Id > 0) {\n                            id3Track.pid = id3Id;\n                        }\n                        if (unknownPIDs && !pmtParsed) {\n                            logger_1.logger.log('reparse from beginning');\n                            unknownPIDs = false;\n                            // we set it to -188, the += 188 in the for loop will reset start to 0\n                            start = syncOffset - 188;\n                        }\n                        pmtParsed = this.pmtParsed = true;\n                        break;\n                    case 17:\n                    case 0x1fff:\n                        break;\n                    default:\n                        unknownPIDs = true;\n                        break;\n                }\n            }\n            else {\n                this.observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'TS packet did not start with 0x47' });\n            }\n        }\n        // try to parse last PES packets\n        if (avcData && (pes = parsePES(avcData)) && pes.pts !== undefined) {\n            parseAVCPES(pes, true);\n            avcTrack.pesData = null;\n        }\n        else {\n            // either avcData null or PES truncated, keep it for next frag parsing\n            avcTrack.pesData = avcData;\n        }\n        if (audioData && (pes = parsePES(audioData)) && pes.pts !== undefined) {\n            if (audioTrack.isAAC) {\n                parseAACPES(pes);\n            }\n            else {\n                parseMPEGPES(pes);\n            }\n            audioTrack.pesData = null;\n        }\n        else {\n            if (audioData && audioData.size) {\n                logger_1.logger.log('last AAC PES packet truncated,might overlap between fragments');\n            }\n            // either audioData null or PES truncated, keep it for next frag parsing\n            audioTrack.pesData = audioData;\n        }\n        if (id3Data && (pes = parsePES(id3Data)) && pes.pts !== undefined) {\n            parseID3PES(pes);\n            id3Track.pesData = null;\n        }\n        else {\n            // either id3Data null or PES truncated, keep it for next frag parsing\n            id3Track.pesData = id3Data;\n        }\n        if (this.sampleAes == null) {\n            this.remuxer.remux(audioTrack, avcTrack, id3Track, this._txtTrack, timeOffset, contiguous, accurateTimeOffset);\n        }\n        else {\n            this.decryptAndRemux(audioTrack, avcTrack, id3Track, this._txtTrack, timeOffset, contiguous, accurateTimeOffset);\n        }\n    };\n    TSDemuxer.prototype.decryptAndRemux = function (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n        if (audioTrack.samples && audioTrack.isAAC) {\n            var localthis_1 = this;\n            this.sampleAes.decryptAacSamples(audioTrack.samples, 0, function () {\n                localthis_1.decryptAndRemuxAvc(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n            });\n        }\n        else {\n            this.decryptAndRemuxAvc(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n        }\n    };\n    TSDemuxer.prototype.decryptAndRemuxAvc = function (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n        if (videoTrack.samples) {\n            var localthis_2 = this;\n            this.sampleAes.decryptAvcSamples(videoTrack.samples, 0, 0, function () {\n                localthis_2.remuxer.remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n            });\n        }\n        else {\n            this.remuxer.remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset);\n        }\n    };\n    TSDemuxer.prototype.destroy = function () {\n        this._initPTS = this._initDTS = undefined;\n        this._duration = 0;\n    };\n    TSDemuxer.prototype._parsePAT = function (data, offset) {\n        // skip the PSI header and parse the first PMT entry\n        return (data[offset + 10] & 0x1F) << 8 | data[offset + 11];\n        // logger.log('PMT PID:'  + this._pmtId);\n    };\n    TSDemuxer.prototype._parsePMT = function (data, offset, mpegSupported, isSampleAes) {\n        var sectionLength, tableEnd, programInfoLength, pid, result = { audio: -1, avc: -1, id3: -1, isAAC: true };\n        sectionLength = (data[offset + 1] & 0x0f) << 8 | data[offset + 2];\n        tableEnd = offset + 3 + sectionLength - 4;\n        // to determine where the table is, we have to figure out how\n        // long the program info descriptors are\n        programInfoLength = (data[offset + 10] & 0x0f) << 8 | data[offset + 11];\n        // advance the offset to the first entry in the mapping table\n        offset += 12 + programInfoLength;\n        while (offset < tableEnd) {\n            pid = (data[offset + 1] & 0x1F) << 8 | data[offset + 2];\n            switch (data[offset]) {\n                case 0xcf: // SAMPLE-AES AAC\n                    if (!isSampleAes) {\n                        logger_1.logger.log('unkown stream type:' + data[offset]);\n                        break;\n                    }\n                /* falls through */\n                // ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio)\n                case 0x0f:\n                    // logger.log('AAC PID:'  + pid);\n                    if (result.audio === -1) {\n                        result.audio = pid;\n                    }\n                    break;\n                // Packetized metadata (ID3)\n                case 0x15:\n                    // logger.log('ID3 PID:'  + pid);\n                    if (result.id3 === -1) {\n                        result.id3 = pid;\n                    }\n                    break;\n                case 0xdb: // SAMPLE-AES AVC\n                    if (!isSampleAes) {\n                        logger_1.logger.log('unkown stream type:' + data[offset]);\n                        break;\n                    }\n                /* falls through */\n                // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)\n                case 0x1b:\n                    // logger.log('AVC PID:'  + pid);\n                    if (result.avc === -1) {\n                        result.avc = pid;\n                    }\n                    break;\n                // ISO/IEC 11172-3 (MPEG-1 audio)\n                // or ISO/IEC 13818-3 (MPEG-2 halved sample rate audio)\n                case 0x03:\n                case 0x04:\n                    // logger.log('MPEG PID:'  + pid);\n                    if (!mpegSupported) {\n                        logger_1.logger.log('MPEG audio found, not supported in this browser for now');\n                    }\n                    else if (result.audio === -1) {\n                        result.audio = pid;\n                        result.isAAC = false;\n                    }\n                    break;\n                case 0x24:\n                    logger_1.logger.warn('HEVC stream type found, not supported for now');\n                    break;\n                default:\n                    logger_1.logger.log('unkown stream type:' + data[offset]);\n                    break;\n            }\n            // move to the next table entry\n            // skip past the elementary stream descriptors, if present\n            offset += ((data[offset + 3] & 0x0F) << 8 | data[offset + 4]) + 5;\n        }\n        return result;\n    };\n    TSDemuxer.prototype._parsePES = function (stream) {\n        var i = 0, frag, pesFlags, pesPrefix, pesLen, pesHdrLen, pesData, pesPts, pesDts, payloadStartOffset, data = stream.data;\n        // safety check\n        if (!stream || stream.size === 0) {\n            return null;\n        }\n        // we might need up to 19 bytes to read PES header\n        // if first chunk of data is less than 19 bytes, let's merge it with following ones until we get 19 bytes\n        // usually only one merge is needed (and this is rare ...)\n        while (data[0].length < 19 && data.length > 1) {\n            var newData = new Uint8Array(data[0].length + data[1].length);\n            newData.set(data[0]);\n            newData.set(data[1], data[0].length);\n            data[0] = newData;\n            data.splice(1, 1);\n        }\n        // retrieve PTS/DTS from first fragment\n        frag = data[0];\n        pesPrefix = (frag[0] << 16) + (frag[1] << 8) + frag[2];\n        if (pesPrefix === 1) {\n            pesLen = (frag[4] << 8) + frag[5];\n            // if PES parsed length is not zero and greater than total received length, stop parsing. PES might be truncated\n            // minus 6 : PES header size\n            if (pesLen && pesLen > stream.size - 6) {\n                return null;\n            }\n            pesFlags = frag[7];\n            if (pesFlags & 0xC0) {\n                /* PES header described here : http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n                    as PTS / DTS is 33 bit we cannot use bitwise operator in JS,\n                    as Bitwise operators treat their operands as a sequence of 32 bits */\n                pesPts = (frag[9] & 0x0E) * 536870912 + // 1 << 29\n                    (frag[10] & 0xFF) * 4194304 + // 1 << 22\n                    (frag[11] & 0xFE) * 16384 + // 1 << 14\n                    (frag[12] & 0xFF) * 128 + // 1 << 7\n                    (frag[13] & 0xFE) / 2;\n                // check if greater than 2^32 -1\n                if (pesPts > 4294967295) {\n                    // decrement 2^33\n                    pesPts -= 8589934592;\n                }\n                if (pesFlags & 0x40) {\n                    pesDts = (frag[14] & 0x0E) * 536870912 + // 1 << 29\n                        (frag[15] & 0xFF) * 4194304 + // 1 << 22\n                        (frag[16] & 0xFE) * 16384 + // 1 << 14\n                        (frag[17] & 0xFF) * 128 + // 1 << 7\n                        (frag[18] & 0xFE) / 2;\n                    // check if greater than 2^32 -1\n                    if (pesDts > 4294967295) {\n                        // decrement 2^33\n                        pesDts -= 8589934592;\n                    }\n                    if (pesPts - pesDts > 60 * 90000) {\n                        logger_1.logger.warn(Math.round((pesPts - pesDts) / 90000) + \"s delta between PTS and DTS, align them\");\n                        pesPts = pesDts;\n                    }\n                }\n                else {\n                    pesDts = pesPts;\n                }\n            }\n            pesHdrLen = frag[8];\n            // 9 bytes : 6 bytes for PES header + 3 bytes for PES extension\n            payloadStartOffset = pesHdrLen + 9;\n            stream.size -= payloadStartOffset;\n            // reassemble PES packet\n            pesData = new Uint8Array(stream.size);\n            for (var j = 0, dataLen = data.length; j < dataLen; j++) {\n                frag = data[j];\n                var len = frag.byteLength;\n                if (payloadStartOffset) {\n                    if (payloadStartOffset > len) {\n                        // trim full frag if PES header bigger than frag\n                        payloadStartOffset -= len;\n                        continue;\n                    }\n                    else {\n                        // trim partial frag if PES header smaller than frag\n                        frag = frag.subarray(payloadStartOffset);\n                        len -= payloadStartOffset;\n                        payloadStartOffset = 0;\n                    }\n                }\n                pesData.set(frag, i);\n                i += len;\n            }\n            if (pesLen) {\n                // payload size : remove PES header + PES extension\n                pesLen -= pesHdrLen + 3;\n            }\n            return { data: pesData, pts: pesPts, dts: pesDts, len: pesLen };\n        }\n        else {\n            return null;\n        }\n    };\n    TSDemuxer.prototype.pushAccesUnit = function (avcSample, avcTrack) {\n        if (avcSample.units.length && avcSample.frame) {\n            var samples = avcTrack.samples;\n            var nbSamples = samples.length;\n            // only push AVC sample if starting with a keyframe is not mandatory OR\n            //    if keyframe already found in this fragment OR\n            //       keyframe found in last fragment (track.sps) AND\n            //          samples already appended (we already found a keyframe in this fragment) OR fragment is contiguous\n            if (!this.config.forceKeyFrameOnDiscontinuity ||\n                avcSample.key === true ||\n                (avcTrack.sps && (nbSamples || this.contiguous))) {\n                avcSample.id = nbSamples;\n                samples.push(avcSample);\n            }\n            else {\n                // dropped samples, track it\n                avcTrack.dropped++;\n            }\n        }\n        if (avcSample.debug.length) {\n            logger_1.logger.log(avcSample.pts + '/' + avcSample.dts + ':' + avcSample.debug);\n        }\n    };\n    TSDemuxer.prototype._parseAVCPES = function (pes, last) {\n        var _this = this;\n        // logger.log('parse new PES');\n        var track = this._avcTrack, units = this._parseAVCNALu(pes.data), debug = false, expGolombDecoder, avcSample = this.avcSample, push, spsfound = false, i, pushAccesUnit = this.pushAccesUnit.bind(this), createAVCSample = function (key, pts, dts, debug) {\n            return { key: key, pts: pts, dts: dts, units: [], debug: debug };\n        };\n        // free pes.data to save up some memory\n        pes.data = null;\n        // if new NAL units found and last sample still there, let's push ...\n        // this helps parsing streams with missing AUD (only do this if AUD never found)\n        if (avcSample && units.length && !track.audFound) {\n            pushAccesUnit(avcSample, track);\n            avcSample = this.avcSample = createAVCSample(false, pes.pts, pes.dts, '');\n        }\n        units.forEach(function (unit) {\n            switch (unit.type) {\n                // NDR\n                case 1:\n                    push = true;\n                    if (!avcSample) {\n                        avcSample = _this.avcSample = createAVCSample(true, pes.pts, pes.dts, '');\n                    }\n                    if (debug) {\n                        avcSample.debug += 'NDR ';\n                    }\n                    avcSample.frame = true;\n                    var data = unit.data;\n                    // only check slice type to detect KF in case SPS found in same packet (any keyframe is preceded by SPS ...)\n                    if (spsfound && data.length > 4) {\n                        // retrieve slice type by parsing beginning of NAL unit (follow H264 spec, slice_header definition) to detect keyframe embedded in NDR\n                        var sliceType = new exp_golomb_1.default(data).readSliceType();\n                        // 2 : I slice, 4 : SI slice, 7 : I slice, 9: SI slice\n                        // SI slice : A slice that is coded using intra prediction only and using quantisation of the prediction samples.\n                        // An SI slice can be coded such that its decoded samples can be constructed identically to an SP slice.\n                        // I slice: A slice that is not an SI slice that is decoded using intra prediction only.\n                        // if (sliceType === 2 || sliceType === 7) {\n                        if (sliceType === 2 || sliceType === 4 || sliceType === 7 || sliceType === 9) {\n                            avcSample.key = true;\n                        }\n                    }\n                    break;\n                // IDR\n                case 5:\n                    push = true;\n                    // handle PES not starting with AUD\n                    if (!avcSample) {\n                        avcSample = _this.avcSample = createAVCSample(true, pes.pts, pes.dts, '');\n                    }\n                    if (debug) {\n                        avcSample.debug += 'IDR ';\n                    }\n                    avcSample.key = true;\n                    avcSample.frame = true;\n                    break;\n                // SEI\n                case 6:\n                    push = true;\n                    if (debug && avcSample) {\n                        avcSample.debug += 'SEI ';\n                    }\n                    expGolombDecoder = new exp_golomb_1.default(_this.discardEPB(unit.data));\n                    // skip frameType\n                    expGolombDecoder.readUByte();\n                    var payloadType = 0;\n                    var payloadSize = 0;\n                    var endOfCaptions = false;\n                    var b = 0;\n                    while (!endOfCaptions && expGolombDecoder.bytesAvailable > 1) {\n                        payloadType = 0;\n                        do {\n                            b = expGolombDecoder.readUByte();\n                            payloadType += b;\n                        } while (b === 0xFF);\n                        // Parse payload size.\n                        payloadSize = 0;\n                        do {\n                            b = expGolombDecoder.readUByte();\n                            payloadSize += b;\n                        } while (b === 0xFF);\n                        // TODO: there can be more than one payload in an SEI packet...\n                        // TODO: need to read type and size in a while loop to get them all\n                        if (payloadType === 4 && expGolombDecoder.bytesAvailable !== 0) {\n                            endOfCaptions = true;\n                            var countryCode = expGolombDecoder.readUByte();\n                            if (countryCode === 181) {\n                                var providerCode = expGolombDecoder.readUShort();\n                                if (providerCode === 49) {\n                                    var userStructure = expGolombDecoder.readUInt();\n                                    if (userStructure === 0x47413934) {\n                                        var userDataType = expGolombDecoder.readUByte();\n                                        // Raw CEA-608 bytes wrapped in CEA-708 packet\n                                        if (userDataType === 3) {\n                                            var firstByte = expGolombDecoder.readUByte();\n                                            var secondByte = expGolombDecoder.readUByte();\n                                            var totalCCs = 31 & firstByte;\n                                            var byteArray = [firstByte, secondByte];\n                                            for (i = 0; i < totalCCs; i++) {\n                                                // 3 bytes per CC\n                                                byteArray.push(expGolombDecoder.readUByte());\n                                                byteArray.push(expGolombDecoder.readUByte());\n                                                byteArray.push(expGolombDecoder.readUByte());\n                                            }\n                                            _this._insertSampleInOrder(_this._txtTrack.samples, { type: 3, pts: pes.pts, bytes: byteArray });\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                        else if (payloadSize < expGolombDecoder.bytesAvailable) {\n                            for (i = 0; i < payloadSize; i++) {\n                                expGolombDecoder.readUByte();\n                            }\n                        }\n                    }\n                    break;\n                // SPS\n                case 7:\n                    push = true;\n                    spsfound = true;\n                    if (debug && avcSample) {\n                        avcSample.debug += 'SPS ';\n                    }\n                    if (!track.sps) {\n                        expGolombDecoder = new exp_golomb_1.default(unit.data);\n                        var config = expGolombDecoder.readSPS();\n                        track.width = config.width;\n                        track.height = config.height;\n                        track.pixelRatio = config.pixelRatio;\n                        track.sps = [unit.data];\n                        track.duration = _this._duration;\n                        var codecarray = unit.data.subarray(1, 4);\n                        var codecstring = 'avc1.';\n                        for (i = 0; i < 3; i++) {\n                            var h = codecarray[i].toString(16);\n                            if (h.length < 2) {\n                                h = '0' + h;\n                            }\n                            codecstring += h;\n                        }\n                        track.codec = codecstring;\n                    }\n                    break;\n                // PPS\n                case 8:\n                    push = true;\n                    if (debug && avcSample) {\n                        avcSample.debug += 'PPS ';\n                    }\n                    if (!track.pps) {\n                        track.pps = [unit.data];\n                    }\n                    break;\n                // AUD\n                case 9:\n                    push = false;\n                    track.audFound = true;\n                    if (avcSample) {\n                        pushAccesUnit(avcSample, track);\n                    }\n                    avcSample = _this.avcSample = createAVCSample(false, pes.pts, pes.dts, debug ? 'AUD ' : '');\n                    break;\n                // Filler Data\n                case 12:\n                    push = false;\n                    break;\n                default:\n                    push = false;\n                    if (avcSample) {\n                        avcSample.debug += 'unknown NAL ' + unit.type + ' ';\n                    }\n                    break;\n            }\n            if (avcSample && push) {\n                var units_1 = avcSample.units;\n                units_1.push(unit);\n            }\n        });\n        // if last PES packet, push samples\n        if (last && avcSample) {\n            pushAccesUnit(avcSample, track);\n            this.avcSample = null;\n        }\n    };\n    TSDemuxer.prototype._insertSampleInOrder = function (arr, data) {\n        var len = arr.length;\n        if (len > 0) {\n            if (data.pts >= arr[len - 1].pts) {\n                arr.push(data);\n            }\n            else {\n                for (var pos = len - 1; pos >= 0; pos--) {\n                    if (data.pts < arr[pos].pts) {\n                        arr.splice(pos, 0, data);\n                        break;\n                    }\n                }\n            }\n        }\n        else {\n            arr.push(data);\n        }\n    };\n    TSDemuxer.prototype._getLastNalUnit = function () {\n        var avcSample = this.avcSample, lastUnit;\n        // try to fallback to previous sample if current one is empty\n        if (!avcSample || avcSample.units.length === 0) {\n            var track = this._avcTrack, samples = track.samples;\n            avcSample = samples[samples.length - 1];\n        }\n        if (avcSample) {\n            var units = avcSample.units;\n            lastUnit = units[units.length - 1];\n        }\n        return lastUnit;\n    };\n    TSDemuxer.prototype._parseAVCNALu = function (array) {\n        var i = 0, len = array.byteLength, value, overflow, track = this._avcTrack, state = track.naluState || 0, lastState = state;\n        var units = [], unit, unitType, lastUnitStart = -1, lastUnitType;\n        // logger.log('PES:' + Hex.hexDump(array));\n        if (state === -1) {\n            // special use case where we found 3 or 4-byte start codes exactly at the end of previous PES packet\n            lastUnitStart = 0;\n            // NALu type is value read from offset 0\n            lastUnitType = array[0] & 0x1f;\n            state = 0;\n            i = 1;\n        }\n        while (i < len) {\n            value = array[i++];\n            // optimization. state 0 and 1 are the predominant case. let's handle them outside of the switch/case\n            if (!state) {\n                state = value ? 0 : 1;\n                continue;\n            }\n            if (state === 1) {\n                state = value ? 0 : 2;\n                continue;\n            }\n            // here we have state either equal to 2 or 3\n            if (!value) {\n                state = 3;\n            }\n            else if (value === 1) {\n                if (lastUnitStart >= 0) {\n                    unit = { data: array.subarray(lastUnitStart, i - state - 1), type: lastUnitType };\n                    // logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);\n                    units.push(unit);\n                }\n                else {\n                    // lastUnitStart is undefined => this is the first start code found in this PES packet\n                    // first check if start code delimiter is overlapping between 2 PES packets,\n                    // ie it started in last packet (lastState not zero)\n                    // and ended at the beginning of this PES packet (i <= 4 - lastState)\n                    var lastUnit = this._getLastNalUnit();\n                    if (lastUnit) {\n                        if (lastState && (i <= 4 - lastState)) {\n                            // start delimiter overlapping between PES packets\n                            // strip start delimiter bytes from the end of last NAL unit\n                            // check if lastUnit had a state different from zero\n                            if (lastUnit.state) {\n                                // strip last bytes\n                                lastUnit.data = lastUnit.data.subarray(0, lastUnit.data.byteLength - lastState);\n                            }\n                        }\n                        // If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.\n                        overflow = i - state - 1;\n                        if (overflow > 0) {\n                            // logger.log('first NALU found with overflow:' + overflow);\n                            var tmp = new Uint8Array(lastUnit.data.byteLength + overflow);\n                            tmp.set(lastUnit.data, 0);\n                            tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);\n                            lastUnit.data = tmp;\n                        }\n                    }\n                }\n                // check if we can read unit type\n                if (i < len) {\n                    unitType = array[i] & 0x1f;\n                    // logger.log('find NALU @ offset:' + i + ',type:' + unitType);\n                    lastUnitStart = i;\n                    lastUnitType = unitType;\n                    state = 0;\n                }\n                else {\n                    // not enough byte to read unit type. let's read it on next PES parsing\n                    state = -1;\n                }\n            }\n            else {\n                state = 0;\n            }\n        }\n        if (lastUnitStart >= 0 && state >= 0) {\n            unit = { data: array.subarray(lastUnitStart, len), type: lastUnitType, state: state };\n            units.push(unit);\n            // logger.log('pushing NALU, type/size/state:' + unit.type + '/' + unit.data.byteLength + '/' + state);\n        }\n        // no NALu found\n        if (units.length === 0) {\n            // append pes.data to previous NAL unit\n            var lastUnit = this._getLastNalUnit();\n            if (lastUnit) {\n                var tmp = new Uint8Array(lastUnit.data.byteLength + array.byteLength);\n                tmp.set(lastUnit.data, 0);\n                tmp.set(array, lastUnit.data.byteLength);\n                lastUnit.data = tmp;\n            }\n        }\n        track.naluState = state;\n        return units;\n    };\n    /**\n     * remove Emulation Prevention bytes from a RBSP\n     */\n    TSDemuxer.prototype.discardEPB = function (data) {\n        var length = data.byteLength, EPBPositions = [], i = 1, newLength, newData;\n        // Find all `Emulation Prevention Bytes`\n        while (i < length - 2) {\n            if (data[i] === 0 &&\n                data[i + 1] === 0 &&\n                data[i + 2] === 0x03) {\n                EPBPositions.push(i + 2);\n                i += 2;\n            }\n            else {\n                i++;\n            }\n        }\n        // If no Emulation Prevention Bytes were found just return the original\n        // array\n        if (EPBPositions.length === 0) {\n            return data;\n        }\n        // Create a new array to hold the NAL unit data\n        newLength = length - EPBPositions.length;\n        newData = new Uint8Array(newLength);\n        var sourceIndex = 0;\n        for (i = 0; i < newLength; sourceIndex++, i++) {\n            if (sourceIndex === EPBPositions[0]) {\n                // Skip this byte\n                sourceIndex++;\n                // Remove this position index\n                EPBPositions.shift();\n            }\n            newData[i] = data[sourceIndex];\n        }\n        return newData;\n    };\n    TSDemuxer.prototype._parseAACPES = function (pes) {\n        var track = this._audioTrack, data = pes.data, pts = pes.pts, startOffset = 0, aacOverFlow = this.aacOverFlow, aacLastPTS = this.aacLastPTS, frameDuration, frameIndex, offset, stamp, len;\n        if (aacOverFlow) {\n            var tmp = new Uint8Array(aacOverFlow.byteLength + data.byteLength);\n            tmp.set(aacOverFlow, 0);\n            tmp.set(data, aacOverFlow.byteLength);\n            // logger.log(`AAC: append overflowing ${aacOverFlow.byteLength} bytes to beginning of new PES`);\n            data = tmp;\n        }\n        // look for ADTS header (0xFFFx)\n        for (offset = startOffset, len = data.length; offset < len - 1; offset++) {\n            if (ADTS.isHeader(data, offset)) {\n                break;\n            }\n        }\n        // if ADTS header does not start straight from the beginning of the PES payload, raise an error\n        if (offset) {\n            var reason = void 0, fatal = void 0;\n            if (offset < len - 1) {\n                reason = \"AAC PES did not start with ADTS header,offset:\" + offset;\n                fatal = false;\n            }\n            else {\n                reason = 'no ADTS header found in AAC PES';\n                fatal = true;\n            }\n            logger_1.logger.warn(\"parsing error:\" + reason);\n            this.observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.FRAG_PARSING_ERROR, fatal: fatal, reason: reason });\n            if (fatal) {\n                return;\n            }\n        }\n        ADTS.initTrackConfig(track, this.observer, data, offset, this.audioCodec);\n        frameIndex = 0;\n        frameDuration = ADTS.getFrameDuration(track.samplerate);\n        // if last AAC frame is overflowing, we should ensure timestamps are contiguous:\n        // first sample PTS should be equal to last sample PTS + frameDuration\n        if (aacOverFlow && aacLastPTS) {\n            var newPTS = aacLastPTS + frameDuration;\n            if (Math.abs(newPTS - pts) > 1) {\n                logger_1.logger.log(\"AAC: align PTS for overlapping frames by \" + Math.round((newPTS - pts) / 90));\n                pts = newPTS;\n            }\n        }\n        // scan for aac samples\n        while (offset < len) {\n            if (ADTS.isHeader(data, offset) && (offset + 5) < len) {\n                var frame = ADTS.appendFrame(track, data, offset, pts, frameIndex);\n                if (frame) {\n                    // logger.log(`${Math.round(frame.sample.pts)} : AAC`);\n                    offset += frame.length;\n                    stamp = frame.sample.pts;\n                    frameIndex++;\n                }\n                else {\n                    // logger.log('Unable to parse AAC frame');\n                    break;\n                }\n            }\n            else {\n                // nothing found, keep looking\n                offset++;\n            }\n        }\n        if (offset < len) {\n            aacOverFlow = data.subarray(offset, len);\n            // logger.log(`AAC: overflow detected:${len-offset}`);\n        }\n        else {\n            aacOverFlow = null;\n        }\n        this.aacOverFlow = aacOverFlow;\n        this.aacLastPTS = stamp;\n    };\n    TSDemuxer.prototype._parseMPEGPES = function (pes) {\n        var data = pes.data;\n        var length = data.length;\n        var frameIndex = 0;\n        var offset = 0;\n        var pts = pes.pts;\n        while (offset < length) {\n            if (mpegaudio_1.default.isHeader(data, offset)) {\n                var frame = mpegaudio_1.default.appendFrame(this._audioTrack, data, offset, pts, frameIndex);\n                if (frame) {\n                    offset += frame.length;\n                    frameIndex++;\n                }\n                else {\n                    // logger.log('Unable to parse Mpeg audio frame');\n                    break;\n                }\n            }\n            else {\n                // nothing found, keep looking\n                offset++;\n            }\n        }\n    };\n    TSDemuxer.prototype._parseID3PES = function (pes) {\n        this._id3Track.samples.push(pes);\n    };\n    return TSDemuxer;\n}());\nexports.default = TSDemuxer;\n\n\n/***/ }),\n\n/***/ \"./src/errors.js\":\n/*!***********************!*\\\n  !*** ./src/errors.js ***!\n  \\***********************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorTypes = {\n    // Identifier for a network error (loading error / timeout ...)\n    NETWORK_ERROR: 'networkError',\n    // Identifier for a media Error (video/parsing/mediasource error)\n    MEDIA_ERROR: 'mediaError',\n    // EME (encrypted media extensions) errors\n    KEY_SYSTEM_ERROR: 'keySystemError',\n    // Identifier for a mux Error (demuxing/remuxing)\n    MUX_ERROR: 'muxError',\n    // Identifier for all other errors\n    OTHER_ERROR: 'otherError'\n};\n/**\n * @enum {ErrorDetails}\n * @typedef {string} ErrorDetail\n */\nexports.ErrorDetails = {\n    KEY_SYSTEM_NO_KEYS: 'keySystemNoKeys',\n    KEY_SYSTEM_NO_ACCESS: 'keySystemNoAccess',\n    KEY_SYSTEM_NO_SESSION: 'keySystemNoSession',\n    KEY_SYSTEM_LICENSE_REQUEST_FAILED: 'keySystemLicenseRequestFailed',\n    // Identifier for a manifest load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n    MANIFEST_LOAD_ERROR: 'manifestLoadError',\n    // Identifier for a manifest load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n    MANIFEST_LOAD_TIMEOUT: 'manifestLoadTimeOut',\n    // Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}\n    MANIFEST_PARSING_ERROR: 'manifestParsingError',\n    // Identifier for a manifest with only incompatible codecs error - data: { url : faulty URL, reason : error reason}\n    MANIFEST_INCOMPATIBLE_CODECS_ERROR: 'manifestIncompatibleCodecsError',\n    // Identifier for a level load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n    LEVEL_LOAD_ERROR: 'levelLoadError',\n    // Identifier for a level load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n    LEVEL_LOAD_TIMEOUT: 'levelLoadTimeOut',\n    // Identifier for a level switch error - data: { level : faulty level Id, event : error description}\n    LEVEL_SWITCH_ERROR: 'levelSwitchError',\n    // Identifier for an audio track load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n    AUDIO_TRACK_LOAD_ERROR: 'audioTrackLoadError',\n    // Identifier for an audio track load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n    AUDIO_TRACK_LOAD_TIMEOUT: 'audioTrackLoadTimeOut',\n    // Identifier for fragment load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n    FRAG_LOAD_ERROR: 'fragLoadError',\n    // Identifier for fragment load timeout error - data: { frag : fragment object}\n    FRAG_LOAD_TIMEOUT: 'fragLoadTimeOut',\n    // Identifier for a fragment decryption error event - data: {id : demuxer Id,frag: fragment object, reason : parsing error description }\n    FRAG_DECRYPT_ERROR: 'fragDecryptError',\n    // Identifier for a fragment parsing error event - data: { id : demuxer Id, reason : parsing error description }\n    // will be renamed DEMUX_PARSING_ERROR and switched to MUX_ERROR in the next major release\n    FRAG_PARSING_ERROR: 'fragParsingError',\n    // Identifier for a remux alloc error event - data: { id : demuxer Id, frag : fragment object, bytes : nb of bytes on which allocation failed , reason : error text }\n    REMUX_ALLOC_ERROR: 'remuxAllocError',\n    // Identifier for decrypt key load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n    KEY_LOAD_ERROR: 'keyLoadError',\n    // Identifier for decrypt key load timeout error - data: { frag : fragment object}\n    KEY_LOAD_TIMEOUT: 'keyLoadTimeOut',\n    // Triggered when an exception occurs while adding a sourceBuffer to MediaSource - data : {  err : exception , mimeType : mimeType }\n    BUFFER_ADD_CODEC_ERROR: 'bufferAddCodecError',\n    // Identifier for a buffer append error - data: append error description\n    BUFFER_APPEND_ERROR: 'bufferAppendError',\n    // Identifier for a buffer appending error event - data: appending error description\n    BUFFER_APPENDING_ERROR: 'bufferAppendingError',\n    // Identifier for a buffer stalled error event\n    BUFFER_STALLED_ERROR: 'bufferStalledError',\n    // Identifier for a buffer full event\n    BUFFER_FULL_ERROR: 'bufferFullError',\n    // Identifier for a buffer seek over hole event\n    BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole',\n    // Identifier for a buffer nudge on stall (playback is stuck although currentTime is in a buffered area)\n    BUFFER_NUDGE_ON_STALL: 'bufferNudgeOnStall',\n    // Identifier for an internal exception happening inside hls.js while handling an event\n    INTERNAL_EXCEPTION: 'internalException'\n};\n\n\n/***/ }),\n\n/***/ \"./src/event-handler.js\":\n/*!******************************!*\\\n  !*** ./src/event-handler.js ***!\n  \\******************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n*\n* All objects in the event handling chain should inherit from this class\n*\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger_1 = __webpack_require__(/*! ./utils/logger */ \"./src/utils/logger.js\");\nvar errors_1 = __webpack_require__(/*! ./errors */ \"./src/errors.js\");\nvar events_1 = __webpack_require__(/*! ./events */ \"./src/events.js\");\nvar FORBIDDEN_EVENT_NAMES = {\n    'hlsEventGeneric': true,\n    'hlsHandlerDestroying': true,\n    'hlsHandlerDestroyed': true\n};\nvar EventHandler = /** @class */ (function () {\n    function EventHandler(hls) {\n        var events = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            events[_i - 1] = arguments[_i];\n        }\n        this.hls = hls;\n        this.onEvent = this.onEvent.bind(this);\n        this.handledEvents = events;\n        this.useGenericHandler = true;\n        this.registerListeners();\n    }\n    EventHandler.prototype.destroy = function () {\n        this.onHandlerDestroying();\n        this.unregisterListeners();\n        this.onHandlerDestroyed();\n    };\n    EventHandler.prototype.onHandlerDestroying = function () { };\n    EventHandler.prototype.onHandlerDestroyed = function () { };\n    EventHandler.prototype.isEventHandler = function () {\n        return typeof this.handledEvents === 'object' && this.handledEvents.length && typeof this.onEvent === 'function';\n    };\n    EventHandler.prototype.registerListeners = function () {\n        if (this.isEventHandler()) {\n            this.handledEvents.forEach(function (event) {\n                if (FORBIDDEN_EVENT_NAMES[event]) {\n                    throw new Error('Forbidden event-name: ' + event);\n                }\n                this.hls.on(event, this.onEvent);\n            }, this);\n        }\n    };\n    EventHandler.prototype.unregisterListeners = function () {\n        if (this.isEventHandler()) {\n            this.handledEvents.forEach(function (event) {\n                this.hls.off(event, this.onEvent);\n            }, this);\n        }\n    };\n    /**\n     * arguments: event (string), data (any)\n     */\n    EventHandler.prototype.onEvent = function (event, data) {\n        this.onEventGeneric(event, data);\n    };\n    EventHandler.prototype.onEventGeneric = function (event, data) {\n        var eventToFunction = function (event, data) {\n            var funcName = 'on' + event.replace('hls', '');\n            if (typeof this[funcName] !== 'function') {\n                throw new Error(\"Event \" + event + \" has no generic handler in this \" + this.constructor.name + \" class (tried \" + funcName + \")\");\n            }\n            return this[funcName].bind(this, data);\n        };\n        try {\n            eventToFunction.call(this, event, data).call();\n        }\n        catch (err) {\n            logger_1.logger.error(\"An internal error happened while handling event \" + event + \". Error message: \\\"\" + err.message + \"\\\". Here is a stacktrace:\", err);\n            this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.OTHER_ERROR, details: errors_1.ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event: event, err: err });\n        }\n    };\n    return EventHandler;\n}());\nexports.default = EventHandler;\n\n\n/***/ }),\n\n/***/ \"./src/events.js\":\n/*!***********************!*\\\n  !*** ./src/events.js ***!\n  \\***********************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @readonly\n * @enum {string}\n */\nvar HlsEvents = {\n    // fired before MediaSource is attaching to media element - data: { media }\n    MEDIA_ATTACHING: 'hlsMediaAttaching',\n    // fired when MediaSource has been succesfully attached to media element - data: { }\n    MEDIA_ATTACHED: 'hlsMediaAttached',\n    // fired before detaching MediaSource from media element - data: { }\n    MEDIA_DETACHING: 'hlsMediaDetaching',\n    // fired when MediaSource has been detached from media element - data: { }\n    MEDIA_DETACHED: 'hlsMediaDetached',\n    // fired when we buffer is going to be reset - data: { }\n    BUFFER_RESET: 'hlsBufferReset',\n    // fired when we know about the codecs that we need buffers for to push into - data: {tracks : { container, codec, levelCodec, initSegment, metadata }}\n    BUFFER_CODECS: 'hlsBufferCodecs',\n    // fired when sourcebuffers have been created - data: { tracks : tracks }\n    BUFFER_CREATED: 'hlsBufferCreated',\n    // fired when we append a segment to the buffer - data: { segment: segment object }\n    BUFFER_APPENDING: 'hlsBufferAppending',\n    // fired when we are done with appending a media segment to the buffer - data : { parent : segment parent that triggered BUFFER_APPENDING, pending : nb of segments waiting for appending for this segment parent}\n    BUFFER_APPENDED: 'hlsBufferAppended',\n    // fired when the stream is finished and we want to notify the media buffer that there will be no more data - data: { }\n    BUFFER_EOS: 'hlsBufferEos',\n    // fired when the media buffer should be flushed - data { startOffset, endOffset }\n    BUFFER_FLUSHING: 'hlsBufferFlushing',\n    // fired when the media buffer has been flushed - data: { }\n    BUFFER_FLUSHED: 'hlsBufferFlushed',\n    // fired to signal that a manifest loading starts - data: { url : manifestURL}\n    MANIFEST_LOADING: 'hlsManifestLoading',\n    // fired after manifest has been loaded - data: { levels : [available quality levels], audioTracks : [ available audio tracks], url : manifestURL, stats : { trequest, tfirst, tload, mtime}}\n    MANIFEST_LOADED: 'hlsManifestLoaded',\n    // fired after manifest has been parsed - data: { levels : [available quality levels], firstLevel : index of first quality level appearing in Manifest}\n    MANIFEST_PARSED: 'hlsManifestParsed',\n    // fired when a level switch is requested - data: { level : id of new level }\n    LEVEL_SWITCHING: 'hlsLevelSwitching',\n    // fired when a level switch is effective - data: { level : id of new level }\n    LEVEL_SWITCHED: 'hlsLevelSwitched',\n    // fired when a level playlist loading starts - data: { url : level URL, level : id of level being loaded}\n    LEVEL_LOADING: 'hlsLevelLoading',\n    // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }\n    LEVEL_LOADED: 'hlsLevelLoaded',\n    // fired when a level's details have been updated based on previous details, after it has been loaded - data: { details : levelDetails object, level : id of updated level }\n    LEVEL_UPDATED: 'hlsLevelUpdated',\n    // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }\n    LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated',\n    // fired to notify that audio track lists has been updated - data: { audioTracks : audioTracks }\n    AUDIO_TRACKS_UPDATED: 'hlsAudioTracksUpdated',\n    // fired when an audio track switching is requested - data: { id : audio track id }\n    AUDIO_TRACK_SWITCHING: 'hlsAudioTrackSwitching',\n    // fired when an audio track switch actually occurs - data: { id : audio track id }\n    AUDIO_TRACK_SWITCHED: 'hlsAudioTrackSwitched',\n    // fired when an audio track loading starts - data: { url : audio track URL, id : audio track id }\n    AUDIO_TRACK_LOADING: 'hlsAudioTrackLoading',\n    // fired when an audio track loading finishes - data: { details : levelDetails object, id : audio track id, stats : { trequest, tfirst, tload, mtime } }\n    AUDIO_TRACK_LOADED: 'hlsAudioTrackLoaded',\n    // fired to notify that subtitle track lists has been updated - data: { subtitleTracks : subtitleTracks }\n    SUBTITLE_TRACKS_UPDATED: 'hlsSubtitleTracksUpdated',\n    // fired when an subtitle track switch occurs - data: { id : subtitle track id }\n    SUBTITLE_TRACK_SWITCH: 'hlsSubtitleTrackSwitch',\n    // fired when a subtitle track loading starts - data: { url : subtitle track URL, id : subtitle track id }\n    SUBTITLE_TRACK_LOADING: 'hlsSubtitleTrackLoading',\n    // fired when a subtitle track loading finishes - data: { details : levelDetails object, id : subtitle track id, stats : { trequest, tfirst, tload, mtime } }\n    SUBTITLE_TRACK_LOADED: 'hlsSubtitleTrackLoaded',\n    // fired when a subtitle fragment has been processed - data: { success : boolean, frag : the processed frag }\n    SUBTITLE_FRAG_PROCESSED: 'hlsSubtitleFragProcessed',\n    // fired when the first timestamp is found - data: { id : demuxer id, initPTS: initPTS, frag : fragment object }\n    INIT_PTS_FOUND: 'hlsInitPtsFound',\n    // fired when a fragment loading starts - data: { frag : fragment object }\n    FRAG_LOADING: 'hlsFragLoading',\n    // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded } }\n    FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',\n    // Identifier for fragment load aborting for emergency switch down - data: { frag : fragment object }\n    FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',\n    // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length } }\n    FRAG_LOADED: 'hlsFragLoaded',\n    // fired when a fragment has finished decrypting - data: { id : demuxer id, frag: fragment object, payload : fragment payload, stats : { tstart, tdecrypt } }\n    FRAG_DECRYPTED: 'hlsFragDecrypted',\n    // fired when Init Segment has been extracted from fragment - data: { id : demuxer id, frag: fragment object, moov : moov MP4 box, codecs : codecs found while parsing fragment }\n    FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',\n    // fired when parsing sei text is completed - data: { id : demuxer id, frag: fragment object, samples : [ sei samples pes ] }\n    FRAG_PARSING_USERDATA: 'hlsFragParsingUserdata',\n    // fired when parsing id3 is completed - data: { id : demuxer id, frag: fragment object, samples : [ id3 samples pes ] }\n    FRAG_PARSING_METADATA: 'hlsFragParsingMetadata',\n    // fired when data have been extracted from fragment - data: { id : demuxer id, frag: fragment object, data1 : moof MP4 box or TS fragments, data2 : mdat MP4 box or null}\n    FRAG_PARSING_DATA: 'hlsFragParsingData',\n    // fired when fragment parsing is completed - data: { id : demuxer id, frag: fragment object }\n    FRAG_PARSED: 'hlsFragParsed',\n    // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { id : demuxer id, frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length, bwEstimate } }\n    FRAG_BUFFERED: 'hlsFragBuffered',\n    // fired when fragment matching with current media position is changing - data : { id : demuxer id, frag : fragment object }\n    FRAG_CHANGED: 'hlsFragChanged',\n    // Identifier for a FPS drop event - data: { curentDropped, currentDecoded, totalDroppedFrames }\n    FPS_DROP: 'hlsFpsDrop',\n    // triggered when FPS drop triggers auto level capping - data: { level, droppedlevel }\n    FPS_DROP_LEVEL_CAPPING: 'hlsFpsDropLevelCapping',\n    // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data }\n    ERROR: 'hlsError',\n    // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example - data: { }\n    DESTROYING: 'hlsDestroying',\n    // fired when a decrypt key loading starts - data: { frag : fragment object }\n    KEY_LOADING: 'hlsKeyLoading',\n    // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length } }\n    KEY_LOADED: 'hlsKeyLoaded',\n    // fired upon stream controller state transitions - data: { previousState, nextState }\n    STREAM_STATE_TRANSITION: 'hlsStreamStateTransition'\n};\nexports.default = HlsEvents;\n\n\n/***/ }),\n\n/***/ \"./src/hls.js\":\n/*!********************!*\\\n  !*** ./src/hls.js ***!\n  \\********************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar URLToolkit = __webpack_require__(/*! url-toolkit */ \"./node_modules/url-toolkit/src/url-toolkit.js\");\nvar errors_1 = __webpack_require__(/*! ./errors */ \"./src/errors.js\");\nvar playlist_loader_1 = __webpack_require__(/*! ./loader/playlist-loader */ \"./src/loader/playlist-loader.js\");\nvar fragment_loader_1 = __webpack_require__(/*! ./loader/fragment-loader */ \"./src/loader/fragment-loader.js\");\nvar key_loader_1 = __webpack_require__(/*! ./loader/key-loader */ \"./src/loader/key-loader.js\");\nvar fragment_tracker_1 = __webpack_require__(/*! ./controller/fragment-tracker */ \"./src/controller/fragment-tracker.js\");\nvar stream_controller_1 = __webpack_require__(/*! ./controller/stream-controller */ \"./src/controller/stream-controller.js\");\nvar level_controller_1 = __webpack_require__(/*! ./controller/level-controller */ \"./src/controller/level-controller.js\");\nvar id3_track_controller_1 = __webpack_require__(/*! ./controller/id3-track-controller */ \"./src/controller/id3-track-controller.js\");\nvar is_supported_1 = __webpack_require__(/*! ./is-supported */ \"./src/is-supported.js\");\nvar logger_1 = __webpack_require__(/*! ./utils/logger */ \"./src/utils/logger.js\");\nvar config_1 = __webpack_require__(/*! ./config */ \"./src/config.js\");\nvar events_1 = __webpack_require__(/*! ./events */ \"./src/events.js\");\nvar observer_1 = __webpack_require__(/*! ./observer */ \"./src/observer.js\");\n/**\n * @module Hls\n * @class\n * @constructor\n */\nvar Hls = /** @class */ (function (_super) {\n    __extends(Hls, _super);\n    /**\n     * Creates an instance of an HLS client that can attach to exactly one `HTMLMediaElement`.\n     *\n     * @constructs Hls\n     * @param {HlsConfig} config\n     */\n    function Hls(config) {\n        if (config === void 0) { config = {}; }\n        var _this = _super.call(this) || this;\n        var defaultConfig = Hls.DefaultConfig;\n        if ((config.liveSyncDurationCount || config.liveMaxLatencyDurationCount) && (config.liveSyncDuration || config.liveMaxLatencyDuration)) {\n            throw new Error('Illegal hls.js config: don\\'t mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration');\n        }\n        for (var prop in defaultConfig) {\n            if (prop in config)\n                continue;\n            config[prop] = defaultConfig[prop];\n        }\n        if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {\n            throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be gt \"liveSyncDurationCount\"');\n        }\n        if (config.liveMaxLatencyDuration !== undefined && (config.liveMaxLatencyDuration <= config.liveSyncDuration || config.liveSyncDuration === undefined)) {\n            throw new Error('Illegal hls.js config: \"liveMaxLatencyDuration\" must be gt \"liveSyncDuration\"');\n        }\n        logger_1.enableLogs(config.debug);\n        _this.config = config;\n        _this._autoLevelCapping = -1;\n        // core controllers and network loaders\n        /**\n         * @member {AbrController} abrController\n         */\n        var abrController = _this.abrController = new config.abrController(_this);\n        var bufferController = new config.bufferController(_this);\n        var capLevelController = new config.capLevelController(_this);\n        var fpsController = new config.fpsController(_this);\n        var playListLoader = new playlist_loader_1.default(_this);\n        var fragmentLoader = new fragment_loader_1.default(_this);\n        var keyLoader = new key_loader_1.default(_this);\n        var id3TrackController = new id3_track_controller_1.default(_this);\n        // network controllers\n        /**\n         * @member {LevelController} levelController\n         */\n        var levelController = _this.levelController = new level_controller_1.default(_this);\n        // FIXME: FragmentTracker must be defined before StreamController because the order of event handling is important\n        var fragmentTracker = new fragment_tracker_1.FragmentTracker(_this);\n        /**\n         * @member {StreamController} streamController\n         */\n        var streamController = _this.streamController = new stream_controller_1.default(_this, fragmentTracker);\n        var networkControllers = [levelController, streamController];\n        // optional audio stream controller\n        /**\n         * @var {ICoreComponent | Controller}\n         */\n        var Controller = config.audioStreamController;\n        if (Controller) {\n            networkControllers.push(new Controller(_this, fragmentTracker));\n        }\n        /**\n         * @member {INetworkController[]} networkControllers\n         */\n        _this.networkControllers = networkControllers;\n        /**\n         * @var {ICoreComponent[]}\n         */\n        var coreComponents = [\n            playListLoader,\n            fragmentLoader,\n            keyLoader,\n            abrController,\n            bufferController,\n            capLevelController,\n            fpsController,\n            id3TrackController,\n            fragmentTracker\n        ];\n        // optional audio track and subtitle controller\n        Controller = config.audioTrackController;\n        if (Controller) {\n            var audioTrackController = new Controller(_this);\n            /**\n             * @member {AudioTrackController} audioTrackController\n             */\n            _this.audioTrackController = audioTrackController;\n            coreComponents.push(audioTrackController);\n        }\n        Controller = config.subtitleTrackController;\n        if (Controller) {\n            var subtitleTrackController = new Controller(_this);\n            /**\n             * @member {SubtitleTrackController} subtitleTrackController\n             */\n            _this.subtitleTrackController = subtitleTrackController;\n            coreComponents.push(subtitleTrackController);\n        }\n        Controller = config.emeController;\n        if (Controller) {\n            var emeController = new Controller(_this);\n            /**\n             * @member {EMEController} emeController\n             */\n            _this.emeController = emeController;\n            coreComponents.push(emeController);\n        }\n        // optional subtitle controllers\n        Controller = config.subtitleStreamController;\n        if (Controller) {\n            coreComponents.push(new Controller(_this, fragmentTracker));\n        }\n        Controller = config.timelineController;\n        if (Controller) {\n            coreComponents.push(new Controller(_this));\n        }\n        /**\n         * @member {ICoreComponent[]}\n         */\n        _this.coreComponents = coreComponents;\n        return _this;\n    }\n    Object.defineProperty(Hls, \"version\", {\n        /**\n         * @type {string}\n         */\n        get: function () {\n            return \"0.12.2\";\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n     * @type {boolean}\n     */\n    Hls.isSupported = function () {\n        return is_supported_1.isSupported();\n    };\n    Object.defineProperty(Hls, \"Events\", {\n        /**\n         * @type {HlsEvents}\n         */\n        get: function () {\n            return events_1.default;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls, \"ErrorTypes\", {\n        /**\n         * @type {HlsErrorTypes}\n         */\n        get: function () {\n            return errors_1.ErrorTypes;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls, \"ErrorDetails\", {\n        /**\n         * @type {HlsErrorDetails}\n         */\n        get: function () {\n            return errors_1.ErrorDetails;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls, \"DefaultConfig\", {\n        /**\n         * @type {HlsConfig}\n         */\n        get: function () {\n            if (!Hls.defaultConfig) {\n                return config_1.hlsDefaultConfig;\n            }\n            return Hls.defaultConfig;\n        },\n        /**\n         * @type {HlsConfig}\n         */\n        set: function (defaultConfig) {\n            Hls.defaultConfig = defaultConfig;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n     * Dispose of the instance\n     */\n    Hls.prototype.destroy = function () {\n        logger_1.logger.log('destroy');\n        this.trigger(events_1.default.DESTROYING);\n        this.detachMedia();\n        this.coreComponents.concat(this.networkControllers).forEach(function (component) {\n            component.destroy();\n        });\n        this.url = null;\n        this.removeAllListeners();\n        this._autoLevelCapping = -1;\n    };\n    /**\n     * Attach a media element\n     * @param {HTMLMediaElement} media\n     */\n    Hls.prototype.attachMedia = function (media) {\n        logger_1.logger.log('attachMedia');\n        this.media = media;\n        this.trigger(events_1.default.MEDIA_ATTACHING, { media: media });\n    };\n    /**\n     * Detach from the media\n     */\n    Hls.prototype.detachMedia = function () {\n        logger_1.logger.log('detachMedia');\n        this.trigger(events_1.default.MEDIA_DETACHING);\n        this.media = null;\n    };\n    /**\n     * Set the source URL. Can be relative or absolute.\n     * @param {string} url\n     */\n    Hls.prototype.loadSource = function (url) {\n        url = URLToolkit.buildAbsoluteURL(window.location.href, url, { alwaysNormalize: true });\n        logger_1.logger.log(\"loadSource:\" + url);\n        this.url = url;\n        // when attaching to a source URL, trigger a playlist load\n        this.trigger(events_1.default.MANIFEST_LOADING, { url: url });\n    };\n    /**\n     * Start loading data from the stream source.\n     * Depending on default config, client starts loading automatically when a source is set.\n     *\n     * @param {number} startPosition Set the start position to stream from\n     * @default -1 None (from earliest point)\n     */\n    Hls.prototype.startLoad = function (startPosition) {\n        if (startPosition === void 0) { startPosition = -1; }\n        logger_1.logger.log(\"startLoad(\" + startPosition + \")\");\n        this.networkControllers.forEach(function (controller) {\n            controller.startLoad(startPosition);\n        });\n    };\n    /**\n     * Stop loading of any stream data.\n     */\n    Hls.prototype.stopLoad = function () {\n        logger_1.logger.log('stopLoad');\n        this.networkControllers.forEach(function (controller) {\n            controller.stopLoad();\n        });\n    };\n    /**\n     * Swap through possible audio codecs in the stream (for example to switch from stereo to 5.1)\n     */\n    Hls.prototype.swapAudioCodec = function () {\n        logger_1.logger.log('swapAudioCodec');\n        this.streamController.swapAudioCodec();\n    };\n    /**\n     * When the media-element fails, this allows to detach and then re-attach it\n     * as one call (convenience method).\n     *\n     * Automatic recovery of media-errors by this process is configurable.\n     */\n    Hls.prototype.recoverMediaError = function () {\n        logger_1.logger.log('recoverMediaError');\n        var media = this.media;\n        this.detachMedia();\n        this.attachMedia(media);\n    };\n    Object.defineProperty(Hls.prototype, \"levels\", {\n        /**\n         * @type {QualityLevel[]}\n         */\n        get: function () {\n            return this.levelController.levels;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"currentLevel\", {\n        /**\n         * Index of quality level currently played\n         * @type {number}\n         */\n        get: function () {\n            return this.streamController.currentLevel;\n        },\n        /**\n         * Set quality level index immediately .\n         * This will flush the current buffer to replace the quality asap.\n         * That means playback will interrupt at least shortly to re-buffer and re-sync eventually.\n         * @type {number} -1 for automatic level selection\n         */\n        set: function (newLevel) {\n            logger_1.logger.log(\"set currentLevel:\" + newLevel);\n            this.loadLevel = newLevel;\n            this.streamController.immediateLevelSwitch();\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"nextLevel\", {\n        /**\n         * Index of next quality level loaded as scheduled by stream controller.\n         * @type {number}\n         */\n        get: function () {\n            return this.streamController.nextLevel;\n        },\n        /**\n         * Set quality level index for next loaded data.\n         * This will switch the video quality asap, without interrupting playback.\n         * May abort current loading of data, and flush parts of buffer (outside currently played fragment region).\n         * @type {number} -1 for automatic level selection\n         */\n        set: function (newLevel) {\n            logger_1.logger.log(\"set nextLevel:\" + newLevel);\n            this.levelController.manualLevel = newLevel;\n            this.streamController.nextLevelSwitch();\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"loadLevel\", {\n        /**\n         * Return the quality level of the currently or last (of none is loaded currently) segment\n         * @type {number}\n         */\n        get: function () {\n            return this.levelController.level;\n        },\n        /**\n         * Set quality level index for next loaded data in a conservative way.\n         * This will switch the quality without flushing, but interrupt current loading.\n         * Thus the moment when the quality switch will appear in effect will only be after the already existing buffer.\n         * @type {number} newLevel -1 for automatic level selection\n         */\n        set: function (newLevel) {\n            logger_1.logger.log(\"set loadLevel:\" + newLevel);\n            this.levelController.manualLevel = newLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"nextLoadLevel\", {\n        /**\n         * get next quality level loaded\n         * @type {number}\n         */\n        get: function () {\n            return this.levelController.nextLoadLevel;\n        },\n        /**\n         * Set quality level of next loaded segment in a fully \"non-destructive\" way.\n         * Same as `loadLevel` but will wait for next switch (until current loading is done).\n         * @type {number} level\n         */\n        set: function (level) {\n            this.levelController.nextLoadLevel = level;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"firstLevel\", {\n        /**\n         * Return \"first level\": like a default level, if not set,\n         * falls back to index of first level referenced in manifest\n         * @type {number}\n         */\n        get: function () {\n            return Math.max(this.levelController.firstLevel, this.minAutoLevel);\n        },\n        /**\n         * Sets \"first-level\", see getter.\n         * @type {number}\n         */\n        set: function (newLevel) {\n            logger_1.logger.log(\"set firstLevel:\" + newLevel);\n            this.levelController.firstLevel = newLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"startLevel\", {\n        /**\n         * Return start level (level of first fragment that will be played back)\n         * if not overrided by user, first level appearing in manifest will be used as start level\n         * if -1 : automatic start level selection, playback will start from level matching download bandwidth\n         * (determined from download of first segment)\n         * @type {number}\n         */\n        get: function () {\n            return this.levelController.startLevel;\n        },\n        /**\n         * set  start level (level of first fragment that will be played back)\n         * if not overrided by user, first level appearing in manifest will be used as start level\n         * if -1 : automatic start level selection, playback will start from level matching download bandwidth\n         * (determined from download of first segment)\n         * @type {number} newLevel\n         */\n        set: function (newLevel) {\n            logger_1.logger.log(\"set startLevel:\" + newLevel);\n            var hls = this;\n            // if not in automatic start level detection, ensure startLevel is greater than minAutoLevel\n            if (newLevel !== -1) {\n                newLevel = Math.max(newLevel, hls.minAutoLevel);\n            }\n            hls.levelController.startLevel = newLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"autoLevelCapping\", {\n        /**\n         * Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)\n         * @type {number}\n         */\n        get: function () {\n            return this._autoLevelCapping;\n        },\n        /**\n         * Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)\n         * @type {number}\n         */\n        set: function (newLevel) {\n            logger_1.logger.log(\"set autoLevelCapping:\" + newLevel);\n            this._autoLevelCapping = newLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"autoLevelEnabled\", {\n        /**\n         * True when automatic level selection enabled\n         * @type {boolean}\n         */\n        get: function () {\n            return (this.levelController.manualLevel === -1);\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"manualLevel\", {\n        /**\n         * Level set manually (if any)\n         * @type {number}\n         */\n        get: function () {\n            return this.levelController.manualLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"minAutoLevel\", {\n        /**\n         * min level selectable in auto mode according to config.minAutoBitrate\n         * @type {number}\n         */\n        get: function () {\n            var hls = this, levels = hls.levels, minAutoBitrate = hls.config.minAutoBitrate, len = levels ? levels.length : 0;\n            for (var i = 0; i < len; i++) {\n                var levelNextBitrate = levels[i].realBitrate ? Math.max(levels[i].realBitrate, levels[i].bitrate) : levels[i].bitrate;\n                if (levelNextBitrate > minAutoBitrate) {\n                    return i;\n                }\n            }\n            return 0;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"maxAutoLevel\", {\n        /**\n         * max level selectable in auto mode according to autoLevelCapping\n         * @type {number}\n         */\n        get: function () {\n            var hls = this;\n            var levels = hls.levels;\n            var autoLevelCapping = hls.autoLevelCapping;\n            var maxAutoLevel;\n            if (autoLevelCapping === -1 && levels && levels.length) {\n                maxAutoLevel = levels.length - 1;\n            }\n            else {\n                maxAutoLevel = autoLevelCapping;\n            }\n            return maxAutoLevel;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"nextAutoLevel\", {\n        /**\n         * next automatically selected quality level\n         * @type {number}\n         */\n        get: function () {\n            var hls = this;\n            // ensure next auto level is between  min and max auto level\n            return Math.min(Math.max(hls.abrController.nextAutoLevel, hls.minAutoLevel), hls.maxAutoLevel);\n        },\n        /**\n         * this setter is used to force next auto level.\n         * this is useful to force a switch down in auto mode:\n         * in case of load error on level N, hls.js can set nextAutoLevel to N-1 for example)\n         * forced value is valid for one fragment. upon succesful frag loading at forced level,\n         * this value will be resetted to -1 by ABR controller.\n         * @type {number}\n         */\n        set: function (nextLevel) {\n            var hls = this;\n            hls.abrController.nextAutoLevel = Math.max(hls.minAutoLevel, nextLevel);\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"audioTracks\", {\n        /**\n         * @type {AudioTrack[]}\n         */\n        get: function () {\n            var audioTrackController = this.audioTrackController;\n            return audioTrackController ? audioTrackController.audioTracks : [];\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"audioTrack\", {\n        /**\n         * index of the selected audio track (index in audio track lists)\n         * @type {number}\n         */\n        get: function () {\n            var audioTrackController = this.audioTrackController;\n            return audioTrackController ? audioTrackController.audioTrack : -1;\n        },\n        /**\n         * selects an audio track, based on its index in audio track lists\n         * @type {number}\n         */\n        set: function (audioTrackId) {\n            var audioTrackController = this.audioTrackController;\n            if (audioTrackController) {\n                audioTrackController.audioTrack = audioTrackId;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"liveSyncPosition\", {\n        /**\n         * @type {Seconds}\n         */\n        get: function () {\n            return this.streamController.liveSyncPosition;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"subtitleTracks\", {\n        /**\n         * get alternate subtitle tracks list from playlist\n         * @type {SubtitleTrack[]}\n         */\n        get: function () {\n            var subtitleTrackController = this.subtitleTrackController;\n            return subtitleTrackController ? subtitleTrackController.subtitleTracks : [];\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"subtitleTrack\", {\n        /**\n         * index of the selected subtitle track (index in subtitle track lists)\n         * @type {number}\n         */\n        get: function () {\n            var subtitleTrackController = this.subtitleTrackController;\n            return subtitleTrackController ? subtitleTrackController.subtitleTrack : -1;\n        },\n        /**\n         * select an subtitle track, based on its index in subtitle track lists\n         * @type{number}\n         */\n        set: function (subtitleTrackId) {\n            var subtitleTrackController = this.subtitleTrackController;\n            if (subtitleTrackController) {\n                subtitleTrackController.subtitleTrack = subtitleTrackId;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Hls.prototype, \"subtitleDisplay\", {\n        /**\n         * @type {boolean}\n         */\n        get: function () {\n            var subtitleTrackController = this.subtitleTrackController;\n            return subtitleTrackController ? subtitleTrackController.subtitleDisplay : false;\n        },\n        /**\n         * Enable/disable subtitle display rendering\n         * @type {boolean}\n         */\n        set: function (value) {\n            var subtitleTrackController = this.subtitleTrackController;\n            if (subtitleTrackController) {\n                subtitleTrackController.subtitleDisplay = value;\n            }\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return Hls;\n}(observer_1.Observer));\nexports.default = Hls;\n\n\n/***/ }),\n\n/***/ \"./src/is-supported.js\":\n/*!*****************************!*\\\n  !*** ./src/is-supported.js ***!\n  \\*****************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mediasource_helper_1 = __webpack_require__(/*! ./utils/mediasource-helper */ \"./src/utils/mediasource-helper.js\");\nfunction isSupported() {\n    var mediaSource = mediasource_helper_1.getMediaSource();\n    var sourceBuffer = window.SourceBuffer || window.WebKitSourceBuffer;\n    var isTypeSupported = mediaSource &&\n        typeof mediaSource.isTypeSupported === 'function' &&\n        mediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"');\n    // if SourceBuffer is exposed ensure its API is valid\n    // safari and old version of Chrome doe not expose SourceBuffer globally so checking SourceBuffer.prototype is impossible\n    var sourceBufferValidAPI = !sourceBuffer ||\n        (sourceBuffer.prototype &&\n            typeof sourceBuffer.prototype.appendBuffer === 'function' &&\n            typeof sourceBuffer.prototype.remove === 'function');\n    return !!isTypeSupported && !!sourceBufferValidAPI;\n}\nexports.isSupported = isSupported;\n\n\n/***/ }),\n\n/***/ \"./src/loader/fragment-loader.js\":\n/*!***************************************!*\\\n  !*** ./src/loader/fragment-loader.js ***!\n  \\***************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/*\n * Fragment Loader\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar FragmentLoader = /** @class */ (function (_super) {\n    __extends(FragmentLoader, _super);\n    function FragmentLoader(hls) {\n        var _this = _super.call(this, hls, events_1.default.FRAG_LOADING) || this;\n        _this.loaders = {};\n        return _this;\n    }\n    FragmentLoader.prototype.destroy = function () {\n        var loaders = this.loaders;\n        for (var loaderName in loaders) {\n            var loader = loaders[loaderName];\n            if (loader) {\n                loader.destroy();\n            }\n        }\n        this.loaders = {};\n        _super.prototype.destroy.call(this);\n    };\n    FragmentLoader.prototype.onFragLoading = function (data) {\n        var frag = data.frag, type = frag.type, loaders = this.loaders, config = this.hls.config, FragmentILoader = config.fLoader, DefaultILoader = config.loader;\n        // reset fragment state\n        frag.loaded = 0;\n        var loader = loaders[type];\n        if (loader) {\n            logger_1.logger.warn(\"abort previous fragment loader for type: \" + type);\n            loader.abort();\n        }\n        loader = loaders[type] = frag.loader =\n            config.fLoader ? new FragmentILoader(config) : new DefaultILoader(config);\n        var loaderContext, loaderConfig, loaderCallbacks;\n        loaderContext = { url: frag.url, frag: frag, responseType: 'arraybuffer', progressData: false };\n        var start = frag.byteRangeStartOffset, end = frag.byteRangeEndOffset;\n        if (Number.isFinite(start) && Number.isFinite(end)) {\n            loaderContext.rangeStart = start;\n            loaderContext.rangeEnd = end;\n        }\n        loaderConfig = {\n            timeout: config.fragLoadingTimeOut,\n            maxRetry: 0,\n            retryDelay: 0,\n            maxRetryDelay: config.fragLoadingMaxRetryTimeout\n        };\n        loaderCallbacks = {\n            onSuccess: this.loadsuccess.bind(this),\n            onError: this.loaderror.bind(this),\n            onTimeout: this.loadtimeout.bind(this),\n            onProgress: this.loadprogress.bind(this)\n        };\n        loader.load(loaderContext, loaderConfig, loaderCallbacks);\n    };\n    FragmentLoader.prototype.loadsuccess = function (response, stats, context, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        var payload = response.data, frag = context.frag;\n        // detach fragment loader on load success\n        frag.loader = undefined;\n        this.loaders[frag.type] = undefined;\n        this.hls.trigger(events_1.default.FRAG_LOADED, { payload: payload, frag: frag, stats: stats, networkDetails: networkDetails });\n    };\n    FragmentLoader.prototype.loaderror = function (response, context, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        var frag = context.frag;\n        var loader = frag.loader;\n        if (loader) {\n            loader.abort();\n        }\n        this.loaders[frag.type] = undefined;\n        this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.NETWORK_ERROR, details: errors_1.ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: context.frag, response: response, networkDetails: networkDetails });\n    };\n    FragmentLoader.prototype.loadtimeout = function (stats, context, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        var frag = context.frag;\n        var loader = frag.loader;\n        if (loader) {\n            loader.abort();\n        }\n        this.loaders[frag.type] = undefined;\n        this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.NETWORK_ERROR, details: errors_1.ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: context.frag, networkDetails: networkDetails });\n    };\n    // data will be used for progressive parsing\n    FragmentLoader.prototype.loadprogress = function (stats, context, data, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        var frag = context.frag;\n        frag.loaded = stats.loaded;\n        this.hls.trigger(events_1.default.FRAG_LOAD_PROGRESS, { frag: frag, stats: stats, networkDetails: networkDetails });\n    };\n    return FragmentLoader;\n}(event_handler_1.default));\nexports.default = FragmentLoader;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/loader/fragment.js\":\n/*!********************************!*\\\n  !*** ./src/loader/fragment.js ***!\n  \\********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar URLToolkit = __webpack_require__(/*! url-toolkit */ \"./node_modules/url-toolkit/src/url-toolkit.js\");\nvar level_key_1 = __webpack_require__(/*! ./level-key */ \"./src/loader/level-key.js\");\nvar Fragment = /** @class */ (function () {\n    function Fragment() {\n        var _a;\n        this._url = null;\n        this._byteRange = null;\n        this._decryptdata = null;\n        this.tagList = [];\n        this.programDateTime = null;\n        this.rawProgramDateTime = null;\n        // Holds the types of data this fragment supports\n        this._elementaryStreams = (_a = {},\n            _a[Fragment.ElementaryStreamTypes.AUDIO] = false,\n            _a[Fragment.ElementaryStreamTypes.VIDEO] = false,\n            _a);\n    }\n    Object.defineProperty(Fragment, \"ElementaryStreamTypes\", {\n        /**\n         * `type` property for this._elementaryStreams\n         *\n         * @enum\n         */\n        get: function () {\n            return {\n                AUDIO: 'audio',\n                VIDEO: 'video'\n            };\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"url\", {\n        get: function () {\n            if (!this._url && this.relurl) {\n                this._url = URLToolkit.buildAbsoluteURL(this.baseurl, this.relurl, { alwaysNormalize: true });\n            }\n            return this._url;\n        },\n        set: function (value) {\n            this._url = value;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"byteRange\", {\n        get: function () {\n            if (!this._byteRange && !this.rawByteRange) {\n                return [];\n            }\n            if (this._byteRange) {\n                return this._byteRange;\n            }\n            var byteRange = [];\n            if (this.rawByteRange) {\n                var params = this.rawByteRange.split('@', 2);\n                if (params.length === 1) {\n                    var lastByteRangeEndOffset = this.lastByteRangeEndOffset;\n                    byteRange[0] = lastByteRangeEndOffset || 0;\n                }\n                else {\n                    byteRange[0] = parseInt(params[1]);\n                }\n                byteRange[1] = parseInt(params[0]) + byteRange[0];\n                this._byteRange = byteRange;\n            }\n            return byteRange;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"byteRangeStartOffset\", {\n        /**\n         * @type {number}\n         */\n        get: function () {\n            return this.byteRange[0];\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"byteRangeEndOffset\", {\n        get: function () {\n            return this.byteRange[1];\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"decryptdata\", {\n        get: function () {\n            if (!this._decryptdata) {\n                this._decryptdata = this.fragmentDecryptdataFromLevelkey(this.levelkey, this.sn);\n            }\n            return this._decryptdata;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"endProgramDateTime\", {\n        get: function () {\n            if (!Number.isFinite(this.programDateTime)) {\n                return null;\n            }\n            var duration = !Number.isFinite(this.duration) ? 0 : this.duration;\n            return this.programDateTime + (duration * 1000);\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(Fragment.prototype, \"encrypted\", {\n        get: function () {\n            return !!((this.decryptdata && this.decryptdata.uri !== null) && (this.decryptdata.key === null));\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n     * @param {ElementaryStreamType} type\n     */\n    Fragment.prototype.addElementaryStream = function (type) {\n        this._elementaryStreams[type] = true;\n    };\n    /**\n     * @param {ElementaryStreamType} type\n     */\n    Fragment.prototype.hasElementaryStream = function (type) {\n        return this._elementaryStreams[type] === true;\n    };\n    /**\n     * Utility method for parseLevelPlaylist to create an initialization vector for a given segment\n     * @returns {Uint8Array}\n     */\n    Fragment.prototype.createInitializationVector = function (segmentNumber) {\n        var uint8View = new Uint8Array(16);\n        for (var i = 12; i < 16; i++) {\n            uint8View[i] = (segmentNumber >> 8 * (15 - i)) & 0xff;\n        }\n        return uint8View;\n    };\n    /**\n     * Utility method for parseLevelPlaylist to get a fragment's decryption data from the currently parsed encryption key data\n     * @param levelkey - a playlist's encryption info\n     * @param segmentNumber - the fragment's segment number\n     * @returns {*} - an object to be applied as a fragment's decryptdata\n     */\n    Fragment.prototype.fragmentDecryptdataFromLevelkey = function (levelkey, segmentNumber) {\n        var decryptdata = levelkey;\n        if (levelkey && levelkey.method && levelkey.uri && !levelkey.iv) {\n            decryptdata = new level_key_1.default();\n            decryptdata.method = levelkey.method;\n            decryptdata.baseuri = levelkey.baseuri;\n            decryptdata.reluri = levelkey.reluri;\n            decryptdata.iv = this.createInitializationVector(segmentNumber);\n        }\n        return decryptdata;\n    };\n    return Fragment;\n}());\nexports.default = Fragment;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/loader/key-loader.js\":\n/*!**********************************!*\\\n  !*** ./src/loader/key-loader.js ***!\n  \\**********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * Decrypt key Loader\n*/\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar KeyLoader = /** @class */ (function (_super) {\n    __extends(KeyLoader, _super);\n    function KeyLoader(hls) {\n        var _this = _super.call(this, hls, events_1.default.KEY_LOADING) || this;\n        _this.loaders = {};\n        _this.decryptkey = null;\n        _this.decrypturl = null;\n        return _this;\n    }\n    KeyLoader.prototype.destroy = function () {\n        for (var loaderName in this.loaders) {\n            var loader = this.loaders[loaderName];\n            if (loader) {\n                loader.destroy();\n            }\n        }\n        this.loaders = {};\n        event_handler_1.default.prototype.destroy.call(this);\n    };\n    KeyLoader.prototype.onKeyLoading = function (data) {\n        var frag = data.frag, type = frag.type, loader = this.loaders[type], decryptdata = frag.decryptdata, uri = decryptdata.uri;\n        // if uri is different from previous one or if decrypt key not retrieved yet\n        if (uri !== this.decrypturl || this.decryptkey === null) {\n            var config = this.hls.config;\n            if (loader) {\n                logger_1.logger.warn(\"abort previous key loader for type:\" + type);\n                loader.abort();\n            }\n            frag.loader = this.loaders[type] = new config.loader(config);\n            this.decrypturl = uri;\n            this.decryptkey = null;\n            var loaderContext = void 0, loaderConfig = void 0, loaderCallbacks = void 0;\n            loaderContext = { url: uri, frag: frag, responseType: 'arraybuffer' };\n            // maxRetry is 0 so that instead of retrying the same key on the same variant multiple times,\n            // key-loader will trigger an error and rely on stream-controller to handle retry logic.\n            // this will also align retry logic with fragment-loader\n            loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: 0, retryDelay: config.fragLoadingRetryDelay, maxRetryDelay: config.fragLoadingMaxRetryTimeout };\n            loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };\n            frag.loader.load(loaderContext, loaderConfig, loaderCallbacks);\n        }\n        else if (this.decryptkey) {\n            // we already loaded this key, return it\n            decryptdata.key = this.decryptkey;\n            this.hls.trigger(events_1.default.KEY_LOADED, { frag: frag });\n        }\n    };\n    KeyLoader.prototype.loadsuccess = function (response, stats, context) {\n        var frag = context.frag;\n        this.decryptkey = frag.decryptdata.key = new Uint8Array(response.data);\n        // detach fragment loader on load success\n        frag.loader = undefined;\n        this.loaders[frag.type] = undefined;\n        this.hls.trigger(events_1.default.KEY_LOADED, { frag: frag });\n    };\n    KeyLoader.prototype.loaderror = function (response, context) {\n        var frag = context.frag, loader = frag.loader;\n        if (loader) {\n            loader.abort();\n        }\n        this.loaders[context.type] = undefined;\n        this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.NETWORK_ERROR, details: errors_1.ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag: frag, response: response });\n    };\n    KeyLoader.prototype.loadtimeout = function (stats, context) {\n        var frag = context.frag, loader = frag.loader;\n        if (loader) {\n            loader.abort();\n        }\n        this.loaders[context.type] = undefined;\n        this.hls.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.NETWORK_ERROR, details: errors_1.ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag: frag });\n    };\n    return KeyLoader;\n}(event_handler_1.default));\nexports.default = KeyLoader;\n\n\n/***/ }),\n\n/***/ \"./src/loader/level-key.js\":\n/*!*********************************!*\\\n  !*** ./src/loader/level-key.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar URLToolkit = __webpack_require__(/*! url-toolkit */ \"./node_modules/url-toolkit/src/url-toolkit.js\");\nvar LevelKey = /** @class */ (function () {\n    function LevelKey() {\n        this.method = null;\n        this.key = null;\n        this.iv = null;\n        this._uri = null;\n    }\n    Object.defineProperty(LevelKey.prototype, \"uri\", {\n        get: function () {\n            if (!this._uri && this.reluri) {\n                this._uri = URLToolkit.buildAbsoluteURL(this.baseuri, this.reluri, { alwaysNormalize: true });\n            }\n            return this._uri;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return LevelKey;\n}());\nexports.default = LevelKey;\n\n\n/***/ }),\n\n/***/ \"./src/loader/level.js\":\n/*!*****************************!*\\\n  !*** ./src/loader/level.js ***!\n  \\*****************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Level = /** @class */ (function () {\n    function Level(baseUrl) {\n        // Please keep properties in alphabetical order\n        this.endCC = 0;\n        this.endSN = 0;\n        this.fragments = [];\n        this.initSegment = null;\n        this.live = true;\n        this.needSidxRanges = false;\n        this.startCC = 0;\n        this.startSN = 0;\n        this.startTimeOffset = null;\n        this.targetduration = 0;\n        this.totalduration = 0;\n        this.type = null;\n        this.url = baseUrl;\n        this.version = null;\n    }\n    Object.defineProperty(Level.prototype, \"hasProgramDateTime\", {\n        get: function () {\n            return !!(this.fragments[0] && Number.isFinite(this.fragments[0].programDateTime));\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return Level;\n}());\nexports.default = Level;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/loader/m3u8-parser.js\":\n/*!***********************************!*\\\n  !*** ./src/loader/m3u8-parser.js ***!\n  \\***********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar URLToolkit = __webpack_require__(/*! url-toolkit */ \"./node_modules/url-toolkit/src/url-toolkit.js\");\nvar fragment_1 = __webpack_require__(/*! ./fragment */ \"./src/loader/fragment.js\");\nvar level_1 = __webpack_require__(/*! ./level */ \"./src/loader/level.js\");\nvar level_key_1 = __webpack_require__(/*! ./level-key */ \"./src/loader/level-key.js\");\nvar attr_list_1 = __webpack_require__(/*! ../utils/attr-list */ \"./src/utils/attr-list.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar codecs_1 = __webpack_require__(/*! ../utils/codecs */ \"./src/utils/codecs.js\");\n/**\n * M3U8 parser\n * @module\n */\n// https://regex101.com is your friend\nvar MASTER_PLAYLIST_REGEX = /#EXT-X-STREAM-INF:([^\\n\\r]*)[\\r\\n]+([^\\r\\n]+)/g;\nvar MASTER_PLAYLIST_MEDIA_REGEX = /#EXT-X-MEDIA:(.*)/g;\nvar LEVEL_PLAYLIST_REGEX_FAST = new RegExp([\n    /#EXTINF:\\s*(\\d*(?:\\.\\d+)?)(?:,(.*)\\s+)?/.source,\n    /|(?!#)([\\S+ ?]+)/.source,\n    /|#EXT-X-BYTERANGE:*(.+)/.source,\n    /|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,\n    /|#.*/.source // All other non-segment oriented tags will match with all groups empty\n].join(''), 'g');\nvar LEVEL_PLAYLIST_REGEX_SLOW = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\\d+))|(?:#EXT-X-(TARGETDURATION): *(\\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\\r?\\n?/;\nvar MP4_REGEX_SUFFIX = /\\.(mp4|m4s|m4v|m4a)$/i;\nvar M3U8Parser = /** @class */ (function () {\n    function M3U8Parser() {\n    }\n    M3U8Parser.findGroup = function (groups, mediaGroupId) {\n        if (!groups) {\n            return null;\n        }\n        var matchingGroup = null;\n        for (var i = 0; i < groups.length; i++) {\n            var group = groups[i];\n            if (group.id === mediaGroupId) {\n                matchingGroup = group;\n            }\n        }\n        return matchingGroup;\n    };\n    M3U8Parser.convertAVC1ToAVCOTI = function (codec) {\n        var result, avcdata = codec.split('.');\n        if (avcdata.length > 2) {\n            result = avcdata.shift() + '.';\n            result += parseInt(avcdata.shift()).toString(16);\n            result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);\n        }\n        else {\n            result = codec;\n        }\n        return result;\n    };\n    M3U8Parser.resolve = function (url, baseUrl) {\n        return URLToolkit.buildAbsoluteURL(baseUrl, url, { alwaysNormalize: true });\n    };\n    M3U8Parser.parseMasterPlaylist = function (string, baseurl) {\n        var levels = [], result;\n        MASTER_PLAYLIST_REGEX.lastIndex = 0;\n        function setCodecs(codecs, level) {\n            ['video', 'audio'].forEach(function (type) {\n                var filtered = codecs.filter(function (codec) { return codecs_1.isCodecType(codec, type); });\n                if (filtered.length) {\n                    var preferred = filtered.filter(function (codec) {\n                        return codec.lastIndexOf('avc1', 0) === 0 || codec.lastIndexOf('mp4a', 0) === 0;\n                    });\n                    level[type + \"Codec\"] = preferred.length > 0 ? preferred[0] : filtered[0];\n                    // remove from list\n                    codecs = codecs.filter(function (codec) { return filtered.indexOf(codec) === -1; });\n                }\n            });\n            level.unknownCodecs = codecs;\n        }\n        while ((result = MASTER_PLAYLIST_REGEX.exec(string)) != null) {\n            var level = {};\n            var attrs = level.attrs = new attr_list_1.default(result[1]);\n            level.url = M3U8Parser.resolve(result[2], baseurl);\n            var resolution = attrs.decimalResolution('RESOLUTION');\n            if (resolution) {\n                level.width = resolution.width;\n                level.height = resolution.height;\n            }\n            level.bitrate = attrs.decimalInteger('AVERAGE-BANDWIDTH') || attrs.decimalInteger('BANDWIDTH');\n            level.name = attrs.NAME;\n            setCodecs([].concat((attrs.CODECS || '').split(/[ ,]+/)), level);\n            if (level.videoCodec && level.videoCodec.indexOf('avc1') !== -1) {\n                level.videoCodec = M3U8Parser.convertAVC1ToAVCOTI(level.videoCodec);\n            }\n            levels.push(level);\n        }\n        return levels;\n    };\n    M3U8Parser.parseMasterPlaylistMedia = function (string, baseurl, type, audioGroups) {\n        if (audioGroups === void 0) { audioGroups = []; }\n        var result;\n        var medias = [];\n        var id = 0;\n        MASTER_PLAYLIST_MEDIA_REGEX.lastIndex = 0;\n        while ((result = MASTER_PLAYLIST_MEDIA_REGEX.exec(string)) !== null) {\n            var media = {};\n            var attrs = new attr_list_1.default(result[1]);\n            if (attrs.TYPE === type) {\n                media.groupId = attrs['GROUP-ID'];\n                media.name = attrs.NAME;\n                media.type = type;\n                media.default = (attrs.DEFAULT === 'YES');\n                media.autoselect = (attrs.AUTOSELECT === 'YES');\n                media.forced = (attrs.FORCED === 'YES');\n                if (attrs.URI) {\n                    media.url = M3U8Parser.resolve(attrs.URI, baseurl);\n                }\n                media.lang = attrs.LANGUAGE;\n                if (!media.name) {\n                    media.name = media.lang;\n                }\n                if (audioGroups.length) {\n                    var groupCodec = M3U8Parser.findGroup(audioGroups, media.groupId);\n                    media.audioCodec = groupCodec ? groupCodec.codec : audioGroups[0].codec;\n                }\n                media.id = id++;\n                medias.push(media);\n            }\n        }\n        return medias;\n    };\n    M3U8Parser.parseLevelPlaylist = function (string, baseurl, id, type, levelUrlId) {\n        var currentSN = 0;\n        var totalduration = 0;\n        var level = new level_1.default(baseurl);\n        var levelkey = new level_key_1.default();\n        var cc = 0;\n        var prevFrag = null;\n        var frag = new fragment_1.default();\n        var result;\n        var i;\n        var firstPdtIndex = null;\n        LEVEL_PLAYLIST_REGEX_FAST.lastIndex = 0;\n        while ((result = LEVEL_PLAYLIST_REGEX_FAST.exec(string)) !== null) {\n            var duration = result[1];\n            if (duration) { // INF\n                frag.duration = parseFloat(duration);\n                // avoid sliced strings    https://github.com/video-dev/hls.js/issues/939\n                var title = (' ' + result[2]).slice(1);\n                frag.title = title || null;\n                frag.tagList.push(title ? ['INF', duration, title] : ['INF', duration]);\n            }\n            else if (result[3]) { // url\n                if (Number.isFinite(frag.duration)) {\n                    var sn = currentSN++;\n                    frag.type = type;\n                    frag.start = totalduration;\n                    frag.levelkey = levelkey;\n                    frag.sn = sn;\n                    frag.level = id;\n                    frag.cc = cc;\n                    frag.urlId = levelUrlId;\n                    frag.baseurl = baseurl;\n                    // avoid sliced strings    https://github.com/video-dev/hls.js/issues/939\n                    frag.relurl = (' ' + result[3]).slice(1);\n                    assignProgramDateTime(frag, prevFrag);\n                    level.fragments.push(frag);\n                    prevFrag = frag;\n                    totalduration += frag.duration;\n                    frag = new fragment_1.default();\n                }\n            }\n            else if (result[4]) { // X-BYTERANGE\n                frag.rawByteRange = (' ' + result[4]).slice(1);\n                if (prevFrag) {\n                    var lastByteRangeEndOffset = prevFrag.byteRangeEndOffset;\n                    if (lastByteRangeEndOffset) {\n                        frag.lastByteRangeEndOffset = lastByteRangeEndOffset;\n                    }\n                }\n            }\n            else if (result[5]) { // PROGRAM-DATE-TIME\n                // avoid sliced strings    https://github.com/video-dev/hls.js/issues/939\n                frag.rawProgramDateTime = (' ' + result[5]).slice(1);\n                frag.tagList.push(['PROGRAM-DATE-TIME', frag.rawProgramDateTime]);\n                if (firstPdtIndex === null) {\n                    firstPdtIndex = level.fragments.length;\n                }\n            }\n            else {\n                result = result[0].match(LEVEL_PLAYLIST_REGEX_SLOW);\n                for (i = 1; i < result.length; i++) {\n                    if (result[i] !== undefined) {\n                        break;\n                    }\n                }\n                // avoid sliced strings    https://github.com/video-dev/hls.js/issues/939\n                var value1 = (' ' + result[i + 1]).slice(1);\n                var value2 = (' ' + result[i + 2]).slice(1);\n                switch (result[i]) {\n                    case '#':\n                        frag.tagList.push(value2 ? [value1, value2] : [value1]);\n                        break;\n                    case 'PLAYLIST-TYPE':\n                        level.type = value1.toUpperCase();\n                        break;\n                    case 'MEDIA-SEQUENCE':\n                        currentSN = level.startSN = parseInt(value1);\n                        break;\n                    case 'TARGETDURATION':\n                        level.targetduration = parseFloat(value1);\n                        break;\n                    case 'VERSION':\n                        level.version = parseInt(value1);\n                        break;\n                    case 'EXTM3U':\n                        break;\n                    case 'ENDLIST':\n                        level.live = false;\n                        break;\n                    case 'DIS':\n                        cc++;\n                        frag.tagList.push(['DIS']);\n                        break;\n                    case 'DISCONTINUITY-SEQ':\n                        cc = parseInt(value1);\n                        break;\n                    case 'KEY':\n                        // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4\n                        var decryptparams = value1;\n                        var keyAttrs = new attr_list_1.default(decryptparams);\n                        var decryptmethod = keyAttrs.enumeratedString('METHOD'), decrypturi = keyAttrs.URI, decryptiv = keyAttrs.hexadecimalInteger('IV');\n                        if (decryptmethod) {\n                            levelkey = new level_key_1.default();\n                            if ((decrypturi) && (['AES-128', 'SAMPLE-AES', 'SAMPLE-AES-CENC'].indexOf(decryptmethod) >= 0)) {\n                                levelkey.method = decryptmethod;\n                                // URI to get the key\n                                levelkey.baseuri = baseurl;\n                                levelkey.reluri = decrypturi;\n                                levelkey.key = null;\n                                // Initialization Vector (IV)\n                                levelkey.iv = decryptiv;\n                            }\n                        }\n                        break;\n                    case 'START':\n                        var startParams = value1;\n                        var startAttrs = new attr_list_1.default(startParams);\n                        var startTimeOffset = startAttrs.decimalFloatingPoint('TIME-OFFSET');\n                        // TIME-OFFSET can be 0\n                        if (Number.isFinite(startTimeOffset)) {\n                            level.startTimeOffset = startTimeOffset;\n                        }\n                        break;\n                    case 'MAP':\n                        var mapAttrs = new attr_list_1.default(value1);\n                        frag.relurl = mapAttrs.URI;\n                        frag.rawByteRange = mapAttrs.BYTERANGE;\n                        frag.baseurl = baseurl;\n                        frag.level = id;\n                        frag.type = type;\n                        frag.sn = 'initSegment';\n                        level.initSegment = frag;\n                        frag = new fragment_1.default();\n                        frag.rawProgramDateTime = level.initSegment.rawProgramDateTime;\n                        break;\n                    default:\n                        logger_1.logger.warn(\"line parsed but not handled: \" + result);\n                        break;\n                }\n            }\n        }\n        frag = prevFrag;\n        // logger.log('found ' + level.fragments.length + ' fragments');\n        if (frag && !frag.relurl) {\n            level.fragments.pop();\n            totalduration -= frag.duration;\n        }\n        level.totalduration = totalduration;\n        level.averagetargetduration = totalduration / level.fragments.length;\n        level.endSN = currentSN - 1;\n        level.startCC = level.fragments[0] ? level.fragments[0].cc : 0;\n        level.endCC = cc;\n        if (!level.initSegment && level.fragments.length) {\n            // this is a bit lurky but HLS really has no other way to tell us\n            // if the fragments are TS or MP4, except if we download them :/\n            // but this is to be able to handle SIDX.\n            if (level.fragments.every(function (frag) { return MP4_REGEX_SUFFIX.test(frag.relurl); })) {\n                logger_1.logger.warn('MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX');\n                frag = new fragment_1.default();\n                frag.relurl = level.fragments[0].relurl;\n                frag.baseurl = baseurl;\n                frag.level = id;\n                frag.type = type;\n                frag.sn = 'initSegment';\n                level.initSegment = frag;\n                level.needSidxRanges = true;\n            }\n        }\n        /**\n         * Backfill any missing PDT values\n           \"If the first EXT-X-PROGRAM-DATE-TIME tag in a Playlist appears after\n           one or more Media Segment URIs, the client SHOULD extrapolate\n           backward from that tag (using EXTINF durations and/or media\n           timestamps) to associate dates with those segments.\"\n         * We have already extrapolated forward, but all fragments up to the first instance of PDT do not have their PDTs\n         * computed.\n         */\n        if (firstPdtIndex) {\n            backfillProgramDateTimes(level.fragments, firstPdtIndex);\n        }\n        return level;\n    };\n    return M3U8Parser;\n}());\nexports.default = M3U8Parser;\nfunction backfillProgramDateTimes(fragments, startIndex) {\n    var fragPrev = fragments[startIndex];\n    for (var i = startIndex - 1; i >= 0; i--) {\n        var frag = fragments[i];\n        frag.programDateTime = fragPrev.programDateTime - (frag.duration * 1000);\n        fragPrev = frag;\n    }\n}\nfunction assignProgramDateTime(frag, prevFrag) {\n    if (frag.rawProgramDateTime) {\n        frag.programDateTime = Date.parse(frag.rawProgramDateTime);\n    }\n    else if (prevFrag && prevFrag.programDateTime) {\n        frag.programDateTime = prevFrag.endProgramDateTime;\n    }\n    if (!Number.isFinite(frag.programDateTime)) {\n        frag.programDateTime = null;\n        frag.rawProgramDateTime = null;\n    }\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/loader/playlist-loader.js\":\n/*!***************************************!*\\\n  !*** ./src/loader/playlist-loader.js ***!\n  \\***************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\n/**\n * PlaylistLoader - delegate for media manifest/playlist loading tasks. Takes care of parsing media to internal data-models.\n *\n * Once loaded, dispatches events with parsed data-models of manifest/levels/audio/subtitle tracks.\n *\n * Uses loader(s) set in config to do actual internal loading of resource tasks.\n *\n * @module\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar event_handler_1 = __webpack_require__(/*! ../event-handler */ \"./src/event-handler.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar mp4demuxer_1 = __webpack_require__(/*! ../demux/mp4demuxer */ \"./src/demux/mp4demuxer.js\");\nvar m3u8_parser_1 = __webpack_require__(/*! ./m3u8-parser */ \"./src/loader/m3u8-parser.js\");\nvar performance = window.performance;\n/**\n * `type` property values for this loaders' context object\n * @enum\n *\n */\nvar ContextType = {\n    MANIFEST: 'manifest',\n    LEVEL: 'level',\n    AUDIO_TRACK: 'audioTrack',\n    SUBTITLE_TRACK: 'subtitleTrack'\n};\n/**\n * @enum {string}\n */\nvar LevelType = {\n    MAIN: 'main',\n    AUDIO: 'audio',\n    SUBTITLE: 'subtitle'\n};\n/**\n * @constructor\n */\nvar PlaylistLoader = /** @class */ (function (_super) {\n    __extends(PlaylistLoader, _super);\n    /**\n     * @constructs\n     * @param {Hls} hls\n     */\n    function PlaylistLoader(hls) {\n        var _this = _super.call(this, hls, events_1.default.MANIFEST_LOADING, events_1.default.LEVEL_LOADING, events_1.default.AUDIO_TRACK_LOADING, events_1.default.SUBTITLE_TRACK_LOADING) || this;\n        _this.loaders = {};\n        return _this;\n    }\n    Object.defineProperty(PlaylistLoader, \"ContextType\", {\n        get: function () {\n            return ContextType;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    Object.defineProperty(PlaylistLoader, \"LevelType\", {\n        get: function () {\n            return LevelType;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    /**\n     * @param {ContextType} type\n     * @returns {boolean}\n     */\n    PlaylistLoader.canHaveQualityLevels = function (type) {\n        return (type !== ContextType.AUDIO_TRACK &&\n            type !== ContextType.SUBTITLE_TRACK);\n    };\n    /**\n     * Map context.type to LevelType\n     * @param {{type: ContextType}} context\n     * @returns {LevelType}\n     */\n    PlaylistLoader.mapContextToLevelType = function (context) {\n        var type = context.type;\n        switch (type) {\n            case ContextType.AUDIO_TRACK:\n                return LevelType.AUDIO;\n            case ContextType.SUBTITLE_TRACK:\n                return LevelType.SUBTITLE;\n            default:\n                return LevelType.MAIN;\n        }\n    };\n    PlaylistLoader.getResponseUrl = function (response, context) {\n        var url = response.url;\n        // responseURL not supported on some browsers (it is used to detect URL redirection)\n        // data-uri mode also not supported (but no need to detect redirection)\n        if (url === undefined || url.indexOf('data:') === 0) {\n            // fallback to initial URL\n            url = context.url;\n        }\n        return url;\n    };\n    /**\n     * Returns defaults or configured loader-type overloads (pLoader and loader config params)\n     * Default loader is XHRLoader (see utils)\n     * @param {object} context\n     * @returns {XHRLoader} or other compatible configured overload\n     */\n    PlaylistLoader.prototype.createInternalLoader = function (context) {\n        var config = this.hls.config;\n        var PLoader = config.pLoader;\n        var Loader = config.loader;\n        var InternalLoader = PLoader || Loader;\n        var loader = new InternalLoader(config);\n        context.loader = loader;\n        this.loaders[context.type] = loader;\n        return loader;\n    };\n    PlaylistLoader.prototype.getInternalLoader = function (context) {\n        return this.loaders[context.type];\n    };\n    PlaylistLoader.prototype.resetInternalLoader = function (contextType) {\n        if (this.loaders[contextType]) {\n            delete this.loaders[contextType];\n        }\n    };\n    /**\n     * Call `destroy` on all internal loader instances mapped (one per context type)\n     */\n    PlaylistLoader.prototype.destroyInternalLoaders = function () {\n        for (var contextType in this.loaders) {\n            var loader = this.loaders[contextType];\n            if (loader) {\n                loader.destroy();\n            }\n            this.resetInternalLoader(contextType);\n        }\n    };\n    PlaylistLoader.prototype.destroy = function () {\n        this.destroyInternalLoaders();\n        _super.prototype.destroy.call(this);\n    };\n    PlaylistLoader.prototype.onManifestLoading = function (data) {\n        this.load(data.url, { type: ContextType.MANIFEST, level: 0, id: null });\n    };\n    PlaylistLoader.prototype.onLevelLoading = function (data) {\n        this.load(data.url, { type: ContextType.LEVEL, level: data.level, id: data.id });\n    };\n    PlaylistLoader.prototype.onAudioTrackLoading = function (data) {\n        this.load(data.url, { type: ContextType.AUDIO_TRACK, level: null, id: data.id });\n    };\n    PlaylistLoader.prototype.onSubtitleTrackLoading = function (data) {\n        this.load(data.url, { type: ContextType.SUBTITLE_TRACK, level: null, id: data.id });\n    };\n    PlaylistLoader.prototype.load = function (url, context) {\n        var config = this.hls.config;\n        logger_1.logger.debug(\"Loading playlist of type \" + context.type + \", level: \" + context.level + \", id: \" + context.id);\n        // Check if a loader for this context already exists\n        var loader = this.getInternalLoader(context);\n        if (loader) {\n            var loaderContext = loader.context;\n            if (loaderContext && loaderContext.url === url) { // same URL can't overlap\n                logger_1.logger.trace('playlist request ongoing');\n                return false;\n            }\n            else {\n                logger_1.logger.warn(\"aborting previous loader for type: \" + context.type);\n                loader.abort();\n            }\n        }\n        var maxRetry, timeout, retryDelay, maxRetryDelay;\n        // apply different configs for retries depending on\n        // context (manifest, level, audio/subs playlist)\n        switch (context.type) {\n            case ContextType.MANIFEST:\n                maxRetry = config.manifestLoadingMaxRetry;\n                timeout = config.manifestLoadingTimeOut;\n                retryDelay = config.manifestLoadingRetryDelay;\n                maxRetryDelay = config.manifestLoadingMaxRetryTimeout;\n                break;\n            case ContextType.LEVEL:\n                // Disable internal loader retry logic, since we are managing retries in Level Controller\n                maxRetry = 0;\n                timeout = config.levelLoadingTimeOut;\n                // TODO Introduce retry settings for audio-track and subtitle-track, it should not use level retry config\n                break;\n            default:\n                maxRetry = config.levelLoadingMaxRetry;\n                timeout = config.levelLoadingTimeOut;\n                retryDelay = config.levelLoadingRetryDelay;\n                maxRetryDelay = config.levelLoadingMaxRetryTimeout;\n                break;\n        }\n        loader = this.createInternalLoader(context);\n        context.url = url;\n        context.responseType = context.responseType || ''; // FIXME: (should not be necessary to do this)\n        var loaderConfig = {\n            timeout: timeout,\n            maxRetry: maxRetry,\n            retryDelay: retryDelay,\n            maxRetryDelay: maxRetryDelay\n        };\n        var loaderCallbacks = {\n            onSuccess: this.loadsuccess.bind(this),\n            onError: this.loaderror.bind(this),\n            onTimeout: this.loadtimeout.bind(this)\n        };\n        logger_1.logger.debug(\"Calling internal loader delegate for URL: \" + url);\n        loader.load(context, loaderConfig, loaderCallbacks);\n        return true;\n    };\n    PlaylistLoader.prototype.loadsuccess = function (response, stats, context, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        if (context.isSidxRequest) {\n            this._handleSidxRequest(response, context);\n            this._handlePlaylistLoaded(response, stats, context, networkDetails);\n            return;\n        }\n        this.resetInternalLoader(context.type);\n        var string = response.data;\n        stats.tload = performance.now();\n        // stats.mtime = new Date(target.getResponseHeader('Last-Modified'));\n        // Validate if it is an M3U8 at all\n        if (string.indexOf('#EXTM3U') !== 0) {\n            this._handleManifestParsingError(response, context, 'no EXTM3U delimiter', networkDetails);\n            return;\n        }\n        // Check if chunk-list or master. handle empty chunk list case (first EXTINF not signaled, but TARGETDURATION present)\n        if (string.indexOf('#EXTINF:') > 0 || string.indexOf('#EXT-X-TARGETDURATION:') > 0) {\n            this._handleTrackOrLevelPlaylist(response, stats, context, networkDetails);\n        }\n        else {\n            this._handleMasterPlaylist(response, stats, context, networkDetails);\n        }\n    };\n    PlaylistLoader.prototype.loaderror = function (response, context, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        this._handleNetworkError(context, networkDetails, false, response);\n    };\n    PlaylistLoader.prototype.loadtimeout = function (stats, context, networkDetails) {\n        if (networkDetails === void 0) { networkDetails = null; }\n        this._handleNetworkError(context, networkDetails, true);\n    };\n    PlaylistLoader.prototype._handleMasterPlaylist = function (response, stats, context, networkDetails) {\n        var hls = this.hls;\n        var string = response.data;\n        var url = PlaylistLoader.getResponseUrl(response, context);\n        var levels = m3u8_parser_1.default.parseMasterPlaylist(string, url);\n        if (!levels.length) {\n            this._handleManifestParsingError(response, context, 'no level found in manifest', networkDetails);\n            return;\n        }\n        // multi level playlist, parse level info\n        var audioGroups = levels.map(function (level) { return ({\n            id: level.attrs.AUDIO,\n            codec: level.audioCodec\n        }); });\n        var audioTracks = m3u8_parser_1.default.parseMasterPlaylistMedia(string, url, 'AUDIO', audioGroups);\n        var subtitles = m3u8_parser_1.default.parseMasterPlaylistMedia(string, url, 'SUBTITLES');\n        if (audioTracks.length) {\n            // check if we have found an audio track embedded in main playlist (audio track without URI attribute)\n            var embeddedAudioFound_1 = false;\n            audioTracks.forEach(function (audioTrack) {\n                if (!audioTrack.url) {\n                    embeddedAudioFound_1 = true;\n                }\n            });\n            // if no embedded audio track defined, but audio codec signaled in quality level,\n            // we need to signal this main audio track this could happen with playlists with\n            // alt audio rendition in which quality levels (main)\n            // contains both audio+video. but with mixed audio track not signaled\n            if (embeddedAudioFound_1 === false && levels[0].audioCodec && !levels[0].attrs.AUDIO) {\n                logger_1.logger.log('audio codec signaled in quality level, but no embedded audio track signaled, create one');\n                audioTracks.unshift({\n                    type: 'main',\n                    name: 'main'\n                });\n            }\n        }\n        hls.trigger(events_1.default.MANIFEST_LOADED, {\n            levels: levels,\n            audioTracks: audioTracks,\n            subtitles: subtitles,\n            url: url,\n            stats: stats,\n            networkDetails: networkDetails\n        });\n    };\n    PlaylistLoader.prototype._handleTrackOrLevelPlaylist = function (response, stats, context, networkDetails) {\n        var hls = this.hls;\n        var id = context.id, level = context.level, type = context.type;\n        var url = PlaylistLoader.getResponseUrl(response, context);\n        var levelUrlId = Number.isFinite(id) ? id : 0;\n        var levelId = Number.isFinite(level) ? level : levelUrlId;\n        var levelType = PlaylistLoader.mapContextToLevelType(context);\n        var levelDetails = m3u8_parser_1.default.parseLevelPlaylist(response.data, url, levelId, levelType, levelUrlId);\n        // set stats on level structure\n        levelDetails.tload = stats.tload;\n        // We have done our first request (Manifest-type) and receive\n        // not a master playlist but a chunk-list (track/level)\n        // We fire the manifest-loaded event anyway with the parsed level-details\n        // by creating a single-level structure for it.\n        if (type === ContextType.MANIFEST) {\n            var singleLevel = {\n                url: url,\n                details: levelDetails\n            };\n            hls.trigger(events_1.default.MANIFEST_LOADED, {\n                levels: [singleLevel],\n                audioTracks: [],\n                url: url,\n                stats: stats,\n                networkDetails: networkDetails\n            });\n        }\n        // save parsing time\n        stats.tparsed = performance.now();\n        // in case we need SIDX ranges\n        // return early after calling load for\n        // the SIDX box.\n        if (levelDetails.needSidxRanges) {\n            var sidxUrl = levelDetails.initSegment.url;\n            this.load(sidxUrl, {\n                isSidxRequest: true,\n                type: type,\n                level: level,\n                levelDetails: levelDetails,\n                id: id,\n                rangeStart: 0,\n                rangeEnd: 2048,\n                responseType: 'arraybuffer'\n            });\n            return;\n        }\n        // extend the context with the new levelDetails property\n        context.levelDetails = levelDetails;\n        this._handlePlaylistLoaded(response, stats, context, networkDetails);\n    };\n    PlaylistLoader.prototype._handleSidxRequest = function (response, context) {\n        var sidxInfo = mp4demuxer_1.default.parseSegmentIndex(new Uint8Array(response.data));\n        // if provided fragment does not contain sidx, early return\n        if (!sidxInfo) {\n            return;\n        }\n        var sidxReferences = sidxInfo.references;\n        var levelDetails = context.levelDetails;\n        sidxReferences.forEach(function (segmentRef, index) {\n            var segRefInfo = segmentRef.info;\n            var frag = levelDetails.fragments[index];\n            if (frag.byteRange.length === 0) {\n                frag.rawByteRange = String(1 + segRefInfo.end - segRefInfo.start) + '@' + String(segRefInfo.start);\n            }\n        });\n        levelDetails.initSegment.rawByteRange = String(sidxInfo.moovEndOffset) + '@0';\n    };\n    PlaylistLoader.prototype._handleManifestParsingError = function (response, context, reason, networkDetails) {\n        this.hls.trigger(events_1.default.ERROR, {\n            type: errors_1.ErrorTypes.NETWORK_ERROR,\n            details: errors_1.ErrorDetails.MANIFEST_PARSING_ERROR,\n            fatal: true,\n            url: response.url,\n            reason: reason,\n            networkDetails: networkDetails\n        });\n    };\n    PlaylistLoader.prototype._handleNetworkError = function (context, networkDetails, timeout, response) {\n        if (timeout === void 0) { timeout = false; }\n        if (response === void 0) { response = null; }\n        logger_1.logger.info(\"A network error occured while loading a \" + context.type + \"-type playlist\");\n        var details;\n        var fatal;\n        var loader = this.getInternalLoader(context);\n        switch (context.type) {\n            case ContextType.MANIFEST:\n                details = (timeout ? errors_1.ErrorDetails.MANIFEST_LOAD_TIMEOUT : errors_1.ErrorDetails.MANIFEST_LOAD_ERROR);\n                fatal = true;\n                break;\n            case ContextType.LEVEL:\n                details = (timeout ? errors_1.ErrorDetails.LEVEL_LOAD_TIMEOUT : errors_1.ErrorDetails.LEVEL_LOAD_ERROR);\n                fatal = false;\n                break;\n            case ContextType.AUDIO_TRACK:\n                details = (timeout ? errors_1.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT : errors_1.ErrorDetails.AUDIO_TRACK_LOAD_ERROR);\n                fatal = false;\n                break;\n            default:\n                // details = ...?\n                fatal = false;\n        }\n        if (loader) {\n            loader.abort();\n            this.resetInternalLoader(context.type);\n        }\n        var errorData = {\n            type: errors_1.ErrorTypes.NETWORK_ERROR,\n            details: details,\n            fatal: fatal,\n            url: loader.url,\n            loader: loader,\n            context: context,\n            networkDetails: networkDetails\n        };\n        if (response) {\n            errorData.response = response;\n        }\n        this.hls.trigger(events_1.default.ERROR, errorData);\n    };\n    PlaylistLoader.prototype._handlePlaylistLoaded = function (response, stats, context, networkDetails) {\n        var type = context.type, level = context.level, id = context.id, levelDetails = context.levelDetails;\n        if (!levelDetails.targetduration) {\n            this._handleManifestParsingError(response, context, 'invalid target duration', networkDetails);\n            return;\n        }\n        var canHaveLevels = PlaylistLoader.canHaveQualityLevels(context.type);\n        if (canHaveLevels) {\n            this.hls.trigger(events_1.default.LEVEL_LOADED, {\n                details: levelDetails,\n                level: level || 0,\n                id: id || 0,\n                stats: stats,\n                networkDetails: networkDetails\n            });\n        }\n        else {\n            switch (type) {\n                case ContextType.AUDIO_TRACK:\n                    this.hls.trigger(events_1.default.AUDIO_TRACK_LOADED, {\n                        details: levelDetails,\n                        id: id,\n                        stats: stats,\n                        networkDetails: networkDetails\n                    });\n                    break;\n                case ContextType.SUBTITLE_TRACK:\n                    this.hls.trigger(events_1.default.SUBTITLE_TRACK_LOADED, {\n                        details: levelDetails,\n                        id: id,\n                        stats: stats,\n                        networkDetails: networkDetails\n                    });\n                    break;\n            }\n        }\n    };\n    return PlaylistLoader;\n}(event_handler_1.default));\nexports.default = PlaylistLoader;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/observer.js\":\n/*!*************************!*\\\n  !*** ./src/observer.js ***!\n  \\*************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar eventemitter3_1 = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\n/**\n * @class\n *\n * Simple adapter sub-class of Nodejs-like EventEmitter.\n *\n * We simply want to pass along the event-name itself\n * in every call to a handler, which is the purpose of our `trigger` method\n * extending the standard API.\n *\n */\nvar Observer = /** @class */ (function (_super) {\n    __extends(Observer, _super);\n    function Observer() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     *\n     * @param {string} event\n     * @param {any} data\n     */\n    Observer.prototype.trigger = function (event) {\n        var data = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            data[_i - 1] = arguments[_i];\n        }\n        this.emit.apply(this, [event, event].concat(data));\n    };\n    return Observer;\n}(eventemitter3_1.EventEmitter));\nexports.Observer = Observer;\n\n\n/***/ }),\n\n/***/ \"./src/polyfills/number.js\":\n/*!*********************************!*\\\n  !*** ./src/polyfills/number.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar get_self_scope_1 = __webpack_require__(/*! ../utils/get-self-scope */ \"./src/utils/get-self-scope.js\");\nvar self = get_self_scope_1.getSelfScope();\nvar Number = self.Number;\nexports.Number = Number;\n// TODO: get rid of global polyfills and replace them with wrappers (\"ponyfills\")\nNumber.isFinite = Number.isFinite || function (value) {\n    return typeof value === 'number' && isFinite(value);\n};\n\n\n/***/ }),\n\n/***/ \"./src/remux/aac-helper.js\":\n/*!*********************************!*\\\n  !*** ./src/remux/aac-helper.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n *  AAC helper\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AAC = /** @class */ (function () {\n    function AAC() {\n    }\n    AAC.getSilentFrame = function (codec, channelCount) {\n        switch (codec) {\n            case 'mp4a.40.2':\n                if (channelCount === 1) {\n                    return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);\n                }\n                else if (channelCount === 2) {\n                    return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);\n                }\n                else if (channelCount === 3) {\n                    return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);\n                }\n                else if (channelCount === 4) {\n                    return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);\n                }\n                else if (channelCount === 5) {\n                    return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);\n                }\n                else if (channelCount === 6) {\n                    return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);\n                }\n                break;\n            // handle HE-AAC below (mp4a.40.5 / mp4a.40.29)\n            default:\n                if (channelCount === 1) {\n                    // ffmpeg -y -f lavfi -i \"aevalsrc=0:d=0.05\" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n                    return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n                }\n                else if (channelCount === 2) {\n                    // ffmpeg -y -f lavfi -i \"aevalsrc=0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n                    return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n                }\n                else if (channelCount === 3) {\n                    // ffmpeg -y -f lavfi -i \"aevalsrc=0|0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n                    return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n                }\n                break;\n        }\n        return null;\n    };\n    return AAC;\n}());\nexports.default = AAC;\n\n\n/***/ }),\n\n/***/ \"./src/remux/mp4-generator.js\":\n/*!************************************!*\\\n  !*** ./src/remux/mp4-generator.js ***!\n  \\************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Generate MP4 Box\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar UINT32_MAX = Math.pow(2, 32) - 1;\nvar MP4 = /** @class */ (function () {\n    function MP4() {\n    }\n    MP4.init = function () {\n        MP4.types = {\n            avc1: [],\n            avcC: [],\n            btrt: [],\n            dinf: [],\n            dref: [],\n            esds: [],\n            ftyp: [],\n            hdlr: [],\n            mdat: [],\n            mdhd: [],\n            mdia: [],\n            mfhd: [],\n            minf: [],\n            moof: [],\n            moov: [],\n            mp4a: [],\n            '.mp3': [],\n            mvex: [],\n            mvhd: [],\n            pasp: [],\n            sdtp: [],\n            stbl: [],\n            stco: [],\n            stsc: [],\n            stsd: [],\n            stsz: [],\n            stts: [],\n            tfdt: [],\n            tfhd: [],\n            traf: [],\n            trak: [],\n            trun: [],\n            trex: [],\n            tkhd: [],\n            vmhd: [],\n            smhd: []\n        };\n        var i;\n        for (i in MP4.types) {\n            if (MP4.types.hasOwnProperty(i)) {\n                MP4.types[i] = [\n                    i.charCodeAt(0),\n                    i.charCodeAt(1),\n                    i.charCodeAt(2),\n                    i.charCodeAt(3)\n                ];\n            }\n        }\n        var videoHdlr = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x76, 0x69, 0x64, 0x65,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x56, 0x69, 0x64, 0x65,\n            0x6f, 0x48, 0x61, 0x6e,\n            0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n        ]);\n        var audioHdlr = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x73, 0x6f, 0x75, 0x6e,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x53, 0x6f, 0x75, 0x6e,\n            0x64, 0x48, 0x61, 0x6e,\n            0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n        ]);\n        MP4.HDLR_TYPES = {\n            'video': videoHdlr,\n            'audio': audioHdlr\n        };\n        var dref = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x0c,\n            0x75, 0x72, 0x6c, 0x20,\n            0x00,\n            0x00, 0x00, 0x01 // entry_flags\n        ]);\n        var stco = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00 // entry_count\n        ]);\n        MP4.STTS = MP4.STSC = MP4.STCO = stco;\n        MP4.STSZ = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00 // sample_count\n        ]);\n        MP4.VMHD = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x01,\n            0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00 // opcolor\n        ]);\n        MP4.SMHD = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00 // reserved\n        ]);\n        MP4.STSD = new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01\n        ]); // entry_count\n        var majorBrand = new Uint8Array([105, 115, 111, 109]); // isom\n        var avc1Brand = new Uint8Array([97, 118, 99, 49]); // avc1\n        var minorVersion = new Uint8Array([0, 0, 0, 1]);\n        MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);\n        MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));\n    };\n    MP4.box = function (type) {\n        var payload = Array.prototype.slice.call(arguments, 1), size = 8, i = payload.length, len = i, result;\n        // calculate the total size we need to allocate\n        while (i--) {\n            size += payload[i].byteLength;\n        }\n        result = new Uint8Array(size);\n        result[0] = (size >> 24) & 0xff;\n        result[1] = (size >> 16) & 0xff;\n        result[2] = (size >> 8) & 0xff;\n        result[3] = size & 0xff;\n        result.set(type, 4);\n        // copy the payload into the result\n        for (i = 0, size = 8; i < len; i++) {\n            // copy payload[i] array @ offset size\n            result.set(payload[i], size);\n            size += payload[i].byteLength;\n        }\n        return result;\n    };\n    MP4.hdlr = function (type) {\n        return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);\n    };\n    MP4.mdat = function (data) {\n        return MP4.box(MP4.types.mdat, data);\n    };\n    MP4.mdhd = function (timescale, duration) {\n        duration *= timescale;\n        var upperWordDuration = Math.floor(duration / (UINT32_MAX + 1));\n        var lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1));\n        return MP4.box(MP4.types.mdhd, new Uint8Array([\n            0x01,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,\n            (timescale >> 24) & 0xFF,\n            (timescale >> 16) & 0xFF,\n            (timescale >> 8) & 0xFF,\n            timescale & 0xFF,\n            (upperWordDuration >> 24),\n            (upperWordDuration >> 16) & 0xFF,\n            (upperWordDuration >> 8) & 0xFF,\n            upperWordDuration & 0xFF,\n            (lowerWordDuration >> 24),\n            (lowerWordDuration >> 16) & 0xFF,\n            (lowerWordDuration >> 8) & 0xFF,\n            lowerWordDuration & 0xFF,\n            0x55, 0xc4,\n            0x00, 0x00\n        ]));\n    };\n    MP4.mdia = function (track) {\n        return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));\n    };\n    MP4.mfhd = function (sequenceNumber) {\n        return MP4.box(MP4.types.mfhd, new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            (sequenceNumber >> 24),\n            (sequenceNumber >> 16) & 0xFF,\n            (sequenceNumber >> 8) & 0xFF,\n            sequenceNumber & 0xFF // sequence_number\n        ]));\n    };\n    MP4.minf = function (track) {\n        if (track.type === 'audio') {\n            return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));\n        }\n        else {\n            return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));\n        }\n    };\n    MP4.moof = function (sn, baseMediaDecodeTime, track) {\n        return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track, baseMediaDecodeTime));\n    };\n    /**\n   * @param tracks... (optional) {array} the tracks associated with this movie\n   */\n    MP4.moov = function (tracks) {\n        var i = tracks.length, boxes = [];\n        while (i--) {\n            boxes[i] = MP4.trak(tracks[i]);\n        }\n        return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(tracks[0].timescale, tracks[0].duration)].concat(boxes).concat(MP4.mvex(tracks)));\n    };\n    MP4.mvex = function (tracks) {\n        var i = tracks.length, boxes = [];\n        while (i--) {\n            boxes[i] = MP4.trex(tracks[i]);\n        }\n        return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));\n    };\n    MP4.mvhd = function (timescale, duration) {\n        duration *= timescale;\n        var upperWordDuration = Math.floor(duration / (UINT32_MAX + 1));\n        var lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1));\n        var bytes = new Uint8Array([\n            0x01,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,\n            (timescale >> 24) & 0xFF,\n            (timescale >> 16) & 0xFF,\n            (timescale >> 8) & 0xFF,\n            timescale & 0xFF,\n            (upperWordDuration >> 24),\n            (upperWordDuration >> 16) & 0xFF,\n            (upperWordDuration >> 8) & 0xFF,\n            upperWordDuration & 0xFF,\n            (lowerWordDuration >> 24),\n            (lowerWordDuration >> 16) & 0xFF,\n            (lowerWordDuration >> 8) & 0xFF,\n            lowerWordDuration & 0xFF,\n            0x00, 0x01, 0x00, 0x00,\n            0x01, 0x00,\n            0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x40, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0xff, 0xff, 0xff, 0xff // next_track_ID\n        ]);\n        return MP4.box(MP4.types.mvhd, bytes);\n    };\n    MP4.sdtp = function (track) {\n        var samples = track.samples || [], bytes = new Uint8Array(4 + samples.length), flags, i;\n        // leave the full box header (4 bytes) all zero\n        // write the sample table\n        for (i = 0; i < samples.length; i++) {\n            flags = samples[i].flags;\n            bytes[i + 4] = (flags.dependsOn << 4) |\n                (flags.isDependedOn << 2) |\n                (flags.hasRedundancy);\n        }\n        return MP4.box(MP4.types.sdtp, bytes);\n    };\n    MP4.stbl = function (track) {\n        return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));\n    };\n    MP4.avc1 = function (track) {\n        var sps = [], pps = [], i, data, len;\n        // assemble the SPSs\n        for (i = 0; i < track.sps.length; i++) {\n            data = track.sps[i];\n            len = data.byteLength;\n            sps.push((len >>> 8) & 0xFF);\n            sps.push((len & 0xFF));\n            // SPS\n            sps = sps.concat(Array.prototype.slice.call(data));\n        }\n        // assemble the PPSs\n        for (i = 0; i < track.pps.length; i++) {\n            data = track.pps[i];\n            len = data.byteLength;\n            pps.push((len >>> 8) & 0xFF);\n            pps.push((len & 0xFF));\n            pps = pps.concat(Array.prototype.slice.call(data));\n        }\n        var avcc = MP4.box(MP4.types.avcC, new Uint8Array([\n            0x01,\n            sps[3],\n            sps[4],\n            sps[5],\n            0xfc | 3,\n            0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets\n        ].concat(sps).concat([\n            track.pps.length // numOfPictureParameterSets\n        ]).concat(pps))), // \"PPS\"\n        width = track.width, height = track.height, hSpacing = track.pixelRatio[0], vSpacing = track.pixelRatio[1];\n        return MP4.box(MP4.types.avc1, new Uint8Array([\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x01,\n            0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            (width >> 8) & 0xFF,\n            width & 0xff,\n            (height >> 8) & 0xFF,\n            height & 0xff,\n            0x00, 0x48, 0x00, 0x00,\n            0x00, 0x48, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01,\n            0x12,\n            0x64, 0x61, 0x69, 0x6C,\n            0x79, 0x6D, 0x6F, 0x74,\n            0x69, 0x6F, 0x6E, 0x2F,\n            0x68, 0x6C, 0x73, 0x2E,\n            0x6A, 0x73, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x18,\n            0x11, 0x11\n        ]), // pre_defined = -1\n        avcc, MP4.box(MP4.types.btrt, new Uint8Array([\n            0x00, 0x1c, 0x9c, 0x80,\n            0x00, 0x2d, 0xc6, 0xc0,\n            0x00, 0x2d, 0xc6, 0xc0\n        ])), // avgBitrate\n        MP4.box(MP4.types.pasp, new Uint8Array([\n            (hSpacing >> 24),\n            (hSpacing >> 16) & 0xFF,\n            (hSpacing >> 8) & 0xFF,\n            hSpacing & 0xFF,\n            (vSpacing >> 24),\n            (vSpacing >> 16) & 0xFF,\n            (vSpacing >> 8) & 0xFF,\n            vSpacing & 0xFF\n        ])));\n    };\n    MP4.esds = function (track) {\n        var configlen = track.config.length;\n        return new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            0x03,\n            0x17 + configlen,\n            0x00, 0x01,\n            0x00,\n            0x04,\n            0x0f + configlen,\n            0x40,\n            0x15,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x05 // descriptor_type\n        ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor\n    };\n    MP4.mp4a = function (track) {\n        var samplerate = track.samplerate;\n        return MP4.box(MP4.types.mp4a, new Uint8Array([\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, track.channelCount,\n            0x00, 0x10,\n            0x00, 0x00, 0x00, 0x00,\n            (samplerate >> 8) & 0xFF,\n            samplerate & 0xff,\n            0x00, 0x00\n        ]), MP4.box(MP4.types.esds, MP4.esds(track)));\n    };\n    MP4.mp3 = function (track) {\n        var samplerate = track.samplerate;\n        return MP4.box(MP4.types['.mp3'], new Uint8Array([\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, track.channelCount,\n            0x00, 0x10,\n            0x00, 0x00, 0x00, 0x00,\n            (samplerate >> 8) & 0xFF,\n            samplerate & 0xff,\n            0x00, 0x00\n        ]));\n    };\n    MP4.stsd = function (track) {\n        if (track.type === 'audio') {\n            if (!track.isAAC && track.codec === 'mp3') {\n                return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp3(track));\n            }\n            return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));\n        }\n        else {\n            return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));\n        }\n    };\n    MP4.tkhd = function (track) {\n        var id = track.id, duration = track.duration * track.timescale, width = track.width, height = track.height, upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)), lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1));\n        return MP4.box(MP4.types.tkhd, new Uint8Array([\n            0x01,\n            0x00, 0x00, 0x07,\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,\n            (id >> 24) & 0xFF,\n            (id >> 16) & 0xFF,\n            (id >> 8) & 0xFF,\n            id & 0xFF,\n            0x00, 0x00, 0x00, 0x00,\n            (upperWordDuration >> 24),\n            (upperWordDuration >> 16) & 0xFF,\n            (upperWordDuration >> 8) & 0xFF,\n            upperWordDuration & 0xFF,\n            (lowerWordDuration >> 24),\n            (lowerWordDuration >> 16) & 0xFF,\n            (lowerWordDuration >> 8) & 0xFF,\n            lowerWordDuration & 0xFF,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x40, 0x00, 0x00, 0x00,\n            (width >> 8) & 0xFF,\n            width & 0xFF,\n            0x00, 0x00,\n            (height >> 8) & 0xFF,\n            height & 0xFF,\n            0x00, 0x00 // height\n        ]));\n    };\n    MP4.traf = function (track, baseMediaDecodeTime) {\n        var sampleDependencyTable = MP4.sdtp(track), id = track.id, upperWordBaseMediaDecodeTime = Math.floor(baseMediaDecodeTime / (UINT32_MAX + 1)), lowerWordBaseMediaDecodeTime = Math.floor(baseMediaDecodeTime % (UINT32_MAX + 1));\n        return MP4.box(MP4.types.traf, MP4.box(MP4.types.tfhd, new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            (id >> 24),\n            (id >> 16) & 0XFF,\n            (id >> 8) & 0XFF,\n            (id & 0xFF) // track_ID\n        ])), MP4.box(MP4.types.tfdt, new Uint8Array([\n            0x01,\n            0x00, 0x00, 0x00,\n            (upperWordBaseMediaDecodeTime >> 24),\n            (upperWordBaseMediaDecodeTime >> 16) & 0XFF,\n            (upperWordBaseMediaDecodeTime >> 8) & 0XFF,\n            (upperWordBaseMediaDecodeTime & 0xFF),\n            (lowerWordBaseMediaDecodeTime >> 24),\n            (lowerWordBaseMediaDecodeTime >> 16) & 0XFF,\n            (lowerWordBaseMediaDecodeTime >> 8) & 0XFF,\n            (lowerWordBaseMediaDecodeTime & 0xFF)\n        ])), MP4.trun(track, sampleDependencyTable.length +\n            16 + // tfhd\n            20 + // tfdt\n            8 + // traf header\n            16 + // mfhd\n            8 + // moof header\n            8), // mdat header\n        sampleDependencyTable);\n    };\n    /**\n     * Generate a track box.\n     * @param track {object} a track definition\n     * @return {Uint8Array} the track box\n     */\n    MP4.trak = function (track) {\n        track.duration = track.duration || 0xffffffff;\n        return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));\n    };\n    MP4.trex = function (track) {\n        var id = track.id;\n        return MP4.box(MP4.types.trex, new Uint8Array([\n            0x00,\n            0x00, 0x00, 0x00,\n            (id >> 24),\n            (id >> 16) & 0XFF,\n            (id >> 8) & 0XFF,\n            (id & 0xFF),\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x01 // default_sample_flags\n        ]));\n    };\n    MP4.trun = function (track, offset) {\n        var samples = track.samples || [], len = samples.length, arraylen = 12 + (16 * len), array = new Uint8Array(arraylen), i, sample, duration, size, flags, cts;\n        offset += 8 + arraylen;\n        array.set([\n            0x00,\n            0x00, 0x0f, 0x01,\n            (len >>> 24) & 0xFF,\n            (len >>> 16) & 0xFF,\n            (len >>> 8) & 0xFF,\n            len & 0xFF,\n            (offset >>> 24) & 0xFF,\n            (offset >>> 16) & 0xFF,\n            (offset >>> 8) & 0xFF,\n            offset & 0xFF // data_offset\n        ], 0);\n        for (i = 0; i < len; i++) {\n            sample = samples[i];\n            duration = sample.duration;\n            size = sample.size;\n            flags = sample.flags;\n            cts = sample.cts;\n            array.set([\n                (duration >>> 24) & 0xFF,\n                (duration >>> 16) & 0xFF,\n                (duration >>> 8) & 0xFF,\n                duration & 0xFF,\n                (size >>> 24) & 0xFF,\n                (size >>> 16) & 0xFF,\n                (size >>> 8) & 0xFF,\n                size & 0xFF,\n                (flags.isLeading << 2) | flags.dependsOn,\n                (flags.isDependedOn << 6) |\n                    (flags.hasRedundancy << 4) |\n                    (flags.paddingValue << 1) |\n                    flags.isNonSync,\n                flags.degradPrio & 0xF0 << 8,\n                flags.degradPrio & 0x0F,\n                (cts >>> 24) & 0xFF,\n                (cts >>> 16) & 0xFF,\n                (cts >>> 8) & 0xFF,\n                cts & 0xFF // sample_composition_time_offset\n            ], 12 + 16 * i);\n        }\n        return MP4.box(MP4.types.trun, array);\n    };\n    MP4.initSegment = function (tracks) {\n        if (!MP4.types) {\n            MP4.init();\n        }\n        var movie = MP4.moov(tracks), result;\n        result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);\n        result.set(MP4.FTYP);\n        result.set(movie, MP4.FTYP.byteLength);\n        return result;\n    };\n    return MP4;\n}());\nexports.default = MP4;\n\n\n/***/ }),\n\n/***/ \"./src/remux/mp4-remuxer.js\":\n/*!**********************************!*\\\n  !*** ./src/remux/mp4-remuxer.js ***!\n  \\**********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * fMP4 remuxer\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar aac_helper_1 = __webpack_require__(/*! ./aac-helper */ \"./src/remux/aac-helper.js\");\nvar mp4_generator_1 = __webpack_require__(/*! ./mp4-generator */ \"./src/remux/mp4-generator.js\");\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar errors_1 = __webpack_require__(/*! ../errors */ \"./src/errors.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n// 10 seconds\nvar MAX_SILENT_FRAME_DURATION = 10 * 1000;\nvar MP4Remuxer = /** @class */ (function () {\n    function MP4Remuxer(observer, config, typeSupported, vendor) {\n        this.observer = observer;\n        this.config = config;\n        this.typeSupported = typeSupported;\n        var userAgent = navigator.userAgent;\n        this.isSafari = vendor && vendor.indexOf('Apple') > -1 && userAgent && !userAgent.match('CriOS');\n        this.ISGenerated = false;\n    }\n    MP4Remuxer.prototype.destroy = function () {\n    };\n    MP4Remuxer.prototype.resetTimeStamp = function (defaultTimeStamp) {\n        this._initPTS = this._initDTS = defaultTimeStamp;\n    };\n    MP4Remuxer.prototype.resetInitSegment = function () {\n        this.ISGenerated = false;\n    };\n    MP4Remuxer.prototype.remux = function (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n        // generate Init Segment if needed\n        if (!this.ISGenerated) {\n            this.generateIS(audioTrack, videoTrack, timeOffset);\n        }\n        if (this.ISGenerated) {\n            var nbAudioSamples = audioTrack.samples.length;\n            var nbVideoSamples = videoTrack.samples.length;\n            var audioTimeOffset = timeOffset;\n            var videoTimeOffset = timeOffset;\n            if (nbAudioSamples && nbVideoSamples) {\n                // timeOffset is expected to be the offset of the first timestamp of this fragment (first DTS)\n                // if first audio DTS is not aligned with first video DTS then we need to take that into account\n                // when providing timeOffset to remuxAudio / remuxVideo. if we don't do that, there might be a permanent / small\n                // drift between audio and video streams\n                var audiovideoDeltaDts = (audioTrack.samples[0].pts - videoTrack.samples[0].pts) / videoTrack.inputTimeScale;\n                audioTimeOffset += Math.max(0, audiovideoDeltaDts);\n                videoTimeOffset += Math.max(0, -audiovideoDeltaDts);\n            }\n            // Purposefully remuxing audio before video, so that remuxVideo can use nextAudioPts, which is\n            // calculated in remuxAudio.\n            // logger.log('nb AAC samples:' + audioTrack.samples.length);\n            if (nbAudioSamples) {\n                // if initSegment was generated without video samples, regenerate it again\n                if (!audioTrack.timescale) {\n                    logger_1.logger.warn('regenerate InitSegment as audio detected');\n                    this.generateIS(audioTrack, videoTrack, timeOffset);\n                }\n                var audioData = this.remuxAudio(audioTrack, audioTimeOffset, contiguous, accurateTimeOffset);\n                // logger.log('nb AVC samples:' + videoTrack.samples.length);\n                if (nbVideoSamples) {\n                    var audioTrackLength = void 0;\n                    if (audioData) {\n                        audioTrackLength = audioData.endPTS - audioData.startPTS;\n                    }\n                    // if initSegment was generated without video samples, regenerate it again\n                    if (!videoTrack.timescale) {\n                        logger_1.logger.warn('regenerate InitSegment as video detected');\n                        this.generateIS(audioTrack, videoTrack, timeOffset);\n                    }\n                    this.remuxVideo(videoTrack, videoTimeOffset, contiguous, audioTrackLength, accurateTimeOffset);\n                }\n            }\n            else {\n                // logger.log('nb AVC samples:' + videoTrack.samples.length);\n                if (nbVideoSamples) {\n                    var videoData = this.remuxVideo(videoTrack, videoTimeOffset, contiguous, 0, accurateTimeOffset);\n                    if (videoData && audioTrack.codec) {\n                        this.remuxEmptyAudio(audioTrack, audioTimeOffset, contiguous, videoData);\n                    }\n                }\n            }\n        }\n        // logger.log('nb ID3 samples:' + audioTrack.samples.length);\n        if (id3Track.samples.length) {\n            this.remuxID3(id3Track, timeOffset);\n        }\n        // logger.log('nb ID3 samples:' + audioTrack.samples.length);\n        if (textTrack.samples.length) {\n            this.remuxText(textTrack, timeOffset);\n        }\n        // notify end of parsing\n        this.observer.trigger(events_1.default.FRAG_PARSED);\n    };\n    MP4Remuxer.prototype.generateIS = function (audioTrack, videoTrack, timeOffset) {\n        var observer = this.observer, audioSamples = audioTrack.samples, videoSamples = videoTrack.samples, typeSupported = this.typeSupported, container = 'audio/mp4', tracks = {}, data = { tracks: tracks }, computePTSDTS = (this._initPTS === undefined), initPTS, initDTS;\n        if (computePTSDTS) {\n            initPTS = initDTS = Infinity;\n        }\n        if (audioTrack.config && audioSamples.length) {\n            // let's use audio sampling rate as MP4 time scale.\n            // rationale is that there is a integer nb of audio frames per audio sample (1024 for AAC)\n            // using audio sampling rate here helps having an integer MP4 frame duration\n            // this avoids potential rounding issue and AV sync issue\n            audioTrack.timescale = audioTrack.samplerate;\n            logger_1.logger.log(\"audio sampling rate : \" + audioTrack.samplerate);\n            if (!audioTrack.isAAC) {\n                if (typeSupported.mpeg) { // Chrome and Safari\n                    container = 'audio/mpeg';\n                    audioTrack.codec = '';\n                }\n                else if (typeSupported.mp3) { // Firefox\n                    audioTrack.codec = 'mp3';\n                }\n            }\n            tracks.audio = {\n                container: container,\n                codec: audioTrack.codec,\n                initSegment: !audioTrack.isAAC && typeSupported.mpeg ? new Uint8Array() : mp4_generator_1.default.initSegment([audioTrack]),\n                metadata: {\n                    channelCount: audioTrack.channelCount\n                }\n            };\n            if (computePTSDTS) {\n                // remember first PTS of this demuxing context. for audio, PTS = DTS\n                initPTS = initDTS = audioSamples[0].pts - audioTrack.inputTimeScale * timeOffset;\n            }\n        }\n        if (videoTrack.sps && videoTrack.pps && videoSamples.length) {\n            // let's use input time scale as MP4 video timescale\n            // we use input time scale straight away to avoid rounding issues on frame duration / cts computation\n            var inputTimeScale = videoTrack.inputTimeScale;\n            videoTrack.timescale = inputTimeScale;\n            tracks.video = {\n                container: 'video/mp4',\n                codec: videoTrack.codec,\n                initSegment: mp4_generator_1.default.initSegment([videoTrack]),\n                metadata: {\n                    width: videoTrack.width,\n                    height: videoTrack.height\n                }\n            };\n            if (computePTSDTS) {\n                initPTS = Math.min(initPTS, videoSamples[0].pts - inputTimeScale * timeOffset);\n                initDTS = Math.min(initDTS, videoSamples[0].dts - inputTimeScale * timeOffset);\n                this.observer.trigger(events_1.default.INIT_PTS_FOUND, { initPTS: initPTS });\n            }\n        }\n        if (Object.keys(tracks).length) {\n            observer.trigger(events_1.default.FRAG_PARSING_INIT_SEGMENT, data);\n            this.ISGenerated = true;\n            if (computePTSDTS) {\n                this._initPTS = initPTS;\n                this._initDTS = initDTS;\n            }\n        }\n        else {\n            observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MEDIA_ERROR, details: errors_1.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });\n        }\n    };\n    MP4Remuxer.prototype.remuxVideo = function (track, timeOffset, contiguous, audioTrackLength, accurateTimeOffset) {\n        var offset = 8;\n        var mp4SampleDuration;\n        var mdat;\n        var moof;\n        var firstPTS;\n        var firstDTS;\n        var lastPTS;\n        var lastDTS;\n        var timeScale = track.timescale;\n        var inputSamples = track.samples;\n        var outputSamples = [];\n        var nbSamples = inputSamples.length;\n        var ptsNormalize = this._PTSNormalize;\n        var initPTS = this._initPTS;\n        // if parsed fragment is contiguous with last one, let's use last DTS value as reference\n        var nextAvcDts = this.nextAvcDts;\n        var isSafari = this.isSafari;\n        if (nbSamples === 0) {\n            return;\n        }\n        // Safari does not like overlapping DTS on consecutive fragments. let's use nextAvcDts to overcome this if fragments are consecutive\n        if (isSafari) {\n            // also consider consecutive fragments as being contiguous (even if a level switch occurs),\n            // for sake of clarity:\n            // consecutive fragments are frags with\n            //  - less than 100ms gaps between new time offset (if accurate) and next expected PTS OR\n            //  - less than 200 ms PTS gaps (timeScale/5)\n            contiguous |= (inputSamples.length && nextAvcDts &&\n                ((accurateTimeOffset && Math.abs(timeOffset - nextAvcDts / timeScale) < 0.1) ||\n                    Math.abs((inputSamples[0].pts - nextAvcDts - initPTS)) < timeScale / 5));\n        }\n        if (!contiguous) {\n            // if not contiguous, let's use target timeOffset\n            nextAvcDts = timeOffset * timeScale;\n        }\n        // PTS is coded on 33bits, and can loop from -2^32 to 2^32\n        // ptsNormalize will make PTS/DTS value monotonic, we use last known DTS value as reference value\n        inputSamples.forEach(function (sample) {\n            sample.pts = ptsNormalize(sample.pts - initPTS, nextAvcDts);\n            sample.dts = ptsNormalize(sample.dts - initPTS, nextAvcDts);\n        });\n        // sort video samples by DTS then PTS then demux id order\n        inputSamples.sort(function (a, b) {\n            var deltadts = a.dts - b.dts;\n            var deltapts = a.pts - b.pts;\n            return deltadts || (deltapts || (a.id - b.id));\n        });\n        // handle broken streams with PTS < DTS, tolerance up 200ms (18000 in 90kHz timescale)\n        var PTSDTSshift = inputSamples.reduce(function (prev, curr) { return Math.max(Math.min(prev, curr.pts - curr.dts), -18000); }, 0);\n        if (PTSDTSshift < 0) {\n            logger_1.logger.warn(\"PTS < DTS detected in video samples, shifting DTS by \" + Math.round(PTSDTSshift / 90) + \" ms to overcome this issue\");\n            for (var i = 0; i < inputSamples.length; i++) {\n                inputSamples[i].dts += PTSDTSshift;\n            }\n        }\n        // compute first DTS and last DTS, normalize them against reference value\n        var sample = inputSamples[0];\n        firstDTS = Math.max(sample.dts, 0);\n        firstPTS = Math.max(sample.pts, 0);\n        // check timestamp continuity accross consecutive fragments (this is to remove inter-fragment gap/hole)\n        var delta = Math.round((firstDTS - nextAvcDts) / 90);\n        // if fragment are contiguous, detect hole/overlapping between fragments\n        if (contiguous) {\n            if (delta) {\n                if (delta > 1) {\n                    logger_1.logger.log(\"AVC:\" + delta + \" ms hole between fragments detected,filling it\");\n                }\n                else if (delta < -1) {\n                    logger_1.logger.log(\"AVC:\" + (-delta) + \" ms overlapping between fragments detected\");\n                }\n                // remove hole/gap : set DTS to next expected DTS\n                firstDTS = nextAvcDts;\n                inputSamples[0].dts = firstDTS;\n                // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n                firstPTS = Math.max(firstPTS - delta, nextAvcDts);\n                inputSamples[0].pts = firstPTS;\n                logger_1.logger.log(\"Video/PTS/DTS adjusted: \" + Math.round(firstPTS / 90) + \"/\" + Math.round(firstDTS / 90) + \",delta:\" + delta + \" ms\");\n            }\n        }\n        // compute lastPTS/lastDTS\n        sample = inputSamples[inputSamples.length - 1];\n        lastDTS = Math.max(sample.dts, 0);\n        lastPTS = Math.max(sample.pts, 0, lastDTS);\n        // on Safari let's signal the same sample duration for all samples\n        // sample duration (as expected by trun MP4 boxes), should be the delta between sample DTS\n        // set this constant duration as being the avg delta between consecutive DTS.\n        if (isSafari) {\n            mp4SampleDuration = Math.round((lastDTS - firstDTS) / (inputSamples.length - 1));\n        }\n        var nbNalu = 0, naluLen = 0;\n        for (var i = 0; i < nbSamples; i++) {\n            // compute total/avc sample length and nb of NAL units\n            var sample_1 = inputSamples[i], units = sample_1.units, nbUnits = units.length, sampleLen = 0;\n            for (var j = 0; j < nbUnits; j++) {\n                sampleLen += units[j].data.length;\n            }\n            naluLen += sampleLen;\n            nbNalu += nbUnits;\n            sample_1.length = sampleLen;\n            // normalize PTS/DTS\n            if (isSafari) {\n                // sample DTS is computed using a constant decoding offset (mp4SampleDuration) between samples\n                sample_1.dts = firstDTS + i * mp4SampleDuration;\n            }\n            else {\n                // ensure sample monotonic DTS\n                sample_1.dts = Math.max(sample_1.dts, firstDTS);\n            }\n            // ensure that computed value is greater or equal than sample DTS\n            sample_1.pts = Math.max(sample_1.pts, sample_1.dts);\n        }\n        /* concatenate the video data and construct the mdat in place\n          (need 8 more bytes to fill length and mpdat type) */\n        var mdatSize = naluLen + (4 * nbNalu) + 8;\n        try {\n            mdat = new Uint8Array(mdatSize);\n        }\n        catch (err) {\n            this.observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MUX_ERROR, details: errors_1.ErrorDetails.REMUX_ALLOC_ERROR, fatal: false, bytes: mdatSize, reason: \"fail allocating video mdat \" + mdatSize });\n            return;\n        }\n        var view = new DataView(mdat.buffer);\n        view.setUint32(0, mdatSize);\n        mdat.set(mp4_generator_1.default.types.mdat, 4);\n        for (var i = 0; i < nbSamples; i++) {\n            var avcSample = inputSamples[i], avcSampleUnits = avcSample.units, mp4SampleLength = 0, compositionTimeOffset = void 0;\n            // convert NALU bitstream to MP4 format (prepend NALU with size field)\n            for (var j = 0, nbUnits = avcSampleUnits.length; j < nbUnits; j++) {\n                var unit = avcSampleUnits[j], unitData = unit.data, unitDataLen = unit.data.byteLength;\n                view.setUint32(offset, unitDataLen);\n                offset += 4;\n                mdat.set(unitData, offset);\n                offset += unitDataLen;\n                mp4SampleLength += 4 + unitDataLen;\n            }\n            if (!isSafari) {\n                // expected sample duration is the Decoding Timestamp diff of consecutive samples\n                if (i < nbSamples - 1) {\n                    mp4SampleDuration = inputSamples[i + 1].dts - avcSample.dts;\n                }\n                else {\n                    var config = this.config, lastFrameDuration = avcSample.dts - inputSamples[i > 0 ? i - 1 : i].dts;\n                    if (config.stretchShortVideoTrack) {\n                        // In some cases, a segment's audio track duration may exceed the video track duration.\n                        // Since we've already remuxed audio, and we know how long the audio track is, we look to\n                        // see if the delta to the next segment is longer than maxBufferHole.\n                        // If so, playback would potentially get stuck, so we artificially inflate\n                        // the duration of the last frame to minimize any potential gap between segments.\n                        var maxBufferHole = config.maxBufferHole, gapTolerance = Math.floor(maxBufferHole * timeScale), deltaToFrameEnd = (audioTrackLength ? firstPTS + audioTrackLength * timeScale : this.nextAudioPts) - avcSample.pts;\n                        if (deltaToFrameEnd > gapTolerance) {\n                            // We subtract lastFrameDuration from deltaToFrameEnd to try to prevent any video\n                            // frame overlap. maxBufferHole should be >> lastFrameDuration anyway.\n                            mp4SampleDuration = deltaToFrameEnd - lastFrameDuration;\n                            if (mp4SampleDuration < 0) {\n                                mp4SampleDuration = lastFrameDuration;\n                            }\n                            logger_1.logger.log(\"It is approximately \" + deltaToFrameEnd / 90 + \" ms to the next segment; using duration \" + mp4SampleDuration / 90 + \" ms for the last video frame.\");\n                        }\n                        else {\n                            mp4SampleDuration = lastFrameDuration;\n                        }\n                    }\n                    else {\n                        mp4SampleDuration = lastFrameDuration;\n                    }\n                }\n                compositionTimeOffset = Math.round(avcSample.pts - avcSample.dts);\n            }\n            else {\n                compositionTimeOffset = Math.max(0, mp4SampleDuration * Math.round((avcSample.pts - avcSample.dts) / mp4SampleDuration));\n            }\n            // console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');\n            outputSamples.push({\n                size: mp4SampleLength,\n                // constant duration\n                duration: mp4SampleDuration,\n                cts: compositionTimeOffset,\n                flags: {\n                    isLeading: 0,\n                    isDependedOn: 0,\n                    hasRedundancy: 0,\n                    degradPrio: 0,\n                    dependsOn: avcSample.key ? 2 : 1,\n                    isNonSync: avcSample.key ? 0 : 1\n                }\n            });\n        }\n        // next AVC sample DTS should be equal to last sample DTS + last sample duration (in PES timescale)\n        this.nextAvcDts = lastDTS + mp4SampleDuration;\n        var dropped = track.dropped;\n        track.len = 0;\n        track.nbNalu = 0;\n        track.dropped = 0;\n        if (outputSamples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {\n            var flags = outputSamples[0].flags;\n            // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n            // https://code.google.com/p/chromium/issues/detail?id=229412\n            flags.dependsOn = 2;\n            flags.isNonSync = 0;\n        }\n        track.samples = outputSamples;\n        moof = mp4_generator_1.default.moof(track.sequenceNumber++, firstDTS, track);\n        track.samples = [];\n        var data = {\n            data1: moof,\n            data2: mdat,\n            startPTS: firstPTS / timeScale,\n            endPTS: (lastPTS + mp4SampleDuration) / timeScale,\n            startDTS: firstDTS / timeScale,\n            endDTS: this.nextAvcDts / timeScale,\n            type: 'video',\n            hasAudio: false,\n            hasVideo: true,\n            nb: outputSamples.length,\n            dropped: dropped\n        };\n        this.observer.trigger(events_1.default.FRAG_PARSING_DATA, data);\n        return data;\n    };\n    MP4Remuxer.prototype.remuxAudio = function (track, timeOffset, contiguous, accurateTimeOffset) {\n        var inputTimeScale = track.inputTimeScale;\n        var mp4timeScale = track.timescale;\n        var scaleFactor = inputTimeScale / mp4timeScale;\n        var mp4SampleDuration = track.isAAC ? 1024 : 1152;\n        var inputSampleDuration = mp4SampleDuration * scaleFactor;\n        var ptsNormalize = this._PTSNormalize;\n        var initPTS = this._initPTS;\n        var rawMPEG = !track.isAAC && this.typeSupported.mpeg;\n        var offset, mp4Sample, fillFrame, mdat, moof, firstPTS, lastPTS, inputSamples = track.samples, outputSamples = [], nextAudioPts = this.nextAudioPts;\n        // for audio samples, also consider consecutive fragments as being contiguous (even if a level switch occurs),\n        // for sake of clarity:\n        // consecutive fragments are frags with\n        //  - less than 100ms gaps between new time offset (if accurate) and next expected PTS OR\n        //  - less than 20 audio frames distance\n        // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n        // this helps ensuring audio continuity\n        // and this also avoids audio glitches/cut when switching quality, or reporting wrong duration on first audio frame\n        contiguous |= (inputSamples.length && nextAudioPts &&\n            ((accurateTimeOffset && Math.abs(timeOffset - nextAudioPts / inputTimeScale) < 0.1) ||\n                Math.abs((inputSamples[0].pts - nextAudioPts - initPTS)) < 20 * inputSampleDuration));\n        // compute normalized PTS\n        inputSamples.forEach(function (sample) {\n            sample.pts = sample.dts = ptsNormalize(sample.pts - initPTS, timeOffset * inputTimeScale);\n        });\n        // filter out sample with negative PTS that are not playable anyway\n        // if we don't remove these negative samples, they will shift all audio samples forward.\n        // leading to audio overlap between current / next fragment\n        inputSamples = inputSamples.filter(function (sample) {\n            return sample.pts >= 0;\n        });\n        // in case all samples have negative PTS, and have been filtered out, return now\n        if (inputSamples.length === 0) {\n            return;\n        }\n        if (!contiguous) {\n            if (!accurateTimeOffset) {\n                // if frag are mot contiguous and if we cant trust time offset, let's use first sample PTS as next audio PTS\n                nextAudioPts = inputSamples[0].pts;\n            }\n            else {\n                // if timeOffset is accurate, let's use it as predicted next audio PTS\n                nextAudioPts = timeOffset * inputTimeScale;\n            }\n        }\n        // If the audio track is missing samples, the frames seem to get \"left-shifted\" within the\n        // resulting mp4 segment, causing sync issues and leaving gaps at the end of the audio segment.\n        // In an effort to prevent this from happening, we inject frames here where there are gaps.\n        // When possible, we inject a silent frame; when that's not possible, we duplicate the last\n        // frame.\n        if (track.isAAC) {\n            var maxAudioFramesDrift = this.config.maxAudioFramesDrift;\n            for (var i = 0, nextPts = nextAudioPts; i < inputSamples.length;) {\n                // First, let's see how far off this frame is from where we expect it to be\n                var sample = inputSamples[i], delta;\n                var pts = sample.pts;\n                delta = pts - nextPts;\n                var duration = Math.abs(1000 * delta / inputTimeScale);\n                // If we're overlapping by more than a duration, drop this sample\n                if (delta <= -maxAudioFramesDrift * inputSampleDuration) {\n                    logger_1.logger.warn(\"Dropping 1 audio frame @ \" + (nextPts / inputTimeScale).toFixed(3) + \"s due to \" + Math.round(duration) + \" ms overlap.\");\n                    inputSamples.splice(i, 1);\n                    track.len -= sample.unit.length;\n                    // Don't touch nextPtsNorm or i\n                } // eslint-disable-line brace-style\n                // Insert missing frames if:\n                // 1: We're more than maxAudioFramesDrift frame away\n                // 2: Not more than MAX_SILENT_FRAME_DURATION away\n                // 3: currentTime (aka nextPtsNorm) is not 0\n                else if (delta >= maxAudioFramesDrift * inputSampleDuration && duration < MAX_SILENT_FRAME_DURATION && nextPts) {\n                    var missing = Math.round(delta / inputSampleDuration);\n                    logger_1.logger.warn(\"Injecting \" + missing + \" audio frame @ \" + (nextPts / inputTimeScale).toFixed(3) + \"s due to \" + Math.round(1000 * delta / inputTimeScale) + \" ms gap.\");\n                    for (var j = 0; j < missing; j++) {\n                        var newStamp = Math.max(nextPts, 0);\n                        fillFrame = aac_helper_1.default.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n                        if (!fillFrame) {\n                            logger_1.logger.log('Unable to get silent frame for given audio codec; duplicating last frame instead.');\n                            fillFrame = sample.unit.subarray();\n                        }\n                        inputSamples.splice(i, 0, { unit: fillFrame, pts: newStamp, dts: newStamp });\n                        track.len += fillFrame.length;\n                        nextPts += inputSampleDuration;\n                        i++;\n                    }\n                    // Adjust sample to next expected pts\n                    sample.pts = sample.dts = nextPts;\n                    nextPts += inputSampleDuration;\n                    i++;\n                }\n                else {\n                    // Otherwise, just adjust pts\n                    if (Math.abs(delta) > (0.1 * inputSampleDuration)) {\n                        // logger.log(`Invalid frame delta ${Math.round(delta + inputSampleDuration)} at PTS ${Math.round(pts / 90)} (should be ${Math.round(inputSampleDuration)}).`);\n                    }\n                    sample.pts = sample.dts = nextPts;\n                    nextPts += inputSampleDuration;\n                    i++;\n                }\n            }\n        }\n        for (var j = 0, nbSamples_1 = inputSamples.length; j < nbSamples_1; j++) {\n            var audioSample = inputSamples[j];\n            var unit = audioSample.unit;\n            var pts = audioSample.pts;\n            // logger.log(`Audio/PTS:${Math.round(pts/90)}`);\n            // if not first sample\n            if (lastPTS !== undefined) {\n                mp4Sample.duration = Math.round((pts - lastPTS) / scaleFactor);\n            }\n            else {\n                var delta_1 = Math.round(1000 * (pts - nextAudioPts) / inputTimeScale), numMissingFrames = 0;\n                // if fragment are contiguous, detect hole/overlapping between fragments\n                // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n                if (contiguous && track.isAAC) {\n                    // log delta\n                    if (delta_1) {\n                        if (delta_1 > 0 && delta_1 < MAX_SILENT_FRAME_DURATION) {\n                            numMissingFrames = Math.round((pts - nextAudioPts) / inputSampleDuration);\n                            logger_1.logger.log(delta_1 + \" ms hole between AAC samples detected,filling it\");\n                            if (numMissingFrames > 0) {\n                                fillFrame = aac_helper_1.default.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n                                if (!fillFrame) {\n                                    fillFrame = unit.subarray();\n                                }\n                                track.len += numMissingFrames * fillFrame.length;\n                            }\n                            // if we have frame overlap, overlapping for more than half a frame duraion\n                        }\n                        else if (delta_1 < -12) {\n                            // drop overlapping audio frames... browser will deal with it\n                            logger_1.logger.log(\"drop overlapping AAC sample, expected/parsed/delta:\" + (nextAudioPts / inputTimeScale).toFixed(3) + \"s/\" + (pts / inputTimeScale).toFixed(3) + \"s/\" + (-delta_1) + \"ms\");\n                            track.len -= unit.byteLength;\n                            continue;\n                        }\n                        // set PTS/DTS to expected PTS/DTS\n                        pts = nextAudioPts;\n                    }\n                }\n                // remember first PTS of our audioSamples\n                firstPTS = pts;\n                if (track.len > 0) {\n                    /* concatenate the audio data and construct the mdat in place\n                      (need 8 more bytes to fill length and mdat type) */\n                    var mdatSize = rawMPEG ? track.len : track.len + 8;\n                    offset = rawMPEG ? 0 : 8;\n                    try {\n                        mdat = new Uint8Array(mdatSize);\n                    }\n                    catch (err) {\n                        this.observer.trigger(events_1.default.ERROR, { type: errors_1.ErrorTypes.MUX_ERROR, details: errors_1.ErrorDetails.REMUX_ALLOC_ERROR, fatal: false, bytes: mdatSize, reason: \"fail allocating audio mdat \" + mdatSize });\n                        return;\n                    }\n                    if (!rawMPEG) {\n                        var view = new DataView(mdat.buffer);\n                        view.setUint32(0, mdatSize);\n                        mdat.set(mp4_generator_1.default.types.mdat, 4);\n                    }\n                }\n                else {\n                    // no audio samples\n                    return;\n                }\n                for (var i = 0; i < numMissingFrames; i++) {\n                    fillFrame = aac_helper_1.default.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n                    if (!fillFrame) {\n                        logger_1.logger.log('Unable to get silent frame for given audio codec; duplicating this frame instead.');\n                        fillFrame = unit.subarray();\n                    }\n                    mdat.set(fillFrame, offset);\n                    offset += fillFrame.byteLength;\n                    mp4Sample = {\n                        size: fillFrame.byteLength,\n                        cts: 0,\n                        duration: 1024,\n                        flags: {\n                            isLeading: 0,\n                            isDependedOn: 0,\n                            hasRedundancy: 0,\n                            degradPrio: 0,\n                            dependsOn: 1\n                        }\n                    };\n                    outputSamples.push(mp4Sample);\n                }\n            }\n            mdat.set(unit, offset);\n            var unitLen = unit.byteLength;\n            offset += unitLen;\n            // console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${audioSample.pts}/${audioSample.dts}/${initDTS}/${ptsnorm}/${dtsnorm}/${(audioSample.pts/4294967296).toFixed(3)}');\n            mp4Sample = {\n                size: unitLen,\n                cts: 0,\n                duration: 0,\n                flags: {\n                    isLeading: 0,\n                    isDependedOn: 0,\n                    hasRedundancy: 0,\n                    degradPrio: 0,\n                    dependsOn: 1\n                }\n            };\n            outputSamples.push(mp4Sample);\n            lastPTS = pts;\n        }\n        var lastSampleDuration = 0;\n        var nbSamples = outputSamples.length;\n        // set last sample duration as being identical to previous sample\n        if (nbSamples >= 2) {\n            lastSampleDuration = outputSamples[nbSamples - 2].duration;\n            mp4Sample.duration = lastSampleDuration;\n        }\n        if (nbSamples) {\n            // next audio sample PTS should be equal to last sample PTS + duration\n            this.nextAudioPts = nextAudioPts = lastPTS + scaleFactor * lastSampleDuration;\n            // logger.log('Audio/PTS/PTSend:' + audioSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));\n            track.len = 0;\n            track.samples = outputSamples;\n            if (rawMPEG) {\n                moof = new Uint8Array();\n            }\n            else {\n                moof = mp4_generator_1.default.moof(track.sequenceNumber++, firstPTS / scaleFactor, track);\n            }\n            track.samples = [];\n            var start = firstPTS / inputTimeScale;\n            var end = nextAudioPts / inputTimeScale;\n            var audioData = {\n                data1: moof,\n                data2: mdat,\n                startPTS: start,\n                endPTS: end,\n                startDTS: start,\n                endDTS: end,\n                type: 'audio',\n                hasAudio: true,\n                hasVideo: false,\n                nb: nbSamples\n            };\n            this.observer.trigger(events_1.default.FRAG_PARSING_DATA, audioData);\n            return audioData;\n        }\n        return null;\n    };\n    MP4Remuxer.prototype.remuxEmptyAudio = function (track, timeOffset, contiguous, videoData) {\n        var inputTimeScale = track.inputTimeScale, mp4timeScale = track.samplerate ? track.samplerate : inputTimeScale, scaleFactor = inputTimeScale / mp4timeScale, nextAudioPts = this.nextAudioPts, \n        // sync with video's timestamp\n        startDTS = (nextAudioPts !== undefined ? nextAudioPts : videoData.startDTS * inputTimeScale) + this._initDTS, endDTS = videoData.endDTS * inputTimeScale + this._initDTS, \n        // one sample's duration value\n        sampleDuration = 1024, frameDuration = scaleFactor * sampleDuration, \n        // samples count of this segment's duration\n        nbSamples = Math.ceil((endDTS - startDTS) / frameDuration), \n        // silent frame\n        silentFrame = aac_helper_1.default.getSilentFrame(track.manifestCodec || track.codec, track.channelCount);\n        logger_1.logger.warn('remux empty Audio');\n        // Can't remux if we can't generate a silent frame...\n        if (!silentFrame) {\n            logger_1.logger.trace('Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!');\n            return;\n        }\n        var samples = [];\n        for (var i = 0; i < nbSamples; i++) {\n            var stamp = startDTS + i * frameDuration;\n            samples.push({ unit: silentFrame, pts: stamp, dts: stamp });\n            track.len += silentFrame.length;\n        }\n        track.samples = samples;\n        this.remuxAudio(track, timeOffset, contiguous);\n    };\n    MP4Remuxer.prototype.remuxID3 = function (track) {\n        var length = track.samples.length, sample;\n        var inputTimeScale = track.inputTimeScale;\n        var initPTS = this._initPTS;\n        var initDTS = this._initDTS;\n        // consume samples\n        if (length) {\n            for (var index = 0; index < length; index++) {\n                sample = track.samples[index];\n                // setting id3 pts, dts to relative time\n                // using this._initPTS and this._initDTS to calculate relative time\n                sample.pts = ((sample.pts - initPTS) / inputTimeScale);\n                sample.dts = ((sample.dts - initDTS) / inputTimeScale);\n            }\n            this.observer.trigger(events_1.default.FRAG_PARSING_METADATA, {\n                samples: track.samples\n            });\n        }\n        track.samples = [];\n    };\n    MP4Remuxer.prototype.remuxText = function (track) {\n        track.samples.sort(function (a, b) {\n            return (a.pts - b.pts);\n        });\n        var length = track.samples.length, sample;\n        var inputTimeScale = track.inputTimeScale;\n        var initPTS = this._initPTS;\n        // consume samples\n        if (length) {\n            for (var index = 0; index < length; index++) {\n                sample = track.samples[index];\n                // setting text pts, dts to relative time\n                // using this._initPTS and this._initDTS to calculate relative time\n                sample.pts = ((sample.pts - initPTS) / inputTimeScale);\n            }\n            this.observer.trigger(events_1.default.FRAG_PARSING_USERDATA, {\n                samples: track.samples\n            });\n        }\n        track.samples = [];\n    };\n    MP4Remuxer.prototype._PTSNormalize = function (value, reference) {\n        var offset;\n        if (reference === undefined) {\n            return value;\n        }\n        if (reference < value) {\n            // - 2^33\n            offset = -8589934592;\n        }\n        else {\n            // + 2^33\n            offset = 8589934592;\n        }\n        /* PTS is 33bit (from 0 to 2^33 -1)\n          if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n          PTS looping occured. fill the gap */\n        while (Math.abs(value - reference) > 4294967296) {\n            value += offset;\n        }\n        return value;\n    };\n    return MP4Remuxer;\n}());\nexports.default = MP4Remuxer;\n\n\n/***/ }),\n\n/***/ \"./src/remux/passthrough-remuxer.js\":\n/*!******************************************!*\\\n  !*** ./src/remux/passthrough-remuxer.js ***!\n  \\******************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * passthrough remuxer\n*/\nvar events_1 = __webpack_require__(/*! ../events */ \"./src/events.js\");\nvar PassThroughRemuxer = /** @class */ (function () {\n    function PassThroughRemuxer(observer) {\n        this.observer = observer;\n    }\n    PassThroughRemuxer.prototype.destroy = function () {\n    };\n    PassThroughRemuxer.prototype.resetTimeStamp = function () {\n    };\n    PassThroughRemuxer.prototype.resetInitSegment = function () {\n    };\n    PassThroughRemuxer.prototype.remux = function (audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset, rawData) {\n        var observer = this.observer;\n        var streamType = '';\n        if (audioTrack) {\n            streamType += 'audio';\n        }\n        if (videoTrack) {\n            streamType += 'video';\n        }\n        observer.trigger(events_1.default.FRAG_PARSING_DATA, {\n            data1: rawData,\n            startPTS: timeOffset,\n            startDTS: timeOffset,\n            type: streamType,\n            hasAudio: !!audioTrack,\n            hasVideo: !!videoTrack,\n            nb: 1,\n            dropped: 0\n        });\n        // notify end of parsing\n        observer.trigger(events_1.default.FRAG_PARSED);\n    };\n    return PassThroughRemuxer;\n}());\nexports.default = PassThroughRemuxer;\n\n\n/***/ }),\n\n/***/ \"./src/task-loop.js\":\n/*!**************************!*\\\n  !*** ./src/task-loop.js ***!\n  \\**************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar event_handler_1 = __webpack_require__(/*! ./event-handler */ \"./src/event-handler.js\");\n/**\n * Sub-class specialization of EventHandler base class.\n *\n * TaskLoop allows to schedule a task function being called (optionnaly repeatedly) on the main loop,\n * scheduled asynchroneously, avoiding recursive calls in the same tick.\n *\n * The task itself is implemented in `doTick`. It can be requested and called for single execution\n * using the `tick` method.\n *\n * It will be assured that the task execution method (`tick`) only gets called once per main loop \"tick\",\n * no matter how often it gets requested for execution. Execution in further ticks will be scheduled accordingly.\n *\n * If further execution requests have already been scheduled on the next tick, it can be checked with `hasNextTick`,\n * and cancelled with `clearNextTick`.\n *\n * The task can be scheduled as an interval repeatedly with a period as parameter (see `setInterval`, `clearInterval`).\n *\n * Sub-classes need to implement the `doTick` method which will effectively have the task execution routine.\n *\n * Further explanations:\n *\n * The baseclass has a `tick` method that will schedule the doTick call. It may be called synchroneously\n * only for a stack-depth of one. On re-entrant calls, sub-sequent calls are scheduled for next main loop ticks.\n *\n * When the task execution (`tick` method) is called in re-entrant way this is detected and\n * we are limiting the task execution per call stack to exactly one, but scheduling/post-poning further\n * task processing on the next main loop iteration (also known as \"next tick\" in the Node/JS runtime lingo).\n */\nvar TaskLoop = /** @class */ (function (_super) {\n    __extends(TaskLoop, _super);\n    function TaskLoop(hls) {\n        var events = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            events[_i - 1] = arguments[_i];\n        }\n        var _this = _super.apply(this, [hls].concat(events)) || this;\n        _this._tickInterval = null;\n        _this._tickTimer = null;\n        _this._tickCallCount = 0;\n        _this._boundTick = _this.tick.bind(_this);\n        return _this;\n    }\n    /**\n     * @override\n     */\n    TaskLoop.prototype.onHandlerDestroying = function () {\n        // clear all timers before unregistering from event bus\n        this.clearNextTick();\n        this.clearInterval();\n    };\n    /**\n     * @returns {boolean}\n     */\n    TaskLoop.prototype.hasInterval = function () {\n        return !!this._tickInterval;\n    };\n    /**\n     * @returns {boolean}\n     */\n    TaskLoop.prototype.hasNextTick = function () {\n        return !!this._tickTimer;\n    };\n    /**\n     * @param {number} millis Interval time (ms)\n     * @returns {boolean} True when interval has been scheduled, false when already scheduled (no effect)\n     */\n    TaskLoop.prototype.setInterval = function (millis) {\n        if (!this._tickInterval) {\n            this._tickInterval = setInterval(this._boundTick, millis);\n            return true;\n        }\n        return false;\n    };\n    /**\n     * @returns {boolean} True when interval was cleared, false when none was set (no effect)\n     */\n    TaskLoop.prototype.clearInterval = function () {\n        if (this._tickInterval) {\n            clearInterval(this._tickInterval);\n            this._tickInterval = null;\n            return true;\n        }\n        return false;\n    };\n    /**\n     * @returns {boolean} True when timeout was cleared, false when none was set (no effect)\n     */\n    TaskLoop.prototype.clearNextTick = function () {\n        if (this._tickTimer) {\n            clearTimeout(this._tickTimer);\n            this._tickTimer = null;\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Will call the subclass doTick implementation in this main loop tick\n     * or in the next one (via setTimeout(,0)) in case it has already been called\n     * in this tick (in case this is a re-entrant call).\n     */\n    TaskLoop.prototype.tick = function () {\n        this._tickCallCount++;\n        if (this._tickCallCount === 1) {\n            this.doTick();\n            // re-entrant call to tick from previous doTick call stack\n            // -> schedule a call on the next main loop iteration to process this task processing request\n            if (this._tickCallCount > 1) {\n                // make sure only one timer exists at any time at max\n                this.clearNextTick();\n                this._tickTimer = setTimeout(this._boundTick, 0);\n            }\n            this._tickCallCount = 0;\n        }\n    };\n    /**\n     * For subclass to implement task logic\n     * @abstract\n     */\n    TaskLoop.prototype.doTick = function () { };\n    return TaskLoop;\n}(event_handler_1.default));\nexports.default = TaskLoop;\n\n\n/***/ }),\n\n/***/ \"./src/utils/attr-list.js\":\n/*!********************************!*\\\n  !*** ./src/utils/attr-list.js ***!\n  \\********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DECIMAL_RESOLUTION_REGEX = /^(\\d+)x(\\d+)$/; // eslint-disable-line no-useless-escape\nvar ATTR_LIST_REGEX = /\\s*(.+?)\\s*=((?:\\\".*?\\\")|.*?)(?:,|$)/g; // eslint-disable-line no-useless-escape\n// adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js\nvar AttrList = /** @class */ (function () {\n    function AttrList(attrs) {\n        if (typeof attrs === 'string') {\n            attrs = AttrList.parseAttrList(attrs);\n        }\n        for (var attr in attrs) {\n            if (attrs.hasOwnProperty(attr)) {\n                this[attr] = attrs[attr];\n            }\n        }\n    }\n    AttrList.prototype.decimalInteger = function (attrName) {\n        var intValue = parseInt(this[attrName], 10);\n        if (intValue > Number.MAX_SAFE_INTEGER) {\n            return Infinity;\n        }\n        return intValue;\n    };\n    AttrList.prototype.hexadecimalInteger = function (attrName) {\n        if (this[attrName]) {\n            var stringValue = (this[attrName] || '0x').slice(2);\n            stringValue = ((stringValue.length & 1) ? '0' : '') + stringValue;\n            var value = new Uint8Array(stringValue.length / 2);\n            for (var i = 0; i < stringValue.length / 2; i++) {\n                value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);\n            }\n            return value;\n        }\n        else {\n            return null;\n        }\n    };\n    AttrList.prototype.hexadecimalIntegerAsNumber = function (attrName) {\n        var intValue = parseInt(this[attrName], 16);\n        if (intValue > Number.MAX_SAFE_INTEGER) {\n            return Infinity;\n        }\n        return intValue;\n    };\n    AttrList.prototype.decimalFloatingPoint = function (attrName) {\n        return parseFloat(this[attrName]);\n    };\n    AttrList.prototype.enumeratedString = function (attrName) {\n        return this[attrName];\n    };\n    AttrList.prototype.decimalResolution = function (attrName) {\n        var res = DECIMAL_RESOLUTION_REGEX.exec(this[attrName]);\n        if (res === null) {\n            return undefined;\n        }\n        return {\n            width: parseInt(res[1], 10),\n            height: parseInt(res[2], 10)\n        };\n    };\n    AttrList.parseAttrList = function (input) {\n        var match, attrs = {};\n        ATTR_LIST_REGEX.lastIndex = 0;\n        while ((match = ATTR_LIST_REGEX.exec(input)) !== null) {\n            var value = match[2], quote = '\"';\n            if (value.indexOf(quote) === 0 &&\n                value.lastIndexOf(quote) === (value.length - 1)) {\n                value = value.slice(1, -1);\n            }\n            attrs[match[1]] = value;\n        }\n        return attrs;\n    };\n    return AttrList;\n}());\nexports.default = AttrList;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/utils/binary-search.js\":\n/*!************************************!*\\\n  !*** ./src/utils/binary-search.js ***!\n  \\************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BinarySearch = {\n    /**\n       * Searches for an item in an array which matches a certain condition.\n       * This requires the condition to only match one item in the array,\n       * and for the array to be ordered.\n       *\n       * @param {Array} list The array to search.\n       * @param {Function} comparisonFunction\n       *      Called and provided a candidate item as the first argument.\n       *      Should return:\n       *          > -1 if the item should be located at a lower index than the provided item.\n       *          > 1 if the item should be located at a higher index than the provided item.\n       *          > 0 if the item is the item you're looking for.\n       *\n       * @return {*} The object if it is found or null otherwise.\n       */\n    search: function (list, comparisonFunction) {\n        var minIndex = 0;\n        var maxIndex = list.length - 1;\n        var currentIndex = null;\n        var currentElement = null;\n        while (minIndex <= maxIndex) {\n            currentIndex = (minIndex + maxIndex) / 2 | 0;\n            currentElement = list[currentIndex];\n            var comparisonResult = comparisonFunction(currentElement);\n            if (comparisonResult > 0) {\n                minIndex = currentIndex + 1;\n            }\n            else if (comparisonResult < 0) {\n                maxIndex = currentIndex - 1;\n            }\n            else {\n                return currentElement;\n            }\n        }\n        return null;\n    }\n};\nexports.default = BinarySearch;\n\n\n/***/ }),\n\n/***/ \"./src/utils/buffer-helper.js\":\n/*!************************************!*\\\n  !*** ./src/utils/buffer-helper.js ***!\n  \\************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @module BufferHelper\n *\n * Providing methods dealing with buffer length retrieval for example.\n *\n * In general, a helper around HTML5 MediaElement TimeRanges gathered from `buffered` property.\n *\n * Also @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BufferHelper = /** @class */ (function () {\n    function BufferHelper() {\n    }\n    /**\n     * Return true if `media`'s buffered include `position`\n     * @param {HTMLMediaElement|SourceBuffer} media\n     * @param {number} position\n     * @returns {boolean}\n     */\n    BufferHelper.isBuffered = function (media, position) {\n        try {\n            if (media) {\n                var buffered = media.buffered;\n                for (var i = 0; i < buffered.length; i++) {\n                    if (position >= buffered.start(i) && position <= buffered.end(i)) {\n                        return true;\n                    }\n                }\n            }\n        }\n        catch (error) {\n            // this is to catch\n            // InvalidStateError: Failed to read the 'buffered' property from 'SourceBuffer':\n            // This SourceBuffer has been removed from the parent media source\n        }\n        return false;\n    };\n    BufferHelper.bufferInfo = function (media, pos, maxHoleDuration) {\n        try {\n            if (media) {\n                var vbuffered = media.buffered, buffered = [], i = void 0;\n                for (i = 0; i < vbuffered.length; i++) {\n                    buffered.push({ start: vbuffered.start(i), end: vbuffered.end(i) });\n                }\n                return this.bufferedInfo(buffered, pos, maxHoleDuration);\n            }\n        }\n        catch (error) {\n            // this is to catch\n            // InvalidStateError: Failed to read the 'buffered' property from 'SourceBuffer':\n            // This SourceBuffer has been removed from the parent media source\n        }\n        return { len: 0, start: pos, end: pos, nextStart: undefined };\n    };\n    BufferHelper.bufferedInfo = function (buffered, pos, maxHoleDuration) {\n        var buffered2 = [], \n        // bufferStart and bufferEnd are buffer boundaries around current video position\n        bufferLen, bufferStart, bufferEnd, bufferStartNext, i;\n        // sort on buffer.start/smaller end (IE does not always return sorted buffered range)\n        buffered.sort(function (a, b) {\n            var diff = a.start - b.start;\n            if (diff) {\n                return diff;\n            }\n            else {\n                return b.end - a.end;\n            }\n        });\n        // there might be some small holes between buffer time range\n        // consider that holes smaller than maxHoleDuration are irrelevant and build another\n        // buffer time range representations that discards those holes\n        for (i = 0; i < buffered.length; i++) {\n            var buf2len = buffered2.length;\n            if (buf2len) {\n                var buf2end = buffered2[buf2len - 1].end;\n                // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)\n                if ((buffered[i].start - buf2end) < maxHoleDuration) {\n                    // merge overlapping time ranges\n                    // update lastRange.end only if smaller than item.end\n                    // e.g.  [ 1, 15] with  [ 2,8] => [ 1,15] (no need to modify lastRange.end)\n                    // whereas [ 1, 8] with  [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])\n                    if (buffered[i].end > buf2end) {\n                        buffered2[buf2len - 1].end = buffered[i].end;\n                    }\n                }\n                else {\n                    // big hole\n                    buffered2.push(buffered[i]);\n                }\n            }\n            else {\n                // first value\n                buffered2.push(buffered[i]);\n            }\n        }\n        for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {\n            var start = buffered2[i].start, end = buffered2[i].end;\n            // logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));\n            if ((pos + maxHoleDuration) >= start && pos < end) {\n                // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length\n                bufferStart = start;\n                bufferEnd = end;\n                bufferLen = bufferEnd - pos;\n            }\n            else if ((pos + maxHoleDuration) < start) {\n                bufferStartNext = start;\n                break;\n            }\n        }\n        return { len: bufferLen, start: bufferStart, end: bufferEnd, nextStart: bufferStartNext };\n    };\n    return BufferHelper;\n}());\nexports.BufferHelper = BufferHelper;\n\n\n/***/ }),\n\n/***/ \"./src/utils/cea-608-parser.js\":\n/*!*************************************!*\\\n  !*** ./src/utils/cea-608-parser.js ***!\n  \\*************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n *\n * This code was ported from the dash.js project at:\n *   https://github.com/Dash-Industry-Forum/dash.js/blob/development/externals/cea608-parser.js\n *   https://github.com/Dash-Industry-Forum/dash.js/commit/8269b26a761e0853bb21d78780ed945144ecdd4d#diff-71bc295a2d6b6b7093a1d3290d53a4b2\n *\n * The original copyright appears below:\n *\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2015-2016, DASH Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *  1. Redistributions of source code must retain the above copyright notice, this\n *  list of conditions and the following disclaimer.\n *  * Redistributions in binary form must reproduce the above copyright notice,\n *  this list of conditions and the following disclaimer in the documentation and/or\n *  other materials provided with the distribution.\n *  2. Neither the name of Dash Industry Forum nor the names of its\n *  contributors may be used to endorse or promote products derived from this software\n *  without specific prior written permission.\n *\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n *  POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n     *  Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\n     */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar specialCea608CharsCodes = {\n    0x2a: 0xe1,\n    0x5c: 0xe9,\n    0x5e: 0xed,\n    0x5f: 0xf3,\n    0x60: 0xfa,\n    0x7b: 0xe7,\n    0x7c: 0xf7,\n    0x7d: 0xd1,\n    0x7e: 0xf1,\n    0x7f: 0x2588,\n    // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n    // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\n    // THIS MEANS THAT \\x50 MUST BE ADDED TO THE VALUES\n    0x80: 0xae,\n    0x81: 0xb0,\n    0x82: 0xbd,\n    0x83: 0xbf,\n    0x84: 0x2122,\n    0x85: 0xa2,\n    0x86: 0xa3,\n    0x87: 0x266a,\n    0x88: 0xe0,\n    0x89: 0x20,\n    0x8a: 0xe8,\n    0x8b: 0xe2,\n    0x8c: 0xea,\n    0x8d: 0xee,\n    0x8e: 0xf4,\n    0x8f: 0xfb,\n    // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n    // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\n    0x90: 0xc1,\n    0x91: 0xc9,\n    0x92: 0xd3,\n    0x93: 0xda,\n    0x94: 0xdc,\n    0x95: 0xfc,\n    0x96: 0x2018,\n    0x97: 0xa1,\n    0x98: 0x2a,\n    0x99: 0x2019,\n    0x9a: 0x2501,\n    0x9b: 0xa9,\n    0x9c: 0x2120,\n    0x9d: 0x2022,\n    0x9e: 0x201c,\n    0x9f: 0x201d,\n    0xa0: 0xc0,\n    0xa1: 0xc2,\n    0xa2: 0xc7,\n    0xa3: 0xc8,\n    0xa4: 0xca,\n    0xa5: 0xcb,\n    0xa6: 0xeb,\n    0xa7: 0xce,\n    0xa8: 0xcf,\n    0xa9: 0xef,\n    0xaa: 0xd4,\n    0xab: 0xd9,\n    0xac: 0xf9,\n    0xad: 0xdb,\n    0xae: 0xab,\n    0xaf: 0xbb,\n    // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n    // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\n    0xb0: 0xc3,\n    0xb1: 0xe3,\n    0xb2: 0xcd,\n    0xb3: 0xcc,\n    0xb4: 0xec,\n    0xb5: 0xd2,\n    0xb6: 0xf2,\n    0xb7: 0xd5,\n    0xb8: 0xf5,\n    0xb9: 0x7b,\n    0xba: 0x7d,\n    0xbb: 0x5c,\n    0xbc: 0x5e,\n    0xbd: 0x5f,\n    0xbe: 0x7c,\n    0xbf: 0x223c,\n    0xc0: 0xc4,\n    0xc1: 0xe4,\n    0xc2: 0xd6,\n    0xc3: 0xf6,\n    0xc4: 0xdf,\n    0xc5: 0xa5,\n    0xc6: 0xa4,\n    0xc7: 0x2503,\n    0xc8: 0xc5,\n    0xc9: 0xe5,\n    0xca: 0xd8,\n    0xcb: 0xf8,\n    0xcc: 0x250f,\n    0xcd: 0x2513,\n    0xce: 0x2517,\n    0xcf: 0x251b // Box drawings heavy up and left\n};\n/**\n * Utils\n */\nvar getCharForByte = function (byte) {\n    var charCode = byte;\n    if (specialCea608CharsCodes.hasOwnProperty(byte)) {\n        charCode = specialCea608CharsCodes[byte];\n    }\n    return String.fromCharCode(charCode);\n};\nvar NR_ROWS = 15, NR_COLS = 100;\n// Tables to look up row from PAC data\nvar rowsLowCh1 = { 0x11: 1, 0x12: 3, 0x15: 5, 0x16: 7, 0x17: 9, 0x10: 11, 0x13: 12, 0x14: 14 };\nvar rowsHighCh1 = { 0x11: 2, 0x12: 4, 0x15: 6, 0x16: 8, 0x17: 10, 0x13: 13, 0x14: 15 };\nvar rowsLowCh2 = { 0x19: 1, 0x1A: 3, 0x1D: 5, 0x1E: 7, 0x1F: 9, 0x18: 11, 0x1B: 12, 0x1C: 14 };\nvar rowsHighCh2 = { 0x19: 2, 0x1A: 4, 0x1D: 6, 0x1E: 8, 0x1F: 10, 0x1B: 13, 0x1C: 15 };\nvar backgroundColors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'black', 'transparent'];\n/**\n * Simple logger class to be able to write with time-stamps and filter on level.\n */\nvar logger = {\n    verboseFilter: { 'DATA': 3, 'DEBUG': 3, 'INFO': 2, 'WARNING': 2, 'TEXT': 1, 'ERROR': 0 },\n    time: null,\n    verboseLevel: 0,\n    setTime: function (newTime) {\n        this.time = newTime;\n    },\n    log: function (severity, msg) {\n        var minLevel = this.verboseFilter[severity];\n        if (this.verboseLevel >= minLevel) {\n            // console.log(this.time + ' [' + severity + '] ' + msg);\n        }\n    }\n};\nvar numArrayToHexArray = function (numArray) {\n    var hexArray = [];\n    for (var j = 0; j < numArray.length; j++) {\n        hexArray.push(numArray[j].toString(16));\n    }\n    return hexArray;\n};\nvar PenState = /** @class */ (function () {\n    function PenState(foreground, underline, italics, background, flash) {\n        this.foreground = foreground || 'white';\n        this.underline = underline || false;\n        this.italics = italics || false;\n        this.background = background || 'black';\n        this.flash = flash || false;\n    }\n    PenState.prototype.reset = function () {\n        this.foreground = 'white';\n        this.underline = false;\n        this.italics = false;\n        this.background = 'black';\n        this.flash = false;\n    };\n    PenState.prototype.setStyles = function (styles) {\n        var attribs = ['foreground', 'underline', 'italics', 'background', 'flash'];\n        for (var i = 0; i < attribs.length; i++) {\n            var style = attribs[i];\n            if (styles.hasOwnProperty(style)) {\n                this[style] = styles[style];\n            }\n        }\n    };\n    PenState.prototype.isDefault = function () {\n        return (this.foreground === 'white' && !this.underline && !this.italics &&\n            this.background === 'black' && !this.flash);\n    };\n    PenState.prototype.equals = function (other) {\n        return ((this.foreground === other.foreground) &&\n            (this.underline === other.underline) &&\n            (this.italics === other.italics) &&\n            (this.background === other.background) &&\n            (this.flash === other.flash));\n    };\n    PenState.prototype.copy = function (newPenState) {\n        this.foreground = newPenState.foreground;\n        this.underline = newPenState.underline;\n        this.italics = newPenState.italics;\n        this.background = newPenState.background;\n        this.flash = newPenState.flash;\n    };\n    PenState.prototype.toString = function () {\n        return ('color=' + this.foreground + ', underline=' + this.underline + ', italics=' + this.italics +\n            ', background=' + this.background + ', flash=' + this.flash);\n    };\n    return PenState;\n}());\n/**\n * Unicode character with styling and background.\n * @constructor\n */\nvar StyledUnicodeChar = /** @class */ (function () {\n    function StyledUnicodeChar(uchar, foreground, underline, italics, background, flash) {\n        this.uchar = uchar || ' '; // unicode character\n        this.penState = new PenState(foreground, underline, italics, background, flash);\n    }\n    StyledUnicodeChar.prototype.reset = function () {\n        this.uchar = ' ';\n        this.penState.reset();\n    };\n    StyledUnicodeChar.prototype.setChar = function (uchar, newPenState) {\n        this.uchar = uchar;\n        this.penState.copy(newPenState);\n    };\n    StyledUnicodeChar.prototype.setPenState = function (newPenState) {\n        this.penState.copy(newPenState);\n    };\n    StyledUnicodeChar.prototype.equals = function (other) {\n        return this.uchar === other.uchar && this.penState.equals(other.penState);\n    };\n    StyledUnicodeChar.prototype.copy = function (newChar) {\n        this.uchar = newChar.uchar;\n        this.penState.copy(newChar.penState);\n    };\n    StyledUnicodeChar.prototype.isEmpty = function () {\n        return this.uchar === ' ' && this.penState.isDefault();\n    };\n    return StyledUnicodeChar;\n}());\n/**\n * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\n * @constructor\n */\nvar Row = /** @class */ (function () {\n    function Row() {\n        this.chars = [];\n        for (var i = 0; i < NR_COLS; i++) {\n            this.chars.push(new StyledUnicodeChar());\n        }\n        this.pos = 0;\n        this.currPenState = new PenState();\n    }\n    Row.prototype.equals = function (other) {\n        var equal = true;\n        for (var i = 0; i < NR_COLS; i++) {\n            if (!this.chars[i].equals(other.chars[i])) {\n                equal = false;\n                break;\n            }\n        }\n        return equal;\n    };\n    Row.prototype.copy = function (other) {\n        for (var i = 0; i < NR_COLS; i++) {\n            this.chars[i].copy(other.chars[i]);\n        }\n    };\n    Row.prototype.isEmpty = function () {\n        var empty = true;\n        for (var i = 0; i < NR_COLS; i++) {\n            if (!this.chars[i].isEmpty()) {\n                empty = false;\n                break;\n            }\n        }\n        return empty;\n    };\n    /**\n       *  Set the cursor to a valid column.\n       */\n    Row.prototype.setCursor = function (absPos) {\n        if (this.pos !== absPos) {\n            this.pos = absPos;\n        }\n        if (this.pos < 0) {\n            logger.log('ERROR', 'Negative cursor position ' + this.pos);\n            this.pos = 0;\n        }\n        else if (this.pos > NR_COLS) {\n            logger.log('ERROR', 'Too large cursor position ' + this.pos);\n            this.pos = NR_COLS;\n        }\n    };\n    /**\n       * Move the cursor relative to current position.\n       */\n    Row.prototype.moveCursor = function (relPos) {\n        var newPos = this.pos + relPos;\n        if (relPos > 1) {\n            for (var i = this.pos + 1; i < newPos + 1; i++) {\n                this.chars[i].setPenState(this.currPenState);\n            }\n        }\n        this.setCursor(newPos);\n    };\n    /**\n       * Backspace, move one step back and clear character.\n       */\n    Row.prototype.backSpace = function () {\n        this.moveCursor(-1);\n        this.chars[this.pos].setChar(' ', this.currPenState);\n    };\n    Row.prototype.insertChar = function (byte) {\n        if (byte >= 0x90) { // Extended char\n            this.backSpace();\n        }\n        var char = getCharForByte(byte);\n        if (this.pos >= NR_COLS) {\n            logger.log('ERROR', 'Cannot insert ' + byte.toString(16) +\n                ' (' + char + ') at position ' + this.pos + '. Skipping it!');\n            return;\n        }\n        this.chars[this.pos].setChar(char, this.currPenState);\n        this.moveCursor(1);\n    };\n    Row.prototype.clearFromPos = function (startPos) {\n        var i;\n        for (i = startPos; i < NR_COLS; i++) {\n            this.chars[i].reset();\n        }\n    };\n    Row.prototype.clear = function () {\n        this.clearFromPos(0);\n        this.pos = 0;\n        this.currPenState.reset();\n    };\n    Row.prototype.clearToEndOfRow = function () {\n        this.clearFromPos(this.pos);\n    };\n    Row.prototype.getTextString = function () {\n        var chars = [];\n        var empty = true;\n        for (var i = 0; i < NR_COLS; i++) {\n            var char = this.chars[i].uchar;\n            if (char !== ' ') {\n                empty = false;\n            }\n            chars.push(char);\n        }\n        if (empty) {\n            return '';\n        }\n        else {\n            return chars.join('');\n        }\n    };\n    Row.prototype.setPenStyles = function (styles) {\n        this.currPenState.setStyles(styles);\n        var currChar = this.chars[this.pos];\n        currChar.setPenState(this.currPenState);\n    };\n    return Row;\n}());\n/**\n * Keep a CEA-608 screen of 32x15 styled characters\n * @constructor\n*/\nvar CaptionScreen = /** @class */ (function () {\n    function CaptionScreen() {\n        this.rows = [];\n        for (var i = 0; i < NR_ROWS; i++) {\n            this.rows.push(new Row());\n        } // Note that we use zero-based numbering (0-14)\n        this.currRow = NR_ROWS - 1;\n        this.nrRollUpRows = null;\n        this.reset();\n    }\n    CaptionScreen.prototype.reset = function () {\n        for (var i = 0; i < NR_ROWS; i++) {\n            this.rows[i].clear();\n        }\n        this.currRow = NR_ROWS - 1;\n    };\n    CaptionScreen.prototype.equals = function (other) {\n        var equal = true;\n        for (var i = 0; i < NR_ROWS; i++) {\n            if (!this.rows[i].equals(other.rows[i])) {\n                equal = false;\n                break;\n            }\n        }\n        return equal;\n    };\n    CaptionScreen.prototype.copy = function (other) {\n        for (var i = 0; i < NR_ROWS; i++) {\n            this.rows[i].copy(other.rows[i]);\n        }\n    };\n    CaptionScreen.prototype.isEmpty = function () {\n        var empty = true;\n        for (var i = 0; i < NR_ROWS; i++) {\n            if (!this.rows[i].isEmpty()) {\n                empty = false;\n                break;\n            }\n        }\n        return empty;\n    };\n    CaptionScreen.prototype.backSpace = function () {\n        var row = this.rows[this.currRow];\n        row.backSpace();\n    };\n    CaptionScreen.prototype.clearToEndOfRow = function () {\n        var row = this.rows[this.currRow];\n        row.clearToEndOfRow();\n    };\n    /**\n       * Insert a character (without styling) in the current row.\n       */\n    CaptionScreen.prototype.insertChar = function (char) {\n        var row = this.rows[this.currRow];\n        row.insertChar(char);\n    };\n    CaptionScreen.prototype.setPen = function (styles) {\n        var row = this.rows[this.currRow];\n        row.setPenStyles(styles);\n    };\n    CaptionScreen.prototype.moveCursor = function (relPos) {\n        var row = this.rows[this.currRow];\n        row.moveCursor(relPos);\n    };\n    CaptionScreen.prototype.setCursor = function (absPos) {\n        logger.log('INFO', 'setCursor: ' + absPos);\n        var row = this.rows[this.currRow];\n        row.setCursor(absPos);\n    };\n    CaptionScreen.prototype.setPAC = function (pacData) {\n        logger.log('INFO', 'pacData = ' + JSON.stringify(pacData));\n        var newRow = pacData.row - 1;\n        if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {\n            newRow = this.nrRollUpRows - 1;\n        }\n        // Make sure this only affects Roll-up Captions by checking this.nrRollUpRows\n        if (this.nrRollUpRows && this.currRow !== newRow) {\n            // clear all rows first\n            for (var i = 0; i < NR_ROWS; i++) {\n                this.rows[i].clear();\n            }\n            // Copy this.nrRollUpRows rows from lastOutputScreen and place it in the newRow location\n            // topRowIndex - the start of rows to copy (inclusive index)\n            var topRowIndex = this.currRow + 1 - (this.nrRollUpRows);\n            // We only copy if the last position was already shown.\n            // We use the cueStartTime value to check this.\n            var lastOutputScreen = this.lastOutputScreen;\n            if (lastOutputScreen) {\n                var prevLineTime = lastOutputScreen.rows[topRowIndex].cueStartTime;\n                if (prevLineTime && prevLineTime < logger.time) {\n                    for (var i = 0; i < this.nrRollUpRows; i++) {\n                        this.rows[newRow - this.nrRollUpRows + i + 1].copy(lastOutputScreen.rows[topRowIndex + i]);\n                    }\n                }\n            }\n        }\n        this.currRow = newRow;\n        var row = this.rows[this.currRow];\n        if (pacData.indent !== null) {\n            var indent = pacData.indent;\n            var prevPos = Math.max(indent - 1, 0);\n            row.setCursor(pacData.indent);\n            pacData.color = row.chars[prevPos].penState.foreground;\n        }\n        var styles = { foreground: pacData.color, underline: pacData.underline, italics: pacData.italics, background: 'black', flash: false };\n        this.setPen(styles);\n    };\n    /**\n       * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n       */\n    CaptionScreen.prototype.setBkgData = function (bkgData) {\n        logger.log('INFO', 'bkgData = ' + JSON.stringify(bkgData));\n        this.backSpace();\n        this.setPen(bkgData);\n        this.insertChar(0x20); // Space\n    };\n    CaptionScreen.prototype.setRollUpRows = function (nrRows) {\n        this.nrRollUpRows = nrRows;\n    };\n    CaptionScreen.prototype.rollUp = function () {\n        if (this.nrRollUpRows === null) {\n            logger.log('DEBUG', 'roll_up but nrRollUpRows not set yet');\n            return; // Not properly setup\n        }\n        logger.log('TEXT', this.getDisplayText());\n        var topRowIndex = this.currRow + 1 - this.nrRollUpRows;\n        var topRow = this.rows.splice(topRowIndex, 1)[0];\n        topRow.clear();\n        this.rows.splice(this.currRow, 0, topRow);\n        logger.log('INFO', 'Rolling up');\n        // logger.log('TEXT', this.get_display_text())\n    };\n    /**\n      * Get all non-empty rows with as unicode text.\n      */\n    CaptionScreen.prototype.getDisplayText = function (asOneRow) {\n        asOneRow = asOneRow || false;\n        var displayText = [];\n        var text = '';\n        var rowNr = -1;\n        for (var i = 0; i < NR_ROWS; i++) {\n            var rowText = this.rows[i].getTextString();\n            if (rowText) {\n                rowNr = i + 1;\n                if (asOneRow) {\n                    displayText.push('Row ' + rowNr + ': \\'' + rowText + '\\'');\n                }\n                else {\n                    displayText.push(rowText.trim());\n                }\n            }\n        }\n        if (displayText.length > 0) {\n            if (asOneRow) {\n                text = '[' + displayText.join(' | ') + ']';\n            }\n            else {\n                text = displayText.join('\\n');\n            }\n        }\n        return text;\n    };\n    CaptionScreen.prototype.getTextAndFormat = function () {\n        return this.rows;\n    };\n    return CaptionScreen;\n}());\n// var modes = ['MODE_ROLL-UP', 'MODE_POP-ON', 'MODE_PAINT-ON', 'MODE_TEXT'];\nvar Cea608Channel = /** @class */ (function () {\n    function Cea608Channel(channelNumber, outputFilter) {\n        this.chNr = channelNumber;\n        this.outputFilter = outputFilter;\n        this.mode = null;\n        this.verbose = 0;\n        this.displayedMemory = new CaptionScreen();\n        this.nonDisplayedMemory = new CaptionScreen();\n        this.lastOutputScreen = new CaptionScreen();\n        this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n        this.writeScreen = this.displayedMemory;\n        this.mode = null;\n        this.cueStartTime = null; // Keeps track of where a cue started.\n    }\n    Cea608Channel.prototype.reset = function () {\n        this.mode = null;\n        this.displayedMemory.reset();\n        this.nonDisplayedMemory.reset();\n        this.lastOutputScreen.reset();\n        this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n        this.writeScreen = this.displayedMemory;\n        this.mode = null;\n        this.cueStartTime = null;\n        this.lastCueEndTime = null;\n    };\n    Cea608Channel.prototype.getHandler = function () {\n        return this.outputFilter;\n    };\n    Cea608Channel.prototype.setHandler = function (newHandler) {\n        this.outputFilter = newHandler;\n    };\n    Cea608Channel.prototype.setPAC = function (pacData) {\n        this.writeScreen.setPAC(pacData);\n    };\n    Cea608Channel.prototype.setBkgData = function (bkgData) {\n        this.writeScreen.setBkgData(bkgData);\n    };\n    Cea608Channel.prototype.setMode = function (newMode) {\n        if (newMode === this.mode) {\n            return;\n        }\n        this.mode = newMode;\n        logger.log('INFO', 'MODE=' + newMode);\n        if (this.mode === 'MODE_POP-ON') {\n            this.writeScreen = this.nonDisplayedMemory;\n        }\n        else {\n            this.writeScreen = this.displayedMemory;\n            this.writeScreen.reset();\n        }\n        if (this.mode !== 'MODE_ROLL-UP') {\n            this.displayedMemory.nrRollUpRows = null;\n            this.nonDisplayedMemory.nrRollUpRows = null;\n        }\n        this.mode = newMode;\n    };\n    Cea608Channel.prototype.insertChars = function (chars) {\n        for (var i = 0; i < chars.length; i++) {\n            this.writeScreen.insertChar(chars[i]);\n        }\n        var screen = this.writeScreen === this.displayedMemory ? 'DISP' : 'NON_DISP';\n        logger.log('INFO', screen + ': ' + this.writeScreen.getDisplayText(true));\n        if (this.mode === 'MODE_PAINT-ON' || this.mode === 'MODE_ROLL-UP') {\n            logger.log('TEXT', 'DISPLAYED: ' + this.displayedMemory.getDisplayText(true));\n            this.outputDataUpdate();\n        }\n    };\n    Cea608Channel.prototype.ccRCL = function () {\n        logger.log('INFO', 'RCL - Resume Caption Loading');\n        this.setMode('MODE_POP-ON');\n    };\n    Cea608Channel.prototype.ccBS = function () {\n        logger.log('INFO', 'BS - BackSpace');\n        if (this.mode === 'MODE_TEXT') {\n            return;\n        }\n        this.writeScreen.backSpace();\n        if (this.writeScreen === this.displayedMemory) {\n            this.outputDataUpdate();\n        }\n    };\n    Cea608Channel.prototype.ccAOF = function () {\n    };\n    Cea608Channel.prototype.ccAON = function () {\n    };\n    Cea608Channel.prototype.ccDER = function () {\n        logger.log('INFO', 'DER- Delete to End of Row');\n        this.writeScreen.clearToEndOfRow();\n        this.outputDataUpdate();\n    };\n    Cea608Channel.prototype.ccRU = function (nrRows) {\n        logger.log('INFO', 'RU(' + nrRows + ') - Roll Up');\n        this.writeScreen = this.displayedMemory;\n        this.setMode('MODE_ROLL-UP');\n        this.writeScreen.setRollUpRows(nrRows);\n    };\n    Cea608Channel.prototype.ccFON = function () {\n        logger.log('INFO', 'FON - Flash On');\n        this.writeScreen.setPen({ flash: true });\n    };\n    Cea608Channel.prototype.ccRDC = function () {\n        logger.log('INFO', 'RDC - Resume Direct Captioning');\n        this.setMode('MODE_PAINT-ON');\n    };\n    Cea608Channel.prototype.ccTR = function () {\n        logger.log('INFO', 'TR');\n        this.setMode('MODE_TEXT');\n    };\n    Cea608Channel.prototype.ccRTD = function () {\n        logger.log('INFO', 'RTD');\n        this.setMode('MODE_TEXT');\n    };\n    Cea608Channel.prototype.ccEDM = function () {\n        logger.log('INFO', 'EDM - Erase Displayed Memory');\n        this.displayedMemory.reset();\n        this.outputDataUpdate(true);\n    };\n    Cea608Channel.prototype.ccCR = function () {\n        logger.log('CR - Carriage Return');\n        this.writeScreen.rollUp();\n        this.outputDataUpdate(true);\n    };\n    Cea608Channel.prototype.ccENM = function () {\n        logger.log('INFO', 'ENM - Erase Non-displayed Memory');\n        this.nonDisplayedMemory.reset();\n    };\n    Cea608Channel.prototype.ccEOC = function () {\n        logger.log('INFO', 'EOC - End Of Caption');\n        if (this.mode === 'MODE_POP-ON') {\n            var tmp = this.displayedMemory;\n            this.displayedMemory = this.nonDisplayedMemory;\n            this.nonDisplayedMemory = tmp;\n            this.writeScreen = this.nonDisplayedMemory;\n            logger.log('TEXT', 'DISP: ' + this.displayedMemory.getDisplayText());\n        }\n        this.outputDataUpdate(true);\n    };\n    Cea608Channel.prototype.ccTO = function (nrCols) {\n        logger.log('INFO', 'TO(' + nrCols + ') - Tab Offset');\n        this.writeScreen.moveCursor(nrCols);\n    };\n    Cea608Channel.prototype.ccMIDROW = function (secondByte) {\n        var styles = { flash: false };\n        styles.underline = secondByte % 2 === 1;\n        styles.italics = secondByte >= 0x2e;\n        if (!styles.italics) {\n            var colorIndex = Math.floor(secondByte / 2) - 0x10;\n            var colors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta'];\n            styles.foreground = colors[colorIndex];\n        }\n        else {\n            styles.foreground = 'white';\n        }\n        logger.log('INFO', 'MIDROW: ' + JSON.stringify(styles));\n        this.writeScreen.setPen(styles);\n    };\n    Cea608Channel.prototype.outputDataUpdate = function (dispatch) {\n        if (dispatch === void 0) { dispatch = false; }\n        var t = logger.time;\n        if (t === null) {\n            return;\n        }\n        if (this.outputFilter) {\n            if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) { // Start of a new cue\n                this.cueStartTime = t;\n            }\n            else {\n                if (!this.displayedMemory.equals(this.lastOutputScreen)) {\n                    if (this.outputFilter.newCue) {\n                        this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen);\n                        if (dispatch === true && this.outputFilter.dispatchCue) {\n                            this.outputFilter.dispatchCue();\n                        }\n                    }\n                    this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;\n                }\n            }\n            this.lastOutputScreen.copy(this.displayedMemory);\n        }\n    };\n    Cea608Channel.prototype.cueSplitAtTime = function (t) {\n        if (this.outputFilter) {\n            if (!this.displayedMemory.isEmpty()) {\n                if (this.outputFilter.newCue) {\n                    this.outputFilter.newCue(this.cueStartTime, t, this.displayedMemory);\n                }\n                this.cueStartTime = t;\n            }\n        }\n    };\n    return Cea608Channel;\n}());\nvar Cea608Parser = /** @class */ (function () {\n    function Cea608Parser(field, out1, out2) {\n        this.field = field || 1;\n        this.outputs = [out1, out2];\n        this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];\n        this.currChNr = -1; // Will be 1 or 2\n        this.lastCmdA = null; // First byte of last command\n        this.lastCmdB = null; // Second byte of last command\n        this.bufferedData = [];\n        this.startTime = null;\n        this.lastTime = null;\n        this.dataCounters = { 'padding': 0, 'char': 0, 'cmd': 0, 'other': 0 };\n    }\n    Cea608Parser.prototype.getHandler = function (index) {\n        return this.channels[index].getHandler();\n    };\n    Cea608Parser.prototype.setHandler = function (index, newHandler) {\n        this.channels[index].setHandler(newHandler);\n    };\n    /**\n       * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n       */\n    Cea608Parser.prototype.addData = function (t, byteList) {\n        var cmdFound, a, b, charsFound = false;\n        this.lastTime = t;\n        logger.setTime(t);\n        for (var i = 0; i < byteList.length; i += 2) {\n            a = byteList[i] & 0x7f;\n            b = byteList[i + 1] & 0x7f;\n            if (a === 0 && b === 0) {\n                this.dataCounters.padding += 2;\n                continue;\n            }\n            else {\n                logger.log('DATA', '[' + numArrayToHexArray([byteList[i], byteList[i + 1]]) + '] -> (' + numArrayToHexArray([a, b]) + ')');\n            }\n            cmdFound = this.parseCmd(a, b);\n            if (!cmdFound) {\n                cmdFound = this.parseMidrow(a, b);\n            }\n            if (!cmdFound) {\n                cmdFound = this.parsePAC(a, b);\n            }\n            if (!cmdFound) {\n                cmdFound = this.parseBackgroundAttributes(a, b);\n            }\n            if (!cmdFound) {\n                charsFound = this.parseChars(a, b);\n                if (charsFound) {\n                    if (this.currChNr && this.currChNr >= 0) {\n                        var channel = this.channels[this.currChNr - 1];\n                        channel.insertChars(charsFound);\n                    }\n                    else {\n                        logger.log('WARNING', 'No channel found yet. TEXT-MODE?');\n                    }\n                }\n            }\n            if (cmdFound) {\n                this.dataCounters.cmd += 2;\n            }\n            else if (charsFound) {\n                this.dataCounters.char += 2;\n            }\n            else {\n                this.dataCounters.other += 2;\n                logger.log('WARNING', 'Couldn\\'t parse cleaned data ' + numArrayToHexArray([a, b]) +\n                    ' orig: ' + numArrayToHexArray([byteList[i], byteList[i + 1]]));\n            }\n        }\n    };\n    /**\n       * Parse Command.\n       * @returns {Boolean} Tells if a command was found\n       */\n    Cea608Parser.prototype.parseCmd = function (a, b) {\n        var chNr = null;\n        var cond1 = (a === 0x14 || a === 0x1C) && (b >= 0x20 && b <= 0x2F);\n        var cond2 = (a === 0x17 || a === 0x1F) && (b >= 0x21 && b <= 0x23);\n        if (!(cond1 || cond2)) {\n            return false;\n        }\n        if (a === this.lastCmdA && b === this.lastCmdB) {\n            this.lastCmdA = null;\n            this.lastCmdB = null; // Repeated commands are dropped (once)\n            logger.log('DEBUG', 'Repeated command (' + numArrayToHexArray([a, b]) + ') is dropped');\n            return true;\n        }\n        if (a === 0x14 || a === 0x17) {\n            chNr = 1;\n        }\n        else {\n            chNr = 2;\n        } // (a === 0x1C || a=== 0x1f)\n        var channel = this.channels[chNr - 1];\n        if (a === 0x14 || a === 0x1C) {\n            if (b === 0x20) {\n                channel.ccRCL();\n            }\n            else if (b === 0x21) {\n                channel.ccBS();\n            }\n            else if (b === 0x22) {\n                channel.ccAOF();\n            }\n            else if (b === 0x23) {\n                channel.ccAON();\n            }\n            else if (b === 0x24) {\n                channel.ccDER();\n            }\n            else if (b === 0x25) {\n                channel.ccRU(2);\n            }\n            else if (b === 0x26) {\n                channel.ccRU(3);\n            }\n            else if (b === 0x27) {\n                channel.ccRU(4);\n            }\n            else if (b === 0x28) {\n                channel.ccFON();\n            }\n            else if (b === 0x29) {\n                channel.ccRDC();\n            }\n            else if (b === 0x2A) {\n                channel.ccTR();\n            }\n            else if (b === 0x2B) {\n                channel.ccRTD();\n            }\n            else if (b === 0x2C) {\n                channel.ccEDM();\n            }\n            else if (b === 0x2D) {\n                channel.ccCR();\n            }\n            else if (b === 0x2E) {\n                channel.ccENM();\n            }\n            else if (b === 0x2F) {\n                channel.ccEOC();\n            }\n        }\n        else { // a == 0x17 || a == 0x1F\n            channel.ccTO(b - 0x20);\n        }\n        this.lastCmdA = a;\n        this.lastCmdB = b;\n        this.currChNr = chNr;\n        return true;\n    };\n    /**\n       * Parse midrow styling command\n       * @returns {Boolean}\n       */\n    Cea608Parser.prototype.parseMidrow = function (a, b) {\n        var chNr = null;\n        if (((a === 0x11) || (a === 0x19)) && b >= 0x20 && b <= 0x2f) {\n            if (a === 0x11) {\n                chNr = 1;\n            }\n            else {\n                chNr = 2;\n            }\n            if (chNr !== this.currChNr) {\n                logger.log('ERROR', 'Mismatch channel in midrow parsing');\n                return false;\n            }\n            var channel = this.channels[chNr - 1];\n            channel.ccMIDROW(b);\n            logger.log('DEBUG', 'MIDROW (' + numArrayToHexArray([a, b]) + ')');\n            return true;\n        }\n        return false;\n    };\n    /**\n       * Parse Preable Access Codes (Table 53).\n       * @returns {Boolean} Tells if PAC found\n       */\n    Cea608Parser.prototype.parsePAC = function (a, b) {\n        var chNr = null;\n        var row = null;\n        var case1 = ((a >= 0x11 && a <= 0x17) || (a >= 0x19 && a <= 0x1F)) && (b >= 0x40 && b <= 0x7F);\n        var case2 = (a === 0x10 || a === 0x18) && (b >= 0x40 && b <= 0x5F);\n        if (!(case1 || case2)) {\n            return false;\n        }\n        if (a === this.lastCmdA && b === this.lastCmdB) {\n            this.lastCmdA = null;\n            this.lastCmdB = null;\n            return true; // Repeated commands are dropped (once)\n        }\n        chNr = (a <= 0x17) ? 1 : 2;\n        if (b >= 0x40 && b <= 0x5F) {\n            row = (chNr === 1) ? rowsLowCh1[a] : rowsLowCh2[a];\n        }\n        else { // 0x60 <= b <= 0x7F\n            row = (chNr === 1) ? rowsHighCh1[a] : rowsHighCh2[a];\n        }\n        var pacData = this.interpretPAC(row, b);\n        var channel = this.channels[chNr - 1];\n        channel.setPAC(pacData);\n        this.lastCmdA = a;\n        this.lastCmdB = b;\n        this.currChNr = chNr;\n        return true;\n    };\n    /**\n       * Interpret the second byte of the pac, and return the information.\n       * @returns {Object} pacData with style parameters.\n       */\n    Cea608Parser.prototype.interpretPAC = function (row, byte) {\n        var pacIndex = byte;\n        var pacData = { color: null, italics: false, indent: null, underline: false, row: row };\n        if (byte > 0x5F) {\n            pacIndex = byte - 0x60;\n        }\n        else {\n            pacIndex = byte - 0x40;\n        }\n        pacData.underline = (pacIndex & 1) === 1;\n        if (pacIndex <= 0xd) {\n            pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex / 2)];\n        }\n        else if (pacIndex <= 0xf) {\n            pacData.italics = true;\n            pacData.color = 'white';\n        }\n        else {\n            pacData.indent = (Math.floor((pacIndex - 0x10) / 2)) * 4;\n        }\n        return pacData; // Note that row has zero offset. The spec uses 1.\n    };\n    /**\n       * Parse characters.\n       * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n       */\n    Cea608Parser.prototype.parseChars = function (a, b) {\n        var channelNr = null, charCodes = null, charCode1 = null;\n        if (a >= 0x19) {\n            channelNr = 2;\n            charCode1 = a - 8;\n        }\n        else {\n            channelNr = 1;\n            charCode1 = a;\n        }\n        if (charCode1 >= 0x11 && charCode1 <= 0x13) {\n            // Special character\n            var oneCode = b;\n            if (charCode1 === 0x11) {\n                oneCode = b + 0x50;\n            }\n            else if (charCode1 === 0x12) {\n                oneCode = b + 0x70;\n            }\n            else {\n                oneCode = b + 0x90;\n            }\n            logger.log('INFO', 'Special char \\'' + getCharForByte(oneCode) + '\\' in channel ' + channelNr);\n            charCodes = [oneCode];\n        }\n        else if (a >= 0x20 && a <= 0x7f) {\n            charCodes = (b === 0) ? [a] : [a, b];\n        }\n        if (charCodes) {\n            var hexCodes = numArrayToHexArray(charCodes);\n            logger.log('DEBUG', 'Char codes =  ' + hexCodes.join(','));\n            this.lastCmdA = null;\n            this.lastCmdB = null;\n        }\n        return charCodes;\n    };\n    /**\n      * Parse extended background attributes as well as new foreground color black.\n      * @returns{Boolean} Tells if background attributes are found\n      */\n    Cea608Parser.prototype.parseBackgroundAttributes = function (a, b) {\n        var bkgData, index, chNr, channel;\n        var case1 = (a === 0x10 || a === 0x18) && (b >= 0x20 && b <= 0x2f);\n        var case2 = (a === 0x17 || a === 0x1f) && (b >= 0x2d && b <= 0x2f);\n        if (!(case1 || case2)) {\n            return false;\n        }\n        bkgData = {};\n        if (a === 0x10 || a === 0x18) {\n            index = Math.floor((b - 0x20) / 2);\n            bkgData.background = backgroundColors[index];\n            if (b % 2 === 1) {\n                bkgData.background = bkgData.background + '_semi';\n            }\n        }\n        else if (b === 0x2d) {\n            bkgData.background = 'transparent';\n        }\n        else {\n            bkgData.foreground = 'black';\n            if (b === 0x2f) {\n                bkgData.underline = true;\n            }\n        }\n        chNr = (a < 0x18) ? 1 : 2;\n        channel = this.channels[chNr - 1];\n        channel.setBkgData(bkgData);\n        this.lastCmdA = null;\n        this.lastCmdB = null;\n        return true;\n    };\n    /**\n       * Reset state of parser and its channels.\n       */\n    Cea608Parser.prototype.reset = function () {\n        for (var i = 0; i < this.channels.length; i++) {\n            if (this.channels[i]) {\n                this.channels[i].reset();\n            }\n        }\n        this.lastCmdA = null;\n        this.lastCmdB = null;\n    };\n    /**\n       * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n       */\n    Cea608Parser.prototype.cueSplitAtTime = function (t) {\n        for (var i = 0; i < this.channels.length; i++) {\n            if (this.channels[i]) {\n                this.channels[i].cueSplitAtTime(t);\n            }\n        }\n    };\n    return Cea608Parser;\n}());\nexports.default = Cea608Parser;\n\n\n/***/ }),\n\n/***/ \"./src/utils/codecs.js\":\n/*!*****************************!*\\\n  !*** ./src/utils/codecs.js ***!\n  \\*****************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// from http://mp4ra.org/codecs.html\nvar sampleEntryCodesISO = {\n    audio: {\n        'a3ds': true,\n        'ac-3': true,\n        'ac-4': true,\n        'alac': true,\n        'alaw': true,\n        'dra1': true,\n        'dts+': true,\n        'dts-': true,\n        'dtsc': true,\n        'dtse': true,\n        'dtsh': true,\n        'ec-3': true,\n        'enca': true,\n        'g719': true,\n        'g726': true,\n        'm4ae': true,\n        'mha1': true,\n        'mha2': true,\n        'mhm1': true,\n        'mhm2': true,\n        'mlpa': true,\n        'mp4a': true,\n        'raw ': true,\n        'Opus': true,\n        'samr': true,\n        'sawb': true,\n        'sawp': true,\n        'sevc': true,\n        'sqcp': true,\n        'ssmv': true,\n        'twos': true,\n        'ulaw': true\n    },\n    video: {\n        'avc1': true,\n        'avc2': true,\n        'avc3': true,\n        'avc4': true,\n        'avcp': true,\n        'drac': true,\n        'dvav': true,\n        'dvhe': true,\n        'encv': true,\n        'hev1': true,\n        'hvc1': true,\n        'mjp2': true,\n        'mp4v': true,\n        'mvc1': true,\n        'mvc2': true,\n        'mvc3': true,\n        'mvc4': true,\n        'resv': true,\n        'rv60': true,\n        's263': true,\n        'svc1': true,\n        'svc2': true,\n        'vc-1': true,\n        'vp08': true,\n        'vp09': true\n    }\n};\nfunction isCodecType(codec, type) {\n    var typeCodes = sampleEntryCodesISO[type];\n    return !!typeCodes && typeCodes[codec.slice(0, 4)] === true;\n}\nexports.isCodecType = isCodecType;\nfunction isCodecSupportedInMp4(codec, type) {\n    return window.MediaSource.isTypeSupported((type || 'video') + \"/mp4;codecs=\\\"\" + codec + \"\\\"\");\n}\nexports.isCodecSupportedInMp4 = isCodecSupportedInMp4;\n\n\n/***/ }),\n\n/***/ \"./src/utils/cues.js\":\n/*!***************************!*\\\n  !*** ./src/utils/cues.js ***!\n  \\***************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar vttparser_1 = __webpack_require__(/*! ./vttparser */ \"./src/utils/vttparser.js\");\nfunction newCue(track, startTime, endTime, captionScreen) {\n    var row;\n    var cue;\n    var indenting;\n    var indent;\n    var text;\n    var VTTCue = window.VTTCue || window.TextTrackCue;\n    for (var r = 0; r < captionScreen.rows.length; r++) {\n        row = captionScreen.rows[r];\n        indenting = true;\n        indent = 0;\n        text = '';\n        if (!row.isEmpty()) {\n            for (var c = 0; c < row.chars.length; c++) {\n                if (row.chars[c].uchar.match(/\\s/) && indenting) {\n                    indent++;\n                }\n                else {\n                    text += row.chars[c].uchar;\n                    indenting = false;\n                }\n            }\n            // To be used for cleaning-up orphaned roll-up captions\n            row.cueStartTime = startTime;\n            // Give a slight bump to the endTime if it's equal to startTime to avoid a SyntaxError in IE\n            if (startTime === endTime) {\n                endTime += 0.0001;\n            }\n            cue = new VTTCue(startTime, endTime, vttparser_1.fixLineBreaks(text.trim()));\n            if (indent >= 16) {\n                indent--;\n            }\n            else {\n                indent++;\n            }\n            // VTTCue.line get's flakey when using controls, so let's now include line 13&14\n            // also, drop line 1 since it's to close to the top\n            if (navigator.userAgent.match(/Firefox\\//)) {\n                cue.line = r + 1;\n            }\n            else {\n                cue.line = (r > 7 ? r - 2 : r + 1);\n            }\n            cue.align = 'left';\n            // Clamp the position between 0 and 100 - if out of these bounds, Firefox throws an exception and captions break\n            cue.position = Math.max(0, Math.min(100, 100 * (indent / 32) + (navigator.userAgent.match(/Firefox\\//) ? 50 : 0)));\n            track.addCue(cue);\n        }\n    }\n}\nexports.newCue = newCue;\n\n\n/***/ }),\n\n/***/ \"./src/utils/discontinuities.js\":\n/*!**************************************!*\\\n  !*** ./src/utils/discontinuities.js ***!\n  \\**************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_search_1 = __webpack_require__(/*! ./binary-search */ \"./src/utils/binary-search.js\");\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nfunction findFirstFragWithCC(fragments, cc) {\n    var firstFrag = null;\n    for (var i = 0; i < fragments.length; i += 1) {\n        var currentFrag = fragments[i];\n        if (currentFrag && currentFrag.cc === cc) {\n            firstFrag = currentFrag;\n            break;\n        }\n    }\n    return firstFrag;\n}\nexports.findFirstFragWithCC = findFirstFragWithCC;\nfunction findFragWithCC(fragments, CC) {\n    return binary_search_1.default.search(fragments, function (candidate) {\n        if (candidate.cc < CC) {\n            return 1;\n        }\n        else if (candidate.cc > CC) {\n            return -1;\n        }\n        else {\n            return 0;\n        }\n    });\n}\nexports.findFragWithCC = findFragWithCC;\nfunction shouldAlignOnDiscontinuities(lastFrag, lastLevel, details) {\n    var shouldAlign = false;\n    if (lastLevel && lastLevel.details && details) {\n        if (details.endCC > details.startCC || (lastFrag && lastFrag.cc < details.startCC)) {\n            shouldAlign = true;\n        }\n    }\n    return shouldAlign;\n}\nexports.shouldAlignOnDiscontinuities = shouldAlignOnDiscontinuities;\n// Find the first frag in the previous level which matches the CC of the first frag of the new level\nfunction findDiscontinuousReferenceFrag(prevDetails, curDetails) {\n    var prevFrags = prevDetails.fragments;\n    var curFrags = curDetails.fragments;\n    if (!curFrags.length || !prevFrags.length) {\n        logger_1.logger.log('No fragments to align');\n        return;\n    }\n    var prevStartFrag = findFirstFragWithCC(prevFrags, curFrags[0].cc);\n    if (!prevStartFrag || (prevStartFrag && !prevStartFrag.startPTS)) {\n        logger_1.logger.log('No frag in previous level to align on');\n        return;\n    }\n    return prevStartFrag;\n}\nexports.findDiscontinuousReferenceFrag = findDiscontinuousReferenceFrag;\nfunction adjustPts(sliding, details) {\n    details.fragments.forEach(function (frag) {\n        if (frag) {\n            var start = frag.start + sliding;\n            frag.start = frag.startPTS = start;\n            frag.endPTS = start + frag.duration;\n        }\n    });\n    details.PTSKnown = true;\n}\nexports.adjustPts = adjustPts;\n/**\n * Using the parameters of the last level, this function computes PTS' of the new fragments so that they form a\n * contiguous stream with the last fragments.\n * The PTS of a fragment lets Hls.js know where it fits into a stream - by knowing every PTS, we know which fragment to\n * download at any given time. PTS is normally computed when the fragment is demuxed, so taking this step saves us time\n * and an extra download.\n * @param lastFrag\n * @param lastLevel\n * @param details\n */\nfunction alignStream(lastFrag, lastLevel, details) {\n    alignDiscontinuities(lastFrag, details, lastLevel);\n    if (!details.PTSKnown && lastLevel) {\n        // If the PTS wasn't figured out via discontinuity sequence that means there was no CC increase within the level.\n        // Aligning via Program Date Time should therefore be reliable, since PDT should be the same within the same\n        // discontinuity sequence.\n        alignPDT(details, lastLevel.details);\n    }\n}\nexports.alignStream = alignStream;\n/**\n * Computes the PTS if a new level's fragments using the PTS of a fragment in the last level which shares the same\n * discontinuity sequence.\n * @param lastLevel - The details of the last loaded level\n * @param details - The details of the new level\n */\nfunction alignDiscontinuities(lastFrag, details, lastLevel) {\n    if (shouldAlignOnDiscontinuities(lastFrag, lastLevel, details)) {\n        var referenceFrag = findDiscontinuousReferenceFrag(lastLevel.details, details);\n        if (referenceFrag) {\n            logger_1.logger.log('Adjusting PTS using last level due to CC increase within current level');\n            adjustPts(referenceFrag.start, details);\n        }\n    }\n}\nexports.alignDiscontinuities = alignDiscontinuities;\n/**\n * Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level.\n * @param details - The details of the new level\n * @param lastDetails - The details of the last loaded level\n */\nfunction alignPDT(details, lastDetails) {\n    if (lastDetails && lastDetails.fragments.length) {\n        if (!details.hasProgramDateTime || !lastDetails.hasProgramDateTime) {\n            return;\n        }\n        // if last level sliding is 1000 and its first frag PROGRAM-DATE-TIME is 2017-08-20 1:10:00 AM\n        // and if new details first frag PROGRAM DATE-TIME is 2017-08-20 1:10:08 AM\n        // then we can deduce that playlist B sliding is 1000+8 = 1008s\n        var lastPDT = lastDetails.fragments[0].programDateTime;\n        var newPDT = details.fragments[0].programDateTime;\n        // date diff is in ms. frag.start is in seconds\n        var sliding = (newPDT - lastPDT) / 1000 + lastDetails.fragments[0].start;\n        if (Number.isFinite(sliding)) {\n            logger_1.logger.log(\"adjusting PTS using programDateTime delta, sliding:\" + sliding.toFixed(3));\n            adjustPts(sliding, details);\n        }\n    }\n}\nexports.alignPDT = alignPDT;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/utils/ewma-bandwidth-estimator.js\":\n/*!***********************************************!*\\\n  !*** ./src/utils/ewma-bandwidth-estimator.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * EWMA Bandwidth Estimator\n *  - heavily inspired from shaka-player\n * Tracks bandwidth samples and estimates available bandwidth.\n * Based on the minimum of two exponentially-weighted moving averages with\n * different half-lives.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ewma_1 = __webpack_require__(/*! ../utils/ewma */ \"./src/utils/ewma.js\");\nvar EwmaBandWidthEstimator = /** @class */ (function () {\n    function EwmaBandWidthEstimator(hls, slow, fast, defaultEstimate) {\n        this.hls = hls;\n        this.defaultEstimate_ = defaultEstimate;\n        this.minWeight_ = 0.001;\n        this.minDelayMs_ = 50;\n        this.slow_ = new ewma_1.default(slow);\n        this.fast_ = new ewma_1.default(fast);\n    }\n    EwmaBandWidthEstimator.prototype.sample = function (durationMs, numBytes) {\n        durationMs = Math.max(durationMs, this.minDelayMs_);\n        var bandwidth = 8000 * numBytes / durationMs, \n        // console.log('instant bw:'+ Math.round(bandwidth));\n        // we weight sample using loading duration....\n        weight = durationMs / 1000;\n        this.fast_.sample(weight, bandwidth);\n        this.slow_.sample(weight, bandwidth);\n    };\n    EwmaBandWidthEstimator.prototype.canEstimate = function () {\n        var fast = this.fast_;\n        return (fast && fast.getTotalWeight() >= this.minWeight_);\n    };\n    EwmaBandWidthEstimator.prototype.getEstimate = function () {\n        if (this.canEstimate()) {\n            // console.log('slow estimate:'+ Math.round(this.slow_.getEstimate()));\n            // console.log('fast estimate:'+ Math.round(this.fast_.getEstimate()));\n            // Take the minimum of these two estimates.  This should have the effect of\n            // adapting down quickly, but up more slowly.\n            return Math.min(this.fast_.getEstimate(), this.slow_.getEstimate());\n        }\n        else {\n            return this.defaultEstimate_;\n        }\n    };\n    EwmaBandWidthEstimator.prototype.destroy = function () {\n    };\n    return EwmaBandWidthEstimator;\n}());\nexports.default = EwmaBandWidthEstimator;\n\n\n/***/ }),\n\n/***/ \"./src/utils/ewma.js\":\n/*!***************************!*\\\n  !*** ./src/utils/ewma.js ***!\n  \\***************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * compute an Exponential Weighted moving average\n * - https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n *  - heavily inspired from shaka-player\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EWMA = /** @class */ (function () {\n    //  About half of the estimated value will be from the last |halfLife| samples by weight.\n    function EWMA(halfLife) {\n        // Larger values of alpha expire historical data more slowly.\n        this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;\n        this.estimate_ = 0;\n        this.totalWeight_ = 0;\n    }\n    EWMA.prototype.sample = function (weight, value) {\n        var adjAlpha = Math.pow(this.alpha_, weight);\n        this.estimate_ = value * (1 - adjAlpha) + adjAlpha * this.estimate_;\n        this.totalWeight_ += weight;\n    };\n    EWMA.prototype.getTotalWeight = function () {\n        return this.totalWeight_;\n    };\n    EWMA.prototype.getEstimate = function () {\n        if (this.alpha_) {\n            var zeroFactor = 1 - Math.pow(this.alpha_, this.totalWeight_);\n            return this.estimate_ / zeroFactor;\n        }\n        else {\n            return this.estimate_;\n        }\n    };\n    return EWMA;\n}());\nexports.default = EWMA;\n\n\n/***/ }),\n\n/***/ \"./src/utils/get-self-scope.js\":\n/*!*************************************!*\\\n  !*** ./src/utils/get-self-scope.js ***!\n  \\*************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getSelfScope() {\n    // see https://stackoverflow.com/a/11237259/589493\n    if (typeof window === 'undefined') {\n        /* eslint-disable-next-line no-undef */\n        return self;\n    }\n    else {\n        return window;\n    }\n}\nexports.getSelfScope = getSelfScope;\n\n\n/***/ }),\n\n/***/ \"./src/utils/logger.js\":\n/*!*****************************!*\\\n  !*** ./src/utils/logger.js ***!\n  \\*****************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar get_self_scope_1 = __webpack_require__(/*! ./get-self-scope */ \"./src/utils/get-self-scope.js\");\nfunction noop() { }\nvar fakeLogger = {\n    trace: noop,\n    debug: noop,\n    log: noop,\n    warn: noop,\n    info: noop,\n    error: noop\n};\nvar exportedLogger = fakeLogger;\n// let lastCallTime;\n// function formatMsgWithTimeInfo(type, msg) {\n//   const now = Date.now();\n//   const diff = lastCallTime ? '+' + (now - lastCallTime) : '0';\n//   lastCallTime = now;\n//   msg = (new Date(now)).toISOString() + ' | [' +  type + '] > ' + msg + ' ( ' + diff + ' ms )';\n//   return msg;\n// }\nfunction formatMsg(type, msg) {\n    msg = '[' + type + '] > ' + msg;\n    return msg;\n}\nvar global = get_self_scope_1.getSelfScope();\nfunction consolePrintFn(type) {\n    var func = global.console[type];\n    if (func) {\n        return function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            if (args[0]) {\n                args[0] = formatMsg(type, args[0]);\n            }\n            func.apply(global.console, args);\n        };\n    }\n    return noop;\n}\nfunction exportLoggerFunctions(debugConfig) {\n    var functions = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        functions[_i - 1] = arguments[_i];\n    }\n    functions.forEach(function (type) {\n        exportedLogger[type] = debugConfig[type] ? debugConfig[type].bind(debugConfig) : consolePrintFn(type);\n    });\n}\nexports.enableLogs = function (debugConfig) {\n    if (debugConfig === true || typeof debugConfig === 'object') {\n        exportLoggerFunctions(debugConfig, \n        // Remove out from list here to hard-disable a log-level\n        // 'trace',\n        'debug', 'log', 'info', 'warn', 'error');\n        // Some browsers don't allow to use bind on console object anyway\n        // fallback to default if needed\n        try {\n            exportedLogger.log();\n        }\n        catch (e) {\n            exportedLogger = fakeLogger;\n        }\n    }\n    else {\n        exportedLogger = fakeLogger;\n    }\n};\nexports.logger = exportedLogger;\n\n\n/***/ }),\n\n/***/ \"./src/utils/mediakeys-helper.js\":\n/*!***************************************!*\\\n  !*** ./src/utils/mediakeys-helper.js ***!\n  \\***************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar requestMediaKeySystemAccess = (function () {\n    if (typeof window !== 'undefined' && window.navigator && window.navigator.requestMediaKeySystemAccess) {\n        return window.navigator.requestMediaKeySystemAccess.bind(window.navigator);\n    }\n    else {\n        return null;\n    }\n})();\nexports.requestMediaKeySystemAccess = requestMediaKeySystemAccess;\n\n\n/***/ }),\n\n/***/ \"./src/utils/mediasource-helper.js\":\n/*!*****************************************!*\\\n  !*** ./src/utils/mediasource-helper.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * MediaSource helper\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getMediaSource() {\n    if (typeof window !== 'undefined') {\n        return window.MediaSource || window.WebKitMediaSource;\n    }\n}\nexports.getMediaSource = getMediaSource;\n\n\n/***/ }),\n\n/***/ \"./src/utils/output-filter.js\":\n/*!************************************!*\\\n  !*** ./src/utils/output-filter.js ***!\n  \\************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OutputFilter = /** @class */ (function () {\n    function OutputFilter(timelineController, trackName) {\n        this.timelineController = timelineController;\n        this.trackName = trackName;\n        this.startTime = null;\n        this.endTime = null;\n        this.screen = null;\n    }\n    OutputFilter.prototype.dispatchCue = function () {\n        if (this.startTime === null) {\n            return;\n        }\n        this.timelineController.addCues(this.trackName, this.startTime, this.endTime, this.screen);\n        this.startTime = null;\n    };\n    OutputFilter.prototype.newCue = function (startTime, endTime, screen) {\n        if (this.startTime === null || this.startTime > startTime) {\n            this.startTime = startTime;\n        }\n        this.endTime = endTime;\n        this.screen = screen;\n        this.timelineController.createCaptionsTrack(this.trackName);\n    };\n    return OutputFilter;\n}());\nexports.default = OutputFilter;\n\n\n/***/ }),\n\n/***/ \"./src/utils/texttrack-utils.js\":\n/*!**************************************!*\\\n  !*** ./src/utils/texttrack-utils.js ***!\n  \\**************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction sendAddTrackEvent(track, videoEl) {\n    var event = null;\n    try {\n        event = new window.Event('addtrack');\n    }\n    catch (err) {\n        // for IE11\n        event = document.createEvent('Event');\n        event.initEvent('addtrack', false, false);\n    }\n    event.track = track;\n    videoEl.dispatchEvent(event);\n}\nexports.sendAddTrackEvent = sendAddTrackEvent;\nfunction clearCurrentCues(track) {\n    if (track && track.cues) {\n        while (track.cues.length > 0) {\n            track.removeCue(track.cues[0]);\n        }\n    }\n}\nexports.clearCurrentCues = clearCurrentCues;\n\n\n/***/ }),\n\n/***/ \"./src/utils/time-ranges.js\":\n/*!**********************************!*\\\n  !*** ./src/utils/time-ranges.js ***!\n  \\**********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n *  TimeRanges to string helper\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TimeRanges = {\n    toString: function (r) {\n        var log = '', len = r.length;\n        for (var i = 0; i < len; i++) {\n            log += '[' + r.start(i).toFixed(3) + ',' + r.end(i).toFixed(3) + ']';\n        }\n        return log;\n    }\n};\nexports.default = TimeRanges;\n\n\n/***/ }),\n\n/***/ \"./src/utils/vttcue.js\":\n/*!*****************************!*\\\n  !*** ./src/utils/vttcue.js ***!\n  \\*****************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (function () {\n    if (typeof window !== 'undefined' && window.VTTCue) {\n        return window.VTTCue;\n    }\n    var autoKeyword = 'auto';\n    var directionSetting = {\n        '': true,\n        lr: true,\n        rl: true\n    };\n    var alignSetting = {\n        start: true,\n        middle: true,\n        end: true,\n        left: true,\n        right: true\n    };\n    function findDirectionSetting(value) {\n        if (typeof value !== 'string') {\n            return false;\n        }\n        var dir = directionSetting[value.toLowerCase()];\n        return dir ? value.toLowerCase() : false;\n    }\n    function findAlignSetting(value) {\n        if (typeof value !== 'string') {\n            return false;\n        }\n        var align = alignSetting[value.toLowerCase()];\n        return align ? value.toLowerCase() : false;\n    }\n    function extend(obj) {\n        var i = 1;\n        for (; i < arguments.length; i++) {\n            var cobj = arguments[i];\n            for (var p in cobj) {\n                obj[p] = cobj[p];\n            }\n        }\n        return obj;\n    }\n    function VTTCue(startTime, endTime, text) {\n        var cue = this;\n        var isIE8 = (function () {\n            if (typeof navigator === 'undefined') {\n                return;\n            }\n            return (/MSIE\\s8\\.0/).test(navigator.userAgent);\n        })();\n        var baseObj = {};\n        if (isIE8) {\n            cue = document.createElement('custom');\n        }\n        else {\n            baseObj.enumerable = true;\n        }\n        /**\n         * Shim implementation specific properties. These properties are not in\n         * the spec.\n         */\n        // Lets us know when the VTTCue's data has changed in such a way that we need\n        // to recompute its display state. This lets us compute its display state\n        // lazily.\n        cue.hasBeenReset = false;\n        /**\n         * VTTCue and TextTrackCue properties\n         * http://dev.w3.org/html5/webvtt/#vttcue-interface\n         */\n        var _id = '';\n        var _pauseOnExit = false;\n        var _startTime = startTime;\n        var _endTime = endTime;\n        var _text = text;\n        var _region = null;\n        var _vertical = '';\n        var _snapToLines = true;\n        var _line = 'auto';\n        var _lineAlign = 'start';\n        var _position = 50;\n        var _positionAlign = 'middle';\n        var _size = 50;\n        var _align = 'middle';\n        Object.defineProperty(cue, 'id', extend({}, baseObj, {\n            get: function () {\n                return _id;\n            },\n            set: function (value) {\n                _id = '' + value;\n            }\n        }));\n        Object.defineProperty(cue, 'pauseOnExit', extend({}, baseObj, {\n            get: function () {\n                return _pauseOnExit;\n            },\n            set: function (value) {\n                _pauseOnExit = !!value;\n            }\n        }));\n        Object.defineProperty(cue, 'startTime', extend({}, baseObj, {\n            get: function () {\n                return _startTime;\n            },\n            set: function (value) {\n                if (typeof value !== 'number') {\n                    throw new TypeError('Start time must be set to a number.');\n                }\n                _startTime = value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'endTime', extend({}, baseObj, {\n            get: function () {\n                return _endTime;\n            },\n            set: function (value) {\n                if (typeof value !== 'number') {\n                    throw new TypeError('End time must be set to a number.');\n                }\n                _endTime = value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'text', extend({}, baseObj, {\n            get: function () {\n                return _text;\n            },\n            set: function (value) {\n                _text = '' + value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'region', extend({}, baseObj, {\n            get: function () {\n                return _region;\n            },\n            set: function (value) {\n                _region = value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'vertical', extend({}, baseObj, {\n            get: function () {\n                return _vertical;\n            },\n            set: function (value) {\n                var setting = findDirectionSetting(value);\n                // Have to check for false because the setting an be an empty string.\n                if (setting === false) {\n                    throw new SyntaxError('An invalid or illegal string was specified.');\n                }\n                _vertical = setting;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'snapToLines', extend({}, baseObj, {\n            get: function () {\n                return _snapToLines;\n            },\n            set: function (value) {\n                _snapToLines = !!value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'line', extend({}, baseObj, {\n            get: function () {\n                return _line;\n            },\n            set: function (value) {\n                if (typeof value !== 'number' && value !== autoKeyword) {\n                    throw new SyntaxError('An invalid number or illegal string was specified.');\n                }\n                _line = value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'lineAlign', extend({}, baseObj, {\n            get: function () {\n                return _lineAlign;\n            },\n            set: function (value) {\n                var setting = findAlignSetting(value);\n                if (!setting) {\n                    throw new SyntaxError('An invalid or illegal string was specified.');\n                }\n                _lineAlign = setting;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'position', extend({}, baseObj, {\n            get: function () {\n                return _position;\n            },\n            set: function (value) {\n                if (value < 0 || value > 100) {\n                    throw new Error('Position must be between 0 and 100.');\n                }\n                _position = value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'positionAlign', extend({}, baseObj, {\n            get: function () {\n                return _positionAlign;\n            },\n            set: function (value) {\n                var setting = findAlignSetting(value);\n                if (!setting) {\n                    throw new SyntaxError('An invalid or illegal string was specified.');\n                }\n                _positionAlign = setting;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'size', extend({}, baseObj, {\n            get: function () {\n                return _size;\n            },\n            set: function (value) {\n                if (value < 0 || value > 100) {\n                    throw new Error('Size must be between 0 and 100.');\n                }\n                _size = value;\n                this.hasBeenReset = true;\n            }\n        }));\n        Object.defineProperty(cue, 'align', extend({}, baseObj, {\n            get: function () {\n                return _align;\n            },\n            set: function (value) {\n                var setting = findAlignSetting(value);\n                if (!setting) {\n                    throw new SyntaxError('An invalid or illegal string was specified.');\n                }\n                _align = setting;\n                this.hasBeenReset = true;\n            }\n        }));\n        /**\n         * Other <track> spec defined properties\n         */\n        // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n        cue.displayState = undefined;\n        if (isIE8) {\n            return cue;\n        }\n    }\n    /**\n     * VTTCue methods\n     */\n    VTTCue.prototype.getCueAsHTML = function () {\n        // Assume WebVTT.convertCueToDOMTree is on the global.\n        var WebVTT = window.WebVTT;\n        return WebVTT.convertCueToDOMTree(window, this.text);\n    };\n    return VTTCue;\n})();\n\n\n/***/ }),\n\n/***/ \"./src/utils/vttparser.js\":\n/*!********************************!*\\\n  !*** ./src/utils/vttparser.js ***!\n  \\********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * Source: https://github.com/mozilla/vtt.js/blob/master/dist/vtt.js#L1716\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar vttcue_1 = __webpack_require__(/*! ./vttcue */ \"./src/utils/vttcue.js\");\nvar StringDecoder = function StringDecoder() {\n    return {\n        decode: function (data) {\n            if (!data) {\n                return '';\n            }\n            if (typeof data !== 'string') {\n                throw new Error('Error - expected string data.');\n            }\n            return decodeURIComponent(encodeURIComponent(data));\n        }\n    };\n};\nfunction VTTParser() {\n    this.window = window;\n    this.state = 'INITIAL';\n    this.buffer = '';\n    this.decoder = new StringDecoder();\n    this.regionList = [];\n}\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n    function computeSeconds(h, m, s, f) {\n        return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n    }\n    var m = input.match(/^(\\d+):(\\d{2})(:\\d{2})?\\.(\\d{3})/);\n    if (!m) {\n        return null;\n    }\n    if (m[3]) {\n        // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n        return computeSeconds(m[1], m[2], m[3].replace(':', ''), m[4]);\n    }\n    else if (m[1] > 59) {\n        // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n        // First position is hours as it's over 59.\n        return computeSeconds(m[1], m[2], 0, m[4]);\n    }\n    else {\n        // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n        return computeSeconds(0, m[1], m[2], m[4]);\n    }\n}\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n    this.values = Object.create(null);\n}\nSettings.prototype = {\n    // Only accept the first assignment to any key.\n    set: function (k, v) {\n        if (!this.get(k) && v !== '') {\n            this.values[k] = v;\n        }\n    },\n    // Return the value for a key, or a default value.\n    // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n    // a number of possible default values as properties where 'defaultKey' is\n    // the key of the property that will be chosen; otherwise it's assumed to be\n    // a single value.\n    get: function (k, dflt, defaultKey) {\n        if (defaultKey) {\n            return this.has(k) ? this.values[k] : dflt[defaultKey];\n        }\n        return this.has(k) ? this.values[k] : dflt;\n    },\n    // Check whether we have a value for a key.\n    has: function (k) {\n        return k in this.values;\n    },\n    // Accept a setting if its one of the given alternatives.\n    alt: function (k, v, a) {\n        for (var n = 0; n < a.length; ++n) {\n            if (v === a[n]) {\n                this.set(k, v);\n                break;\n            }\n        }\n    },\n    // Accept a setting if its a valid (signed) integer.\n    integer: function (k, v) {\n        if (/^-?\\d+$/.test(v)) { // integer\n            this.set(k, parseInt(v, 10));\n        }\n    },\n    // Accept a setting if its a valid percentage.\n    percent: function (k, v) {\n        var m;\n        if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n            v = parseFloat(v);\n            if (v >= 0 && v <= 100) {\n                this.set(k, v);\n                return true;\n            }\n        }\n        return false;\n    }\n};\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n    var groups = groupDelim ? input.split(groupDelim) : [input];\n    for (var i in groups) {\n        if (typeof groups[i] !== 'string') {\n            continue;\n        }\n        var kv = groups[i].split(keyValueDelim);\n        if (kv.length !== 2) {\n            continue;\n        }\n        var k = kv[0];\n        var v = kv[1];\n        callback(k, v);\n    }\n}\nvar defaults = new vttcue_1.default(0, 0, 0);\n// 'middle' was changed to 'center' in the spec: https://github.com/w3c/webvtt/pull/244\n//  Safari doesn't yet support this change, but FF and Chrome do.\nvar center = defaults.align === 'middle' ? 'middle' : 'center';\nfunction parseCue(input, cue, regionList) {\n    // Remember the original input if we need to throw an error.\n    var oInput = input;\n    // 4.1 WebVTT timestamp\n    function consumeTimeStamp() {\n        var ts = parseTimeStamp(input);\n        if (ts === null) {\n            throw new Error('Malformed timestamp: ' + oInput);\n        }\n        // Remove time stamp from input.\n        input = input.replace(/^[^\\sa-zA-Z-]+/, '');\n        return ts;\n    }\n    // 4.4.2 WebVTT cue settings\n    function consumeCueSettings(input, cue) {\n        var settings = new Settings();\n        parseOptions(input, function (k, v) {\n            switch (k) {\n                case 'region':\n                    // Find the last region we parsed with the same region id.\n                    for (var i = regionList.length - 1; i >= 0; i--) {\n                        if (regionList[i].id === v) {\n                            settings.set(k, regionList[i].region);\n                            break;\n                        }\n                    }\n                    break;\n                case 'vertical':\n                    settings.alt(k, v, ['rl', 'lr']);\n                    break;\n                case 'line':\n                    var vals = v.split(','), vals0 = vals[0];\n                    settings.integer(k, vals0);\n                    if (settings.percent(k, vals0)) {\n                        settings.set('snapToLines', false);\n                    }\n                    settings.alt(k, vals0, ['auto']);\n                    if (vals.length === 2) {\n                        settings.alt('lineAlign', vals[1], ['start', center, 'end']);\n                    }\n                    break;\n                case 'position':\n                    vals = v.split(',');\n                    settings.percent(k, vals[0]);\n                    if (vals.length === 2) {\n                        settings.alt('positionAlign', vals[1], ['start', center, 'end', 'line-left', 'line-right', 'auto']);\n                    }\n                    break;\n                case 'size':\n                    settings.percent(k, v);\n                    break;\n                case 'align':\n                    settings.alt(k, v, ['start', center, 'end', 'left', 'right']);\n                    break;\n            }\n        }, /:/, /\\s/);\n        // Apply default values for any missing fields.\n        cue.region = settings.get('region', null);\n        cue.vertical = settings.get('vertical', '');\n        var line = settings.get('line', 'auto');\n        if (line === 'auto' && defaults.line === -1) {\n            // set numeric line number for Safari\n            line = -1;\n        }\n        cue.line = line;\n        cue.lineAlign = settings.get('lineAlign', 'start');\n        cue.snapToLines = settings.get('snapToLines', true);\n        cue.size = settings.get('size', 100);\n        cue.align = settings.get('align', center);\n        var position = settings.get('position', 'auto');\n        if (position === 'auto' && defaults.position === 50) {\n            // set numeric position for Safari\n            position = cue.align === 'start' || cue.align === 'left' ? 0 : cue.align === 'end' || cue.align === 'right' ? 100 : 50;\n        }\n        cue.position = position;\n    }\n    function skipWhitespace() {\n        input = input.replace(/^\\s+/, '');\n    }\n    // 4.1 WebVTT cue timings.\n    skipWhitespace();\n    cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n    skipWhitespace();\n    if (input.substr(0, 3) !== '-->') { // (3) next characters must match '-->'\n        throw new Error('Malformed time stamp (time stamps must be separated by \\'-->\\'): ' +\n            oInput);\n    }\n    input = input.substr(3);\n    skipWhitespace();\n    cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n    // 4.1 WebVTT cue settings list.\n    skipWhitespace();\n    consumeCueSettings(input, cue);\n}\nfunction fixLineBreaks(input) {\n    return input.replace(/<br(?: \\/)?>/gi, '\\n');\n}\nexports.fixLineBreaks = fixLineBreaks;\nVTTParser.prototype = {\n    parse: function (data) {\n        var self = this;\n        // If there is no data then we won't decode it, but will just try to parse\n        // whatever is in buffer already. This may occur in circumstances, for\n        // example when flush() is called.\n        if (data) {\n            // Try to decode the data that we received.\n            self.buffer += self.decoder.decode(data, { stream: true });\n        }\n        function collectNextLine() {\n            var buffer = self.buffer;\n            var pos = 0;\n            buffer = fixLineBreaks(buffer);\n            while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n                ++pos;\n            }\n            var line = buffer.substr(0, pos);\n            // Advance the buffer early in case we fail below.\n            if (buffer[pos] === '\\r') {\n                ++pos;\n            }\n            if (buffer[pos] === '\\n') {\n                ++pos;\n            }\n            self.buffer = buffer.substr(pos);\n            return line;\n        }\n        // 3.2 WebVTT metadata header syntax\n        function parseHeader(input) {\n            parseOptions(input, function (k, v) {\n                switch (k) {\n                    case 'Region':\n                        // 3.3 WebVTT region metadata header syntax\n                        // console.log('parse region', v);\n                        // parseRegion(v);\n                        break;\n                }\n            }, /:/);\n        }\n        // 5.1 WebVTT file parsing.\n        try {\n            var line = void 0;\n            if (self.state === 'INITIAL') {\n                // We can't start parsing until we have the first line.\n                if (!/\\r\\n|\\n/.test(self.buffer)) {\n                    return this;\n                }\n                line = collectNextLine();\n                // strip of UTF-8 BOM if any\n                // https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8\n                var m = line.match(/^(ï»¿)?WEBVTT([ \\t].*)?$/);\n                if (!m || !m[0]) {\n                    throw new Error('Malformed WebVTT signature.');\n                }\n                self.state = 'HEADER';\n            }\n            var alreadyCollectedLine = false;\n            while (self.buffer) {\n                // We can't parse a line until we have the full line.\n                if (!/\\r\\n|\\n/.test(self.buffer)) {\n                    return this;\n                }\n                if (!alreadyCollectedLine) {\n                    line = collectNextLine();\n                }\n                else {\n                    alreadyCollectedLine = false;\n                }\n                switch (self.state) {\n                    case 'HEADER':\n                        // 13-18 - Allow a header (metadata) under the WEBVTT line.\n                        if (/:/.test(line)) {\n                            parseHeader(line);\n                        }\n                        else if (!line) {\n                            // An empty line terminates the header and starts the body (cues).\n                            self.state = 'ID';\n                        }\n                        continue;\n                    case 'NOTE':\n                        // Ignore NOTE blocks.\n                        if (!line) {\n                            self.state = 'ID';\n                        }\n                        continue;\n                    case 'ID':\n                        // Check for the start of NOTE blocks.\n                        if (/^NOTE($|[ \\t])/.test(line)) {\n                            self.state = 'NOTE';\n                            break;\n                        }\n                        // 19-29 - Allow any number of line terminators, then initialize new cue values.\n                        if (!line) {\n                            continue;\n                        }\n                        self.cue = new vttcue_1.default(0, 0, '');\n                        self.state = 'CUE';\n                        // 30-39 - Check if self line contains an optional identifier or timing data.\n                        if (line.indexOf('-->') === -1) {\n                            self.cue.id = line;\n                            continue;\n                        }\n                    // Process line as start of a cue.\n                    /* falls through */\n                    case 'CUE':\n                        // 40 - Collect cue timings and settings.\n                        try {\n                            parseCue(line, self.cue, self.regionList);\n                        }\n                        catch (e) {\n                            // In case of an error ignore rest of the cue.\n                            self.cue = null;\n                            self.state = 'BADCUE';\n                            continue;\n                        }\n                        self.state = 'CUETEXT';\n                        continue;\n                    case 'CUETEXT':\n                        var hasSubstring = line.indexOf('-->') !== -1;\n                        // 34 - If we have an empty line then report the cue.\n                        // 35 - If we have the special substring '-->' then report the cue,\n                        // but do not collect the line as we need to process the current\n                        // one as a new cue.\n                        if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n                            // We are done parsing self cue.\n                            if (self.oncue) {\n                                self.oncue(self.cue);\n                            }\n                            self.cue = null;\n                            self.state = 'ID';\n                            continue;\n                        }\n                        if (self.cue.text) {\n                            self.cue.text += '\\n';\n                        }\n                        self.cue.text += line;\n                        continue;\n                    case 'BADCUE': // BADCUE\n                        // 54-62 - Collect and discard the remaining cue.\n                        if (!line) {\n                            self.state = 'ID';\n                        }\n                        continue;\n                }\n            }\n        }\n        catch (e) {\n            // If we are currently parsing a cue, report what we have.\n            if (self.state === 'CUETEXT' && self.cue && self.oncue) {\n                self.oncue(self.cue);\n            }\n            self.cue = null;\n            // Enter BADWEBVTT state if header was not parsed correctly otherwise\n            // another exception occurred so enter BADCUE state.\n            self.state = self.state === 'INITIAL' ? 'BADWEBVTT' : 'BADCUE';\n        }\n        return this;\n    },\n    flush: function () {\n        var self = this;\n        try {\n            // Finish decoding the stream.\n            self.buffer += self.decoder.decode();\n            // Synthesize the end of the current cue or region.\n            if (self.cue || self.state === 'HEADER') {\n                self.buffer += '\\n\\n';\n                self.parse();\n            }\n            // If we've flushed, parsed, and we're still on the INITIAL state then\n            // that means we don't have enough of the stream to parse the first\n            // line.\n            if (self.state === 'INITIAL') {\n                throw new Error('Malformed WebVTT signature.');\n            }\n        }\n        catch (e) {\n            throw e;\n        }\n        if (self.onflush) {\n            self.onflush();\n        }\n        return this;\n    }\n};\nexports.default = VTTParser;\n\n\n/***/ }),\n\n/***/ \"./src/utils/webvtt-parser.js\":\n/*!************************************!*\\\n  !*** ./src/utils/webvtt-parser.js ***!\n  \\************************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Number) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar vttparser_1 = __webpack_require__(/*! ./vttparser */ \"./src/utils/vttparser.js\");\nvar id3_1 = __webpack_require__(/*! ../demux/id3 */ \"./src/demux/id3.js\");\n// String.prototype.startsWith is not supported in IE11\nvar startsWith = function (inputString, searchString, position) {\n    return inputString.substr(position || 0, searchString.length) === searchString;\n};\nvar cueString2millis = function (timeString) {\n    var ts = parseInt(timeString.substr(-3));\n    var secs = parseInt(timeString.substr(-6, 2));\n    var mins = parseInt(timeString.substr(-9, 2));\n    var hours = timeString.length > 9 ? parseInt(timeString.substr(0, timeString.indexOf(':'))) : 0;\n    if (!Number.isFinite(ts) || !Number.isFinite(secs) || !Number.isFinite(mins) || !Number.isFinite(hours)) {\n        return -1;\n    }\n    ts += 1000 * secs;\n    ts += 60 * 1000 * mins;\n    ts += 60 * 60 * 1000 * hours;\n    return ts;\n};\n// From https://github.com/darkskyapp/string-hash\nvar hash = function (text) {\n    var hash = 5381;\n    var i = text.length;\n    while (i) {\n        hash = (hash * 33) ^ text.charCodeAt(--i);\n    }\n    return (hash >>> 0).toString();\n};\nvar calculateOffset = function (vttCCs, cc, presentationTime) {\n    var currCC = vttCCs[cc];\n    var prevCC = vttCCs[currCC.prevCC];\n    // This is the first discontinuity or cues have been processed since the last discontinuity\n    // Offset = current discontinuity time\n    if (!prevCC || (!prevCC.new && currCC.new)) {\n        vttCCs.ccOffset = vttCCs.presentationOffset = currCC.start;\n        currCC.new = false;\n        return;\n    }\n    // There have been discontinuities since cues were last parsed.\n    // Offset = time elapsed\n    while (prevCC && prevCC.new) {\n        vttCCs.ccOffset += currCC.start - prevCC.start;\n        currCC.new = false;\n        currCC = prevCC;\n        prevCC = vttCCs[currCC.prevCC];\n    }\n    vttCCs.presentationOffset = presentationTime;\n};\nvar WebVTTParser = {\n    parse: function (vttByteArray, syncPTS, vttCCs, cc, callBack, errorCallBack) {\n        // Convert byteArray into string, replacing any somewhat exotic linefeeds with \"\\n\", then split on that character.\n        var re = /\\r\\n|\\n\\r|\\n|\\r/g;\n        // Uint8Array.prototype.reduce is not implemented in IE11\n        var vttLines = id3_1.utf8ArrayToStr(new Uint8Array(vttByteArray)).trim().replace(re, '\\n').split('\\n');\n        var cueTime = '00:00.000';\n        var mpegTs = 0;\n        var localTime = 0;\n        var presentationTime = 0;\n        var cues = [];\n        var parsingError;\n        var inHeader = true;\n        // let VTTCue = VTTCue || window.TextTrackCue;\n        // Create parser object using VTTCue with TextTrackCue fallback on certain browsers.\n        var parser = new vttparser_1.default();\n        parser.oncue = function (cue) {\n            // Adjust cue timing; clamp cues to start no earlier than - and drop cues that don't end after - 0 on timeline.\n            var currCC = vttCCs[cc];\n            var cueOffset = vttCCs.ccOffset;\n            // Update offsets for new discontinuities\n            if (currCC && currCC.new) {\n                if (localTime !== undefined) {\n                    // When local time is provided, offset = discontinuity start time - local time\n                    cueOffset = vttCCs.ccOffset = currCC.start;\n                }\n                else {\n                    calculateOffset(vttCCs, cc, presentationTime);\n                }\n            }\n            if (presentationTime) {\n                // If we have MPEGTS, offset = presentation time + discontinuity offset\n                cueOffset = presentationTime - vttCCs.presentationOffset;\n            }\n            cue.startTime += cueOffset - localTime;\n            cue.endTime += cueOffset - localTime;\n            // Create a unique hash id for a cue based on start/end times and text.\n            // This helps timeline-controller to avoid showing repeated captions.\n            cue.id = hash(cue.startTime.toString()) + hash(cue.endTime.toString()) + hash(cue.text);\n            // Fix encoding of special characters. TODO: Test with all sorts of weird characters.\n            cue.text = decodeURIComponent(encodeURIComponent(cue.text));\n            if (cue.endTime > 0) {\n                cues.push(cue);\n            }\n        };\n        parser.onparsingerror = function (e) {\n            parsingError = e;\n        };\n        parser.onflush = function () {\n            if (parsingError && errorCallBack) {\n                errorCallBack(parsingError);\n                return;\n            }\n            callBack(cues);\n        };\n        // Go through contents line by line.\n        vttLines.forEach(function (line) {\n            if (inHeader) {\n                // Look for X-TIMESTAMP-MAP in header.\n                if (startsWith(line, 'X-TIMESTAMP-MAP=')) {\n                    // Once found, no more are allowed anyway, so stop searching.\n                    inHeader = false;\n                    // Extract LOCAL and MPEGTS.\n                    line.substr(16).split(',').forEach(function (timestamp) {\n                        if (startsWith(timestamp, 'LOCAL:')) {\n                            cueTime = timestamp.substr(6);\n                        }\n                        else if (startsWith(timestamp, 'MPEGTS:')) {\n                            mpegTs = parseInt(timestamp.substr(7));\n                        }\n                    });\n                    try {\n                        // Calculate subtitle offset in milliseconds.\n                        if (syncPTS + ((vttCCs[cc].start * 90000) || 0) < 0) {\n                            syncPTS += 8589934592;\n                        }\n                        // Adjust MPEGTS by sync PTS.\n                        mpegTs -= syncPTS;\n                        // Convert cue time to seconds\n                        localTime = cueString2millis(cueTime) / 1000;\n                        // Convert MPEGTS to seconds from 90kHz.\n                        presentationTime = mpegTs / 90000;\n                        if (localTime === -1) {\n                            parsingError = new Error(\"Malformed X-TIMESTAMP-MAP: \" + line);\n                        }\n                    }\n                    catch (e) {\n                        parsingError = new Error(\"Malformed X-TIMESTAMP-MAP: \" + line);\n                    }\n                    // Return without parsing X-TIMESTAMP-MAP line.\n                    return;\n                }\n                else if (line === '') {\n                    inHeader = false;\n                }\n            }\n            // Parse line by default.\n            parser.parse(line + '\\n');\n        });\n        parser.flush();\n    }\n};\nexports.default = WebVTTParser;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./src/polyfills/number */ \"./src/polyfills/number.js\")[\"Number\"]))\n\n/***/ }),\n\n/***/ \"./src/utils/xhr-loader.js\":\n/*!*********************************!*\\\n  !*** ./src/utils/xhr-loader.js ***!\n  \\*********************************/\n/*! no static exports found */\n/*! ModuleConcatenation bailout: Module is not an ECMAScript module */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * XHR based logger\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger_1 = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\nvar performance = window.performance, XMLHttpRequest = window.XMLHttpRequest;\nvar XhrLoader = /** @class */ (function () {\n    function XhrLoader(config) {\n        if (config && config.xhrSetup) {\n            this.xhrSetup = config.xhrSetup;\n        }\n    }\n    XhrLoader.prototype.destroy = function () {\n        this.abort();\n        this.loader = null;\n    };\n    XhrLoader.prototype.abort = function () {\n        var loader = this.loader;\n        if (loader && loader.readyState !== 4) {\n            this.stats.aborted = true;\n            loader.abort();\n        }\n        window.clearTimeout(this.requestTimeout);\n        this.requestTimeout = null;\n        window.clearTimeout(this.retryTimeout);\n        this.retryTimeout = null;\n    };\n    XhrLoader.prototype.load = function (context, config, callbacks) {\n        this.context = context;\n        this.config = config;\n        this.callbacks = callbacks;\n        this.stats = { trequest: performance.now(), retry: 0 };\n        this.retryDelay = config.retryDelay;\n        this.loadInternal();\n    };\n    XhrLoader.prototype.loadInternal = function () {\n        var xhr, context = this.context;\n        xhr = this.loader = new XMLHttpRequest();\n        var stats = this.stats;\n        stats.tfirst = 0;\n        stats.loaded = 0;\n        var xhrSetup = this.xhrSetup;\n        try {\n            if (xhrSetup) {\n                try {\n                    xhrSetup(xhr, context.url);\n                }\n                catch (e) {\n                    // fix xhrSetup: (xhr, url) => {xhr.setRequestHeader(\"Content-Language\", \"test\");}\n                    // not working, as xhr.setRequestHeader expects xhr.readyState === OPEN\n                    xhr.open('GET', context.url, true);\n                    xhrSetup(xhr, context.url);\n                }\n            }\n            if (!xhr.readyState) {\n                xhr.open('GET', context.url, true);\n            }\n        }\n        catch (e) {\n            // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS\n            this.callbacks.onError({ code: xhr.status, text: e.message }, context, xhr);\n            return;\n        }\n        if (context.rangeEnd) {\n            xhr.setRequestHeader('Range', 'bytes=' + context.rangeStart + '-' + (context.rangeEnd - 1));\n        }\n        xhr.onreadystatechange = this.readystatechange.bind(this);\n        xhr.onprogress = this.loadprogress.bind(this);\n        xhr.responseType = context.responseType;\n        // setup timeout before we perform request\n        this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), this.config.timeout);\n        xhr.send();\n    };\n    XhrLoader.prototype.readystatechange = function (event) {\n        var xhr = event.currentTarget, readyState = xhr.readyState, stats = this.stats, context = this.context, config = this.config;\n        // don't proceed if xhr has been aborted\n        if (stats.aborted) {\n            return;\n        }\n        // >= HEADERS_RECEIVED\n        if (readyState >= 2) {\n            // clear xhr timeout and rearm it if readyState less than 4\n            window.clearTimeout(this.requestTimeout);\n            if (stats.tfirst === 0) {\n                stats.tfirst = Math.max(performance.now(), stats.trequest);\n            }\n            if (readyState === 4) {\n                var status_1 = xhr.status;\n                // http status between 200 to 299 are all successful\n                if (status_1 >= 200 && status_1 < 300) {\n                    stats.tload = Math.max(stats.tfirst, performance.now());\n                    var data = void 0, len = void 0;\n                    if (context.responseType === 'arraybuffer') {\n                        data = xhr.response;\n                        len = data.byteLength;\n                    }\n                    else {\n                        data = xhr.responseText;\n                        len = data.length;\n                    }\n                    stats.loaded = stats.total = len;\n                    var response = { url: xhr.responseURL, data: data };\n                    this.callbacks.onSuccess(response, stats, context, xhr);\n                }\n                else {\n                    // if max nb of retries reached or if http status between 400 and 499 (such error cannot be recovered, retrying is useless), return error\n                    if (stats.retry >= config.maxRetry || (status_1 >= 400 && status_1 < 499)) {\n                        logger_1.logger.error(status_1 + \" while loading \" + context.url);\n                        this.callbacks.onError({ code: status_1, text: xhr.statusText }, context, xhr);\n                    }\n                    else {\n                        // retry\n                        logger_1.logger.warn(status_1 + \" while loading \" + context.url + \", retrying in \" + this.retryDelay + \"...\");\n                        // aborts and resets internal state\n                        this.destroy();\n                        // schedule retry\n                        this.retryTimeout = window.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n                        // set exponential backoff\n                        this.retryDelay = Math.min(2 * this.retryDelay, config.maxRetryDelay);\n                        stats.retry++;\n                    }\n                }\n            }\n            else {\n                // readyState >= 2 AND readyState !==4 (readyState = HEADERS_RECEIVED || LOADING) rearm timeout as xhr not finished yet\n                this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), config.timeout);\n            }\n        }\n    };\n    XhrLoader.prototype.loadtimeout = function () {\n        logger_1.logger.warn(\"timeout while loading \" + this.context.url);\n        this.callbacks.onTimeout(this.stats, this.context, null);\n    };\n    XhrLoader.prototype.loadprogress = function (event) {\n        var xhr = event.currentTarget, stats = this.stats;\n        stats.loaded = event.loaded;\n        if (event.lengthComputable) {\n            stats.total = event.total;\n        }\n        var onProgress = this.callbacks.onProgress;\n        if (onProgress) {\n            // third arg is to provide on progress data\n            onProgress(stats, this.context, null, xhr);\n        }\n    };\n    return XhrLoader;\n}());\nexports.default = XhrLoader;\n\n\n/***/ })\n\n/******/ })[\"default\"];\n});\n//# sourceMappingURL=hls.js.map\n\n//# sourceURL=webpack:///./node_modules/hls.js/dist/hls.js?");

/***/ }),

/***/ "./node_modules/is-buffer/index.js":
/*!*****************************************!*\
  !*** ./node_modules/is-buffer/index.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/*!\n * Determine if an object is a Buffer\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n  return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n//# sourceURL=webpack:///./node_modules/is-buffer/index.js?");

/***/ }),

/***/ "./node_modules/process/browser.js":
/*!*****************************************!*\
  !*** ./node_modules/process/browser.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?");

/***/ }),

/***/ "./node_modules/setimmediate/setImmediate.js":
/*!***************************************************!*\
  !*** ./node_modules/setimmediate/setImmediate.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/setimmediate/setImmediate.js?");

/***/ }),

/***/ "./node_modules/timers-browserify/main.js":
/*!************************************************!*\
  !*** ./node_modules/timers-browserify/main.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \"undefined\" && global) ||\n            (typeof self !== \"undefined\" && self) ||\n            window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n  if (timeout) {\n    timeout.close();\n  }\n};\n\nfunction Timeout(id, clearFn) {\n  this._id = id;\n  this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n  this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n  clearTimeout(item._idleTimeoutId);\n\n  var msecs = item._idleTimeout;\n  if (msecs >= 0) {\n    item._idleTimeoutId = setTimeout(function onTimeout() {\n      if (item._onTimeout)\n        item._onTimeout();\n    }, msecs);\n  }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(/*! setimmediate */ \"./node_modules/setimmediate/setImmediate.js\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto.  Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n                       (typeof global !== \"undefined\" && global.setImmediate) ||\n                       (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n                         (typeof global !== \"undefined\" && global.clearImmediate) ||\n                         (this && this.clearImmediate);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/timers-browserify/main.js?");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=template&id=411b2c02&scoped=true&":
/*!**************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/btn-list.vue?vue&type=template&id=411b2c02&scoped=true& ***!
  \**************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\"div\", [\n    _c(\"button\", {\n      class: { btn: true, \"btn-min\": _vm.min, \"btn-none\": !_vm.min },\n      on: {\n        click: function($event) {\n          return _vm.ipcSend(_vm.min)\n        }\n      }\n    }),\n    _vm._v(\" \"),\n    _c(\"button\", {\n      class: { btn: true, \"btn-max\": _vm.max, \"btn-none\": !_vm.max },\n      on: {\n        click: function($event) {\n          return _vm.ipcSend(_vm.max)\n        }\n      }\n    }),\n    _vm._v(\" \"),\n    _c(\"button\", {\n      class: { btn: true, \"btn-close\": _vm.close, \"btn-none\": !_vm.close },\n      on: {\n        click: function($event) {\n          return _vm.ipcSend(_vm.close)\n        }\n      }\n    })\n  ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/btn-list.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=template&id=4e94c036&scoped=true&":
/*!*************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dplayer.vue?vue&type=template&id=4e94c036&scoped=true& ***!
  \*************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\"div\")\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/dplayer.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=template&id=247d68d4&scoped=true&":
/*!**********************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/func.vue?vue&type=template&id=247d68d4&scoped=true& ***!
  \**********************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"div\",\n    [\n      _vm._t(\"default\"),\n      _vm._v(\" \"),\n      _c(\"div\", { staticClass: \"func\" }, [\n        _c(\n          \"button\",\n          {\n            on: {\n              click: function($event) {\n                return _vm.ipcSend(\"add-show\")\n              }\n            }\n          },\n          [_vm._v(\"添加自定义视频配置\")]\n        ),\n        _vm._v(\" \"),\n        _c(\"button\", [_vm._v(\"B站弹幕登录（未实装）\")]),\n        _vm._v(\" \"),\n        _c(\"p\", [_vm._v(\"登录后可发送网络弹幕\")])\n      ])\n    ],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/func.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=template&id=ecebbf8c&scoped=true&":
/*!************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/layout.vue?vue&type=template&id=ecebbf8c&scoped=true& ***!
  \************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\"div\", { staticClass: \"container\" }, [\n    _c(\n      \"header\",\n      { staticClass: \"title\" },\n      [\n        _vm._v(\"\\n        弹幕姬 \"),\n        _c(\"span\", { staticClass: \"small\" }, [_vm._v(\"v1.4\")]),\n        _vm._v(\" \"),\n        _c(\"button\", { staticClass: \"about\", on: { click: _vm.about } }, [\n          _vm._v(\"关于软件\")\n        ]),\n        _vm._v(\" \"),\n        _c(\"div\", { staticClass: \"drag\" }),\n        _vm._v(\" \"),\n        _c(\"ipc-btn\", {\n          staticClass: \"btn-list\",\n          attrs: { min: \"main-min\", max: \"main-max\", close: \"main-close\" }\n        })\n      ],\n      1\n    ),\n    _vm._v(\" \"),\n    _c(\n      \"div\",\n      { staticClass: \"middle\" },\n      [\n        _c(\"menu-item\", { staticClass: \"menu\" }),\n        _vm._v(\" \"),\n        _c(\"vedio-item\", { staticClass: \"vedio\" })\n      ],\n      1\n    )\n  ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/layout.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=template&id=a380d422&scoped=true&":
/*!**********************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/menu.vue?vue&type=template&id=a380d422&scoped=true& ***!
  \**********************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\"nav\", { ref: \"menu\", staticClass: \"menu\" }, [\n    _c(\n      \"div\",\n      { ref: \"menu-container\", staticClass: \"menu-container\" },\n      [\n        _c(\"func-item\", { staticClass: \"func-item\" }, [_vm._v(\"功能区\")]),\n        _vm._v(\" \"),\n        _c(\"list-item\", { staticClass: \"list-item\" }, [_vm._v(\"视频列表\")])\n      ],\n      1\n    ),\n    _vm._v(\" \"),\n    _c(\"button\", { staticClass: \"slide\", on: { click: _vm.slideup } }, [\n      _vm._v(\"⚪\")\n    ])\n  ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=template&id=2e15da1b&scoped=true&":
/*!***********************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/vedio.vue?vue&type=template&id=2e15da1b&scoped=true& ***!
  \***********************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"section\",\n    { staticClass: \"index\" },\n    [\n      _c(\"d-player\", {\n        ref: \"video\",\n        staticClass: \"video\",\n        attrs: { options: _vm.options }\n      })\n    ],\n    1\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/vedio.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=template&id=26de6e80&scoped=true&":
/*!****************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/video-list.vue?vue&type=template&id=26de6e80&scoped=true& ***!
  \****************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\"div\", [\n    _c(\"div\", [_vm._t(\"default\")], 2),\n    _vm._v(\" \"),\n    _c(\n      \"ul\",\n      { staticClass: \"list\" },\n      _vm._l(_vm.videoList, function(item, index) {\n        return _c(\n          \"li\",\n          {\n            key: index,\n            class: { \"list-li\": true, active: _vm.current === index },\n            on: {\n              click: function($event) {\n                return _vm.videoChange(\n                  item.url,\n                  item.av,\n                  item.is,\n                  item.ep,\n                  index\n                )\n              }\n            }\n          },\n          [_vm._v(\"\\n            \" + _vm._s(item.title) + \"\\n        \")]\n        )\n      }),\n      0\n    )\n  ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/video-list.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js":
/*!********************************************************************!*\
  !*** ./node_modules/vue-loader/lib/runtime/componentNormalizer.js ***!
  \********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return normalizeComponent; });\n/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nfunction normalizeComponent (\n  scriptExports,\n  render,\n  staticRenderFns,\n  functionalTemplate,\n  injectStyles,\n  scopeId,\n  moduleIdentifier, /* server only */\n  shadowMode /* vue-cli only */\n) {\n  // Vue.extend constructor export interop\n  var options = typeof scriptExports === 'function'\n    ? scriptExports.options\n    : scriptExports\n\n  // render functions\n  if (render) {\n    options.render = render\n    options.staticRenderFns = staticRenderFns\n    options._compiled = true\n  }\n\n  // functional template\n  if (functionalTemplate) {\n    options.functional = true\n  }\n\n  // scopedId\n  if (scopeId) {\n    options._scopeId = 'data-v-' + scopeId\n  }\n\n  var hook\n  if (moduleIdentifier) { // server build\n    hook = function (context) {\n      // 2.3 injection\n      context =\n        context || // cached call\n        (this.$vnode && this.$vnode.ssrContext) || // stateful\n        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n      // 2.2 with runInNewContext: true\n      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n        context = __VUE_SSR_CONTEXT__\n      }\n      // inject component styles\n      if (injectStyles) {\n        injectStyles.call(this, context)\n      }\n      // register component module identifier for async chunk inferrence\n      if (context && context._registeredComponents) {\n        context._registeredComponents.add(moduleIdentifier)\n      }\n    }\n    // used by ssr in case component is cached and beforeCreate\n    // never gets called\n    options._ssrRegister = hook\n  } else if (injectStyles) {\n    hook = shadowMode\n      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n      : injectStyles\n  }\n\n  if (hook) {\n    if (options.functional) {\n      // for template-only hot-reload because in that case the render fn doesn't\n      // go through the normalizer\n      options._injectStyles = hook\n      // register for functioal component in vue file\n      var originalRender = options.render\n      options.render = function renderWithStyleInjection (h, context) {\n        hook.call(context)\n        return originalRender(h, context)\n      }\n    } else {\n      // inject component registration as beforeCreate hook\n      var existing = options.beforeCreate\n      options.beforeCreate = existing\n        ? [].concat(existing, hook)\n        : [hook]\n    }\n  }\n\n  return {\n    exports: scriptExports,\n    options: options\n  }\n}\n\n\n//# sourceURL=webpack:///./node_modules/vue-loader/lib/runtime/componentNormalizer.js?");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css&":
/*!*******************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css& ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"0ba6e33d\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/btn-list.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css&":
/*!******************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css& ***!
  \******************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"7bcd5d30\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/dplayer.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css&":
/*!***************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css& ***!
  \***************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"6c5f7986\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/func.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css&":
/*!*****************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css& ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"f2be13f4\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/layout.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=0&lang=css&":
/*!***************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/menu.vue?vue&type=style&index=0&lang=css& ***!
  \***************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./menu.vue?vue&type=style&index=0&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=0&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"ccea95ea\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css&":
/*!***************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css& ***!
  \***************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"0365c277\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css&":
/*!****************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css& ***!
  \****************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"02625e9a\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/vedio.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css&":
/*!*********************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css& ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css& */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"a97db2f0\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/components/video-list.vue?./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/vue-style-loader/lib/addStylesClient.js":
/*!**************************************************************!*\
  !*** ./node_modules/vue-style-loader/lib/addStylesClient.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return addStylesClient; });\n/* harmony import */ var _listToStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./listToStyles */ \"./node_modules/vue-style-loader/lib/listToStyles.js\");\n/*\n  MIT License http://www.opensource.org/licenses/mit-license.php\n  Author Tobias Koppers @sokra\n  Modified by Evan You @yyx990803\n*/\n\n\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n  if (!hasDocument) {\n    throw new Error(\n    'vue-style-loader cannot be used in a non-browser environment. ' +\n    \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n  ) }\n}\n\n/*\ntype StyleObject = {\n  id: number;\n  parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n  css: string;\n  media: string;\n  sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n  [id: number]: {\n    id: number,\n    refs: number,\n    parts: Array<(obj?: StyleObjectPart) => void>\n  }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nfunction addStylesClient (parentId, list, _isProduction, _options) {\n  isProduction = _isProduction\n\n  options = _options || {}\n\n  var styles = Object(_listToStyles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(parentId, list)\n  addStylesToDom(styles)\n\n  return function update (newList) {\n    var mayRemove = []\n    for (var i = 0; i < styles.length; i++) {\n      var item = styles[i]\n      var domStyle = stylesInDom[item.id]\n      domStyle.refs--\n      mayRemove.push(domStyle)\n    }\n    if (newList) {\n      styles = Object(_listToStyles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(parentId, newList)\n      addStylesToDom(styles)\n    } else {\n      styles = []\n    }\n    for (var i = 0; i < mayRemove.length; i++) {\n      var domStyle = mayRemove[i]\n      if (domStyle.refs === 0) {\n        for (var j = 0; j < domStyle.parts.length; j++) {\n          domStyle.parts[j]()\n        }\n        delete stylesInDom[domStyle.id]\n      }\n    }\n  }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n  for (var i = 0; i < styles.length; i++) {\n    var item = styles[i]\n    var domStyle = stylesInDom[item.id]\n    if (domStyle) {\n      domStyle.refs++\n      for (var j = 0; j < domStyle.parts.length; j++) {\n        domStyle.parts[j](item.parts[j])\n      }\n      for (; j < item.parts.length; j++) {\n        domStyle.parts.push(addStyle(item.parts[j]))\n      }\n      if (domStyle.parts.length > item.parts.length) {\n        domStyle.parts.length = item.parts.length\n      }\n    } else {\n      var parts = []\n      for (var j = 0; j < item.parts.length; j++) {\n        parts.push(addStyle(item.parts[j]))\n      }\n      stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n    }\n  }\n}\n\nfunction createStyleElement () {\n  var styleElement = document.createElement('style')\n  styleElement.type = 'text/css'\n  head.appendChild(styleElement)\n  return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n  var update, remove\n  var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n  if (styleElement) {\n    if (isProduction) {\n      // has SSR styles and in production mode.\n      // simply do nothing.\n      return noop\n    } else {\n      // has SSR styles but in dev mode.\n      // for some reason Chrome can't handle source map in server-rendered\n      // style tags - source maps in <style> only works if the style tag is\n      // created and inserted dynamically. So we remove the server rendered\n      // styles and inject new ones.\n      styleElement.parentNode.removeChild(styleElement)\n    }\n  }\n\n  if (isOldIE) {\n    // use singleton mode for IE9.\n    var styleIndex = singletonCounter++\n    styleElement = singletonElement || (singletonElement = createStyleElement())\n    update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n    remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n  } else {\n    // use multi-style-tag mode in all other cases\n    styleElement = createStyleElement()\n    update = applyToTag.bind(null, styleElement)\n    remove = function () {\n      styleElement.parentNode.removeChild(styleElement)\n    }\n  }\n\n  update(obj)\n\n  return function updateStyle (newObj /* StyleObjectPart */) {\n    if (newObj) {\n      if (newObj.css === obj.css &&\n          newObj.media === obj.media &&\n          newObj.sourceMap === obj.sourceMap) {\n        return\n      }\n      update(obj = newObj)\n    } else {\n      remove()\n    }\n  }\n}\n\nvar replaceText = (function () {\n  var textStore = []\n\n  return function (index, replacement) {\n    textStore[index] = replacement\n    return textStore.filter(Boolean).join('\\n')\n  }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n  var css = remove ? '' : obj.css\n\n  if (styleElement.styleSheet) {\n    styleElement.styleSheet.cssText = replaceText(index, css)\n  } else {\n    var cssNode = document.createTextNode(css)\n    var childNodes = styleElement.childNodes\n    if (childNodes[index]) styleElement.removeChild(childNodes[index])\n    if (childNodes.length) {\n      styleElement.insertBefore(cssNode, childNodes[index])\n    } else {\n      styleElement.appendChild(cssNode)\n    }\n  }\n}\n\nfunction applyToTag (styleElement, obj) {\n  var css = obj.css\n  var media = obj.media\n  var sourceMap = obj.sourceMap\n\n  if (media) {\n    styleElement.setAttribute('media', media)\n  }\n  if (options.ssrId) {\n    styleElement.setAttribute(ssrIdKey, obj.id)\n  }\n\n  if (sourceMap) {\n    // https://developer.chrome.com/devtools/docs/javascript-debugging\n    // this makes source maps inside style tags work properly in Chrome\n    css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n    // http://stackoverflow.com/a/26603875\n    css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n  }\n\n  if (styleElement.styleSheet) {\n    styleElement.styleSheet.cssText = css\n  } else {\n    while (styleElement.firstChild) {\n      styleElement.removeChild(styleElement.firstChild)\n    }\n    styleElement.appendChild(document.createTextNode(css))\n  }\n}\n\n\n//# sourceURL=webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js?");

/***/ }),

/***/ "./node_modules/vue-style-loader/lib/listToStyles.js":
/*!***********************************************************!*\
  !*** ./node_modules/vue-style-loader/lib/listToStyles.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return listToStyles; });\n/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nfunction listToStyles (parentId, list) {\n  var styles = []\n  var newStyles = {}\n  for (var i = 0; i < list.length; i++) {\n    var item = list[i]\n    var id = item[0]\n    var css = item[1]\n    var media = item[2]\n    var sourceMap = item[3]\n    var part = {\n      id: parentId + ':' + i,\n      css: css,\n      media: media,\n      sourceMap: sourceMap\n    }\n    if (!newStyles[id]) {\n      styles.push(newStyles[id] = { id: id, parts: [part] })\n    } else {\n      newStyles[id].parts.push(part)\n    }\n  }\n  return styles\n}\n\n\n//# sourceURL=webpack:///./node_modules/vue-style-loader/lib/listToStyles.js?");

/***/ }),

/***/ "./node_modules/vue/dist/vue.runtime.esm.js":
/*!**************************************************!*\
  !*** ./node_modules/vue/dist/vue.runtime.esm.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*!\n * Vue.js v2.6.10\n * (c) 2014-2019 Evan You\n * Released under the MIT License.\n */\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction isFalse (v) {\n  return v === false\n}\n\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive (value) {\n  return (\n    typeof value === 'string' ||\n    typeof value === 'number' ||\n    // $flow-disable-line\n    typeof value === 'symbol' ||\n    typeof value === 'boolean'\n  )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n  return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n  return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n  return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n  var n = parseFloat(String(val));\n  return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\nfunction isPromise (val) {\n  return (\n    isDef(val) &&\n    typeof val.then === 'function' &&\n    typeof val.catch === 'function'\n  )\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n  return val == null\n    ? ''\n    : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array.\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n\n  boundFn._length = fn.length;\n  return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n  return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n  ? nativeBind\n  : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/* eslint-disable no-unused-vars */\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/* eslint-enable no-unused-vars */\n\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  if (a === b) { return true }\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      var isArrayA = Array.isArray(a);\n      var isArrayB = Array.isArray(b);\n      if (isArrayA && isArrayB) {\n        return a.length === b.length && a.every(function (e, i) {\n          return looseEqual(e, b[i])\n        })\n      } else if (a instanceof Date && b instanceof Date) {\n        return a.getTime() === b.getTime()\n      } else if (!isArrayA && !isArrayB) {\n        var keysA = Object.keys(a);\n        var keysB = Object.keys(b);\n        return keysA.length === keysB.length && keysA.every(function (key) {\n          return looseEqual(a[key], b[key])\n        })\n      } else {\n        /* istanbul ignore next */\n        return false\n      }\n    } catch (e) {\n      /* istanbul ignore next */\n      return false\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn.apply(this, arguments);\n    }\n  }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\n\nvar ASSET_TYPES = [\n  'component',\n  'directive',\n  'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n  'beforeCreate',\n  'created',\n  'beforeMount',\n  'mounted',\n  'beforeUpdate',\n  'updated',\n  'beforeDestroy',\n  'destroyed',\n  'activated',\n  'deactivated',\n  'errorCaptured',\n  'serverPrefetch'\n];\n\n/*  */\n\n\n\nvar config = ({\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  // $flow-disable-line\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: \"development\" !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: \"development\" !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Warn handler for watcher warns\n   */\n  warnHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  // $flow-disable-line\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if an attribute is reserved so that it cannot be used as a component\n   * prop. This is platform-dependent and may be overwritten.\n   */\n  isReservedAttr: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * Perform updates asynchronously. Intended to be used by Vue Test Utils\n   * This will significantly reduce performance if set to false.\n   */\n  async: true,\n\n  /**\n   * Exposed for legacy reasons\n   */\n  _lifecycleHooks: LIFECYCLE_HOOKS\n});\n\n/*  */\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp((\"[^\" + (unicodeRegExp.source) + \".$_\\\\d]\"));\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\nvar isPhantomJS = UA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\n\nvar supportsPassive = false;\nif (inBrowser) {\n  try {\n    var opts = {};\n    Object.defineProperty(opts, 'passive', ({\n      get: function get () {\n        /* istanbul ignore next */\n        supportsPassive = true;\n      }\n    })); // https://github.com/facebook/flow/issues/285\n    window.addEventListener('test-passive', null, opts);\n  } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = /*@__PURE__*/(function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\n/*  */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (true) {\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    var trace = vm ? generateComponentTrace(vm) : '';\n\n    if (config.warnHandler) {\n      config.warnHandler.call(null, msg, vm, trace);\n    } else if (hasConsole && (!config.silent)) {\n      console.error((\"[Vue warn]: \" + msg + trace));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + (\n        vm ? generateComponentTrace(vm) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var options = typeof vm === 'function' && vm.cid != null\n      ? vm.options\n      : vm._isVue\n        ? vm.$options || vm.constructor.options\n        : vm;\n    var name = options.name || options._componentTag;\n    var file = options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var repeat = function (str, n) {\n    var res = '';\n    while (n) {\n      if (n % 2 === 1) { res += str; }\n      if (n > 1) { str += str; }\n      n >>= 1;\n    }\n    return res\n  };\n\n  generateComponentTrace = function (vm) {\n    if (vm._isVue && vm.$parent) {\n      var tree = [];\n      var currentRecursiveSequence = 0;\n      while (vm) {\n        if (tree.length > 0) {\n          var last = tree[tree.length - 1];\n          if (last.constructor === vm.constructor) {\n            currentRecursiveSequence++;\n            vm = vm.$parent;\n            continue\n          } else if (currentRecursiveSequence > 0) {\n            tree[tree.length - 1] = [last, currentRecursiveSequence];\n            currentRecursiveSequence = 0;\n          }\n        }\n        tree.push(vm);\n        vm = vm.$parent;\n      }\n      return '\\n\\nfound in\\n\\n' + tree\n        .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n            ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n            : formatComponentName(vm))); })\n        .join('\\n')\n    } else {\n      return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n    }\n  };\n}\n\n/*  */\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.target) {\n    Dep.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  if ( true && !config.async) {\n    // subs aren't sorted in scheduler if not running async\n    // we need to sort them now to make sure they fire in correct\n    // order\n    subs.sort(function (a, b) { return a.id - b.id; });\n  }\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (target) {\n  targetStack.push(target);\n  Dep.target = target;\n}\n\nfunction popTarget () {\n  targetStack.pop();\n  Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions,\n  asyncFactory\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.fnContext = undefined;\n  this.fnOptions = undefined;\n  this.fnScopeId = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n  this.asyncFactory = asyncFactory;\n  this.asyncMeta = undefined;\n  this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n  if ( text === void 0 ) text = '';\n\n  var node = new VNode();\n  node.text = text;\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(),\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions,\n    vnode.asyncFactory\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isComment = vnode.isComment;\n  cloned.fnContext = vnode.fnContext;\n  cloned.fnOptions = vnode.fnOptions;\n  cloned.fnScopeId = vnode.fnScopeId;\n  cloned.asyncMeta = vnode.asyncMeta;\n  cloned.isCloned = true;\n  return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var args = [], len = arguments.length;\n    while ( len-- ) args[ len ] = arguments[ len ];\n\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n  shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    if (hasProto) {\n      protoAugment(value, arrayMethods);\n    } else {\n      copyAugment(value, arrayMethods, arrayKeys);\n    }\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value) || value instanceof VNode) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    shouldObserve &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter,\n  shallow\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n  if ((!getter || setter) && arguments.length === 2) {\n    val = obj[key];\n  }\n\n  var childOb = !shallow && observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.target) {\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n          if (Array.isArray(value)) {\n            dependArray(value);\n          }\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if ( true && customSetter) {\n        customSetter();\n      }\n      // #7981: for accessor properties without setter\n      if (getter && !setter) { return }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = !shallow && observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if ( true &&\n    (isUndef(target) || isPrimitive(target))\n  ) {\n    warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n  }\n  if (Array.isArray(target) && isValidArrayIndex(key)) {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (key in target && !(key in Object.prototype)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n     true && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if ( true &&\n    (isUndef(target) || isPrimitive(target))\n  ) {\n    warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n  }\n  if (Array.isArray(target) && isValidArrayIndex(key)) {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n     true && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (true) {\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n\n  var keys = hasSymbol\n    ? Reflect.ownKeys(from)\n    : Object.keys(from);\n\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    // in case the object is already observed...\n    if (key === '__ob__') { continue }\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (\n      toVal !== fromVal &&\n      isPlainObject(toVal) &&\n      isPlainObject(fromVal)\n    ) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n        typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n      )\n    }\n  } else {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm, vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm, vm)\n        : parentVal;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n}\n\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    if (childVal && typeof childVal !== 'function') {\n       true && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n\n      return parentVal\n    }\n    return mergeDataOrFn(parentVal, childVal)\n  }\n\n  return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  var res = childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal;\n  return res\n    ? dedupeHooks(res)\n    : res\n}\n\nfunction dedupeHooks (hooks) {\n  var res = [];\n  for (var i = 0; i < hooks.length; i++) {\n    if (res.indexOf(hooks[i]) === -1) {\n      res.push(hooks[i]);\n    }\n  }\n  return res\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n  parentVal,\n  childVal,\n  vm,\n  key\n) {\n  var res = Object.create(parentVal || null);\n  if (childVal) {\n     true && assertObjectType(key, childVal, vm);\n    return extend(res, childVal)\n  } else {\n    return res\n  }\n}\n\nASSET_TYPES.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n  parentVal,\n  childVal,\n  vm,\n  key\n) {\n  // work around Firefox's Object.prototype.watch...\n  if (parentVal === nativeWatch) { parentVal = undefined; }\n  if (childVal === nativeWatch) { childVal = undefined; }\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (true) {\n    assertObjectType(key, childVal, vm);\n  }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key$1 in childVal) {\n    var parent = ret[key$1];\n    var child = childVal[key$1];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key$1] = parent\n      ? parent.concat(child)\n      : Array.isArray(child) ? child : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n  parentVal,\n  childVal,\n  vm,\n  key\n) {\n  if (childVal && \"development\" !== 'production') {\n    assertObjectType(key, childVal, vm);\n  }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  if (childVal) { extend(ret, childVal); }\n  return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    validateComponentName(key);\n  }\n}\n\nfunction validateComponentName (name) {\n  if (!new RegExp((\"^[a-zA-Z][\\\\-\\\\.0-9_\" + (unicodeRegExp.source) + \"]*$\")).test(name)) {\n    warn(\n      'Invalid component name: \"' + name + '\". Component names ' +\n      'should conform to valid custom element name in html5 specification.'\n    );\n  }\n  if (isBuiltInTag(name) || config.isReservedTag(name)) {\n    warn(\n      'Do not use built-in or reserved HTML elements as component ' +\n      'id: ' + name\n    );\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else if (true) {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  } else if (true) {\n    warn(\n      \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n      \"but got \" + (toRawType(props)) + \".\",\n      vm\n    );\n  }\n  options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n  var inject = options.inject;\n  if (!inject) { return }\n  var normalized = options.inject = {};\n  if (Array.isArray(inject)) {\n    for (var i = 0; i < inject.length; i++) {\n      normalized[inject[i]] = { from: inject[i] };\n    }\n  } else if (isPlainObject(inject)) {\n    for (var key in inject) {\n      var val = inject[key];\n      normalized[key] = isPlainObject(val)\n        ? extend({ from: key }, val)\n        : { from: val };\n    }\n  } else if (true) {\n    warn(\n      \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n      \"but got \" + (toRawType(inject)) + \".\",\n      vm\n    );\n  }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def$$1 = dirs[key];\n      if (typeof def$$1 === 'function') {\n        dirs[key] = { bind: def$$1, update: def$$1 };\n      }\n    }\n  }\n}\n\nfunction assertObjectType (name, value, vm) {\n  if (!isPlainObject(value)) {\n    warn(\n      \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n      \"but got \" + (toRawType(value)) + \".\",\n      vm\n    );\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  if (true) {\n    checkComponents(child);\n  }\n\n  if (typeof child === 'function') {\n    child = child.options;\n  }\n\n  normalizeProps(child, vm);\n  normalizeInject(child, vm);\n  normalizeDirectives(child);\n\n  // Apply extends and mixins on the child options,\n  // but only if it is a raw options object that isn't\n  // the result of another mergeOptions call.\n  // Only merged options has the _base property.\n  if (!child._base) {\n    if (child.extends) {\n      parent = mergeOptions(parent, child.extends, vm);\n    }\n    if (child.mixins) {\n      for (var i = 0, l = child.mixins.length; i < l; i++) {\n        parent = mergeOptions(parent, child.mixins[i], vm);\n      }\n    }\n  }\n\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if ( true && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\n\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // boolean casting\n  var booleanIndex = getTypeIndex(Boolean, prop.type);\n  if (booleanIndex > -1) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (value === '' || value === hyphenate(key)) {\n      // only cast empty string / same name to boolean if\n      // boolean has higher priority\n      var stringIndex = getTypeIndex(String, prop.type);\n      if (stringIndex < 0 || booleanIndex < stringIndex) {\n        value = true;\n      }\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldObserve = shouldObserve;\n    toggleObserving(true);\n    observe(value);\n    toggleObserving(prevShouldObserve);\n  }\n  if (\n    true\n  ) {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if ( true && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined\n  ) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n\n  if (!valid) {\n    warn(\n      getInvalidTypeMessage(name, value, expectedTypes),\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (simpleCheckRE.test(expectedType)) {\n    var t = typeof value;\n    valid = t === expectedType.toLowerCase();\n    // for primitive wrapper objects\n    if (!valid && t === 'object') {\n      valid = value instanceof type;\n    }\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n  return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n  if (!Array.isArray(expectedTypes)) {\n    return isSameType(expectedTypes, type) ? 0 : -1\n  }\n  for (var i = 0, len = expectedTypes.length; i < len; i++) {\n    if (isSameType(expectedTypes[i], type)) {\n      return i\n    }\n  }\n  return -1\n}\n\nfunction getInvalidTypeMessage (name, value, expectedTypes) {\n  var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n    \" Expected \" + (expectedTypes.map(capitalize).join(', '));\n  var expectedType = expectedTypes[0];\n  var receivedType = toRawType(value);\n  var expectedValue = styleValue(value, expectedType);\n  var receivedValue = styleValue(value, receivedType);\n  // check if we need to specify expected value\n  if (expectedTypes.length === 1 &&\n      isExplicable(expectedType) &&\n      !isBoolean(expectedType, receivedType)) {\n    message += \" with value \" + expectedValue;\n  }\n  message += \", got \" + receivedType + \" \";\n  // check if we need to specify received value\n  if (isExplicable(receivedType)) {\n    message += \"with value \" + receivedValue + \".\";\n  }\n  return message\n}\n\nfunction styleValue (value, type) {\n  if (type === 'String') {\n    return (\"\\\"\" + value + \"\\\"\")\n  } else if (type === 'Number') {\n    return (\"\" + (Number(value)))\n  } else {\n    return (\"\" + value)\n  }\n}\n\nfunction isExplicable (value) {\n  var explicitTypes = ['string', 'number', 'boolean'];\n  return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })\n}\n\nfunction isBoolean () {\n  var args = [], len = arguments.length;\n  while ( len-- ) args[ len ] = arguments[ len ];\n\n  return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })\n}\n\n/*  */\n\nfunction handleError (err, vm, info) {\n  // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n  // See: https://github.com/vuejs/vuex/issues/1505\n  pushTarget();\n  try {\n    if (vm) {\n      var cur = vm;\n      while ((cur = cur.$parent)) {\n        var hooks = cur.$options.errorCaptured;\n        if (hooks) {\n          for (var i = 0; i < hooks.length; i++) {\n            try {\n              var capture = hooks[i].call(cur, err, vm, info) === false;\n              if (capture) { return }\n            } catch (e) {\n              globalHandleError(e, cur, 'errorCaptured hook');\n            }\n          }\n        }\n      }\n    }\n    globalHandleError(err, vm, info);\n  } finally {\n    popTarget();\n  }\n}\n\nfunction invokeWithErrorHandling (\n  handler,\n  context,\n  args,\n  vm,\n  info\n) {\n  var res;\n  try {\n    res = args ? handler.apply(context, args) : handler.call(context);\n    if (res && !res._isVue && isPromise(res) && !res._handled) {\n      res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n      // issue #9511\n      // avoid catch triggering multiple times when nested calls\n      res._handled = true;\n    }\n  } catch (e) {\n    handleError(e, vm, info);\n  }\n  return res\n}\n\nfunction globalHandleError (err, vm, info) {\n  if (config.errorHandler) {\n    try {\n      return config.errorHandler.call(null, err, vm, info)\n    } catch (e) {\n      // if the user intentionally throws the original error in the handler,\n      // do not log it twice\n      if (e !== err) {\n        logError(e, null, 'config.errorHandler');\n      }\n    }\n  }\n  logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n  if (true) {\n    warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n  }\n  /* istanbul ignore else */\n  if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n    console.error(err);\n  } else {\n    throw err\n  }\n}\n\n/*  */\n\nvar isUsingMicroTask = false;\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n  pending = false;\n  var copies = callbacks.slice(0);\n  callbacks.length = 0;\n  for (var i = 0; i < copies.length; i++) {\n    copies[i]();\n  }\n}\n\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n  var p = Promise.resolve();\n  timerFunc = function () {\n    p.then(flushCallbacks);\n    // In problematic UIWebViews, Promise.then doesn't completely break, but\n    // it can get stuck in a weird state where callbacks are pushed into the\n    // microtask queue but the queue isn't being flushed, until the browser\n    // needs to do some other work, e.g. handle a timer. Therefore we can\n    // \"force\" the microtask queue to be flushed by adding an empty timer.\n    if (isIOS) { setTimeout(noop); }\n  };\n  isUsingMicroTask = true;\n} else if (!isIE && typeof MutationObserver !== 'undefined' && (\n  isNative(MutationObserver) ||\n  // PhantomJS and iOS 7.x\n  MutationObserver.toString() === '[object MutationObserverConstructor]'\n)) {\n  // Use MutationObserver where native Promise is not available,\n  // e.g. PhantomJS, iOS7, Android 4.4\n  // (#6466 MutationObserver is unreliable in IE11)\n  var counter = 1;\n  var observer = new MutationObserver(flushCallbacks);\n  var textNode = document.createTextNode(String(counter));\n  observer.observe(textNode, {\n    characterData: true\n  });\n  timerFunc = function () {\n    counter = (counter + 1) % 2;\n    textNode.data = String(counter);\n  };\n  isUsingMicroTask = true;\n} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n  // Fallback to setImmediate.\n  // Techinically it leverages the (macro) task queue,\n  // but it is still a better choice than setTimeout.\n  timerFunc = function () {\n    setImmediate(flushCallbacks);\n  };\n} else {\n  // Fallback to setTimeout.\n  timerFunc = function () {\n    setTimeout(flushCallbacks, 0);\n  };\n}\n\nfunction nextTick (cb, ctx) {\n  var _resolve;\n  callbacks.push(function () {\n    if (cb) {\n      try {\n        cb.call(ctx);\n      } catch (e) {\n        handleError(e, ctx, 'nextTick');\n      }\n    } else if (_resolve) {\n      _resolve(ctx);\n    }\n  });\n  if (!pending) {\n    pending = true;\n    timerFunc();\n  }\n  // $flow-disable-line\n  if (!cb && typeof Promise !== 'undefined') {\n    return new Promise(function (resolve) {\n      _resolve = resolve;\n    })\n  }\n}\n\n/*  */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (true) {\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      'referenced during render. Make sure that this property is reactive, ' +\n      'either in the data option, or for class-based components, by ' +\n      'initializing the property. ' +\n      'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n      target\n    );\n  };\n\n  var warnReservedPrefix = function (target, key) {\n    warn(\n      \"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" +\n      'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n      'prevent conflicts with Vue internals' +\n      'See: https://vuejs.org/v2/api/#data',\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' && isNative(Proxy);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) ||\n        (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));\n      if (!has && !isAllowed) {\n        if (key in target.$data) { warnReservedPrefix(target, key); }\n        else { warnNonPresent(target, key); }\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        if (key in target.$data) { warnReservedPrefix(target, key); }\n        else { warnNonPresent(target, key); }\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\n/*  */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n  _traverse(val, seenObjects);\n  seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\nvar mark;\nvar measure;\n\nif (true) {\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      // perf.clearMeasures(name)\n    };\n  }\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var passive = name.charAt(0) === '&';\n  name = passive ? name.slice(1) : name;\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture,\n    passive: passive\n  }\n});\n\nfunction createFnInvoker (fns, vm) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      var cloned = fns.slice();\n      for (var i = 0; i < cloned.length; i++) {\n        invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n      }\n    } else {\n      // return handler return value for single handlers\n      return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\")\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  createOnceHandler,\n  vm\n) {\n  var name, def$$1, cur, old, event;\n  for (name in on) {\n    def$$1 = cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (isUndef(cur)) {\n       true && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (isUndef(old)) {\n      if (isUndef(cur.fns)) {\n        cur = on[name] = createFnInvoker(cur, vm);\n      }\n      if (isTrue(event.once)) {\n        cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n      }\n      add(event.name, cur, event.capture, event.passive, event.params);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (isUndef(on[name])) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n  if (def instanceof VNode) {\n    def = def.data.hook || (def.data.hook = {});\n  }\n  var invoker;\n  var oldHook = def[hookKey];\n\n  function wrappedHook () {\n    hook.apply(this, arguments);\n    // important: remove merged hook to ensure it's called only once\n    // and prevent memory leak\n    remove(invoker.fns, wrappedHook);\n  }\n\n  if (isUndef(oldHook)) {\n    // no existing hook\n    invoker = createFnInvoker([wrappedHook]);\n  } else {\n    /* istanbul ignore if */\n    if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n      // already a merged invoker\n      invoker = oldHook;\n      invoker.fns.push(wrappedHook);\n    } else {\n      // existing plain hook\n      invoker = createFnInvoker([oldHook, wrappedHook]);\n    }\n  }\n\n  invoker.merged = true;\n  def[hookKey] = invoker;\n}\n\n/*  */\n\nfunction extractPropsFromVNodeData (\n  data,\n  Ctor,\n  tag\n) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (isUndef(propOptions)) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  if (isDef(attrs) || isDef(props)) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      if (true) {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && hasOwn(attrs, keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey, false);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (isDef(hash)) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction isTextNode (node) {\n  return isDef(node) && isDef(node.text) && isFalse(node.isComment)\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, lastIndex, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (isUndef(c) || typeof c === 'boolean') { continue }\n    lastIndex = res.length - 1;\n    last = res[lastIndex];\n    //  nested\n    if (Array.isArray(c)) {\n      if (c.length > 0) {\n        c = normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i));\n        // merge adjacent text nodes\n        if (isTextNode(c[0]) && isTextNode(last)) {\n          res[lastIndex] = createTextVNode(last.text + (c[0]).text);\n          c.shift();\n        }\n        res.push.apply(res, c);\n      }\n    } else if (isPrimitive(c)) {\n      if (isTextNode(last)) {\n        // merge adjacent text nodes\n        // this is necessary for SSR hydration because text nodes are\n        // essentially merged when rendered to HTML strings\n        res[lastIndex] = createTextVNode(last.text + c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (isTextNode(c) && isTextNode(last)) {\n        // merge adjacent text nodes\n        res[lastIndex] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (isTrue(children._isVList) &&\n          isDef(c.tag) &&\n          isUndef(c.key) &&\n          isDef(nestedIndex)) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var result = resolveInject(vm.$options.inject, vm);\n  if (result) {\n    toggleObserving(false);\n    Object.keys(result).forEach(function (key) {\n      /* istanbul ignore else */\n      if (true) {\n        defineReactive$$1(vm, key, result[key], function () {\n          warn(\n            \"Avoid mutating an injected value directly since the changes will be \" +\n            \"overwritten whenever the provided component re-renders. \" +\n            \"injection being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        });\n      } else {}\n    });\n    toggleObserving(true);\n  }\n}\n\nfunction resolveInject (inject, vm) {\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    var result = Object.create(null);\n    var keys = hasSymbol\n      ? Reflect.ownKeys(inject)\n      : Object.keys(inject);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n      // #6574 in case the inject object is observed...\n      if (key === '__ob__') { continue }\n      var provideKey = inject[key].from;\n      var source = vm;\n      while (source) {\n        if (source._provided && hasOwn(source._provided, provideKey)) {\n          result[key] = source._provided[provideKey];\n          break\n        }\n        source = source.$parent;\n      }\n      if (!source) {\n        if ('default' in inject[key]) {\n          var provideDefault = inject[key].default;\n          result[key] = typeof provideDefault === 'function'\n            ? provideDefault.call(vm)\n            : provideDefault;\n        } else if (true) {\n          warn((\"Injection \\\"\" + key + \"\\\" not found\"), vm);\n        }\n      }\n    }\n    return result\n  }\n}\n\n/*  */\n\n\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  if (!children || !children.length) {\n    return {}\n  }\n  var slots = {};\n  for (var i = 0, l = children.length; i < l; i++) {\n    var child = children[i];\n    var data = child.data;\n    // remove slot attribute if the node is resolved as a Vue slot node\n    if (data && data.attrs && data.attrs.slot) {\n      delete data.attrs.slot;\n    }\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.fnContext === context) &&\n      data && data.slot != null\n    ) {\n      var name = data.slot;\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children || []);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      (slots.default || (slots.default = [])).push(child);\n    }\n  }\n  // ignore slots that contains only whitespace\n  for (var name$1 in slots) {\n    if (slots[name$1].every(isWhitespace)) {\n      delete slots[name$1];\n    }\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return (node.isComment && !node.asyncFactory) || node.text === ' '\n}\n\n/*  */\n\nfunction normalizeScopedSlots (\n  slots,\n  normalSlots,\n  prevSlots\n) {\n  var res;\n  var hasNormalSlots = Object.keys(normalSlots).length > 0;\n  var isStable = slots ? !!slots.$stable : !hasNormalSlots;\n  var key = slots && slots.$key;\n  if (!slots) {\n    res = {};\n  } else if (slots._normalized) {\n    // fast path 1: child component re-render only, parent did not change\n    return slots._normalized\n  } else if (\n    isStable &&\n    prevSlots &&\n    prevSlots !== emptyObject &&\n    key === prevSlots.$key &&\n    !hasNormalSlots &&\n    !prevSlots.$hasNormal\n  ) {\n    // fast path 2: stable scoped slots w/ no normal slots to proxy,\n    // only need to normalize once\n    return prevSlots\n  } else {\n    res = {};\n    for (var key$1 in slots) {\n      if (slots[key$1] && key$1[0] !== '$') {\n        res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);\n      }\n    }\n  }\n  // expose normal slots on scopedSlots\n  for (var key$2 in normalSlots) {\n    if (!(key$2 in res)) {\n      res[key$2] = proxyNormalSlot(normalSlots, key$2);\n    }\n  }\n  // avoriaz seems to mock a non-extensible $scopedSlots object\n  // and when that is passed down this would cause an error\n  if (slots && Object.isExtensible(slots)) {\n    (slots)._normalized = res;\n  }\n  def(res, '$stable', isStable);\n  def(res, '$key', key);\n  def(res, '$hasNormal', hasNormalSlots);\n  return res\n}\n\nfunction normalizeScopedSlot(normalSlots, key, fn) {\n  var normalized = function () {\n    var res = arguments.length ? fn.apply(null, arguments) : fn({});\n    res = res && typeof res === 'object' && !Array.isArray(res)\n      ? [res] // single vnode\n      : normalizeChildren(res);\n    return res && (\n      res.length === 0 ||\n      (res.length === 1 && res[0].isComment) // #9658\n    ) ? undefined\n      : res\n  };\n  // this is a slot using the new v-slot syntax without scope. although it is\n  // compiled as a scoped slot, render fn users would expect it to be present\n  // on this.$slots because the usage is semantically a normal slot.\n  if (fn.proxy) {\n    Object.defineProperty(normalSlots, key, {\n      get: normalized,\n      enumerable: true,\n      configurable: true\n    });\n  }\n  return normalized\n}\n\nfunction proxyNormalSlot(slots, key) {\n  return function () { return slots[key]; }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    if (hasSymbol && val[Symbol.iterator]) {\n      ret = [];\n      var iterator = val[Symbol.iterator]();\n      var result = iterator.next();\n      while (!result.done) {\n        ret.push(render(result.value, ret.length));\n        result = iterator.next();\n      }\n    } else {\n      keys = Object.keys(val);\n      ret = new Array(keys.length);\n      for (i = 0, l = keys.length; i < l; i++) {\n        key = keys[i];\n        ret[i] = render(val[key], key, i);\n      }\n    }\n  }\n  if (!isDef(ret)) {\n    ret = [];\n  }\n  (ret)._isVList = true;\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  var nodes;\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      if ( true && !isObject(bindObject)) {\n        warn(\n          'slot v-bind without argument expects an Object',\n          this\n        );\n      }\n      props = extend(extend({}, bindObject), props);\n    }\n    nodes = scopedSlotFn(props) || fallback;\n  } else {\n    nodes = this.$slots[name] || fallback;\n  }\n\n  var target = props && props.slot;\n  if (target) {\n    return this.$createElement('template', { slot: target }, nodes)\n  } else {\n    return nodes\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\nfunction isKeyNotMatch (expect, actual) {\n  if (Array.isArray(expect)) {\n    return expect.indexOf(actual) === -1\n  } else {\n    return expect !== actual\n  }\n}\n\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInKeyCode,\n  eventKeyName,\n  builtInKeyName\n) {\n  var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n  if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n    return isKeyNotMatch(builtInKeyName, eventKeyName)\n  } else if (mappedKeyCode) {\n    return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n  } else if (eventKeyName) {\n    return hyphenate(eventKeyName) !== key\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp,\n  isSync\n) {\n  if (value) {\n    if (!isObject(value)) {\n       true && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      var loop = function ( key ) {\n        if (\n          key === 'class' ||\n          key === 'style' ||\n          isReservedAttribute(key)\n        ) {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        var camelizedKey = camelize(key);\n        var hyphenatedKey = hyphenate(key);\n        if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n          hash[key] = value[key];\n\n          if (isSync) {\n            var on = data.on || (data.on = {});\n            on[(\"update:\" + key)] = function ($event) {\n              value[key] = $event;\n            };\n          }\n        }\n      };\n\n      for (var key in value) loop( key );\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var cached = this._staticTrees || (this._staticTrees = []);\n  var tree = cached[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree.\n  if (tree && !isInFor) {\n    return tree\n  }\n  // otherwise, render a fresh tree.\n  tree = cached[index] = this.$options.staticRenderFns[index].call(\n    this._renderProxy,\n    null,\n    this // for render fns generated for functional component templates\n  );\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction bindObjectListeners (data, value) {\n  if (value) {\n    if (!isPlainObject(value)) {\n       true && warn(\n        'v-on without argument expects an Object value',\n        this\n      );\n    } else {\n      var on = data.on = data.on ? extend({}, data.on) : {};\n      for (var key in value) {\n        var existing = on[key];\n        var ours = value[key];\n        on[key] = existing ? [].concat(existing, ours) : ours;\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\nfunction resolveScopedSlots (\n  fns, // see flow/vnode\n  res,\n  // the following are added in 2.6\n  hasDynamicKeys,\n  contentHashKey\n) {\n  res = res || { $stable: !hasDynamicKeys };\n  for (var i = 0; i < fns.length; i++) {\n    var slot = fns[i];\n    if (Array.isArray(slot)) {\n      resolveScopedSlots(slot, res, hasDynamicKeys);\n    } else if (slot) {\n      // marker for reverse proxying v-slot without scope on this.$slots\n      if (slot.proxy) {\n        slot.fn.proxy = true;\n      }\n      res[slot.key] = slot.fn;\n    }\n  }\n  if (contentHashKey) {\n    (res).$key = contentHashKey;\n  }\n  return res\n}\n\n/*  */\n\nfunction bindDynamicKeys (baseObj, values) {\n  for (var i = 0; i < values.length; i += 2) {\n    var key = values[i];\n    if (typeof key === 'string' && key) {\n      baseObj[values[i]] = values[i + 1];\n    } else if ( true && key !== '' && key !== null) {\n      // null is a speical value for explicitly removing a binding\n      warn(\n        (\"Invalid value for dynamic directive argument (expected string or null): \" + key),\n        this\n      );\n    }\n  }\n  return baseObj\n}\n\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier (value, symbol) {\n  return typeof value === 'string' ? symbol + value : value\n}\n\n/*  */\n\nfunction installRenderHelpers (target) {\n  target._o = markOnce;\n  target._n = toNumber;\n  target._s = toString;\n  target._l = renderList;\n  target._t = renderSlot;\n  target._q = looseEqual;\n  target._i = looseIndexOf;\n  target._m = renderStatic;\n  target._f = resolveFilter;\n  target._k = checkKeyCodes;\n  target._b = bindObjectProps;\n  target._v = createTextVNode;\n  target._e = createEmptyVNode;\n  target._u = resolveScopedSlots;\n  target._g = bindObjectListeners;\n  target._d = bindDynamicKeys;\n  target._p = prependModifier;\n}\n\n/*  */\n\nfunction FunctionalRenderContext (\n  data,\n  props,\n  children,\n  parent,\n  Ctor\n) {\n  var this$1 = this;\n\n  var options = Ctor.options;\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var contextVm;\n  if (hasOwn(parent, '_uid')) {\n    contextVm = Object.create(parent);\n    // $flow-disable-line\n    contextVm._original = parent;\n  } else {\n    // the context vm passed in is a functional context as well.\n    // in this case we want to make sure we are able to get a hold to the\n    // real context instance.\n    contextVm = parent;\n    // $flow-disable-line\n    parent = parent._original;\n  }\n  var isCompiled = isTrue(options._compiled);\n  var needNormalization = !isCompiled;\n\n  this.data = data;\n  this.props = props;\n  this.children = children;\n  this.parent = parent;\n  this.listeners = data.on || emptyObject;\n  this.injections = resolveInject(options.inject, parent);\n  this.slots = function () {\n    if (!this$1.$slots) {\n      normalizeScopedSlots(\n        data.scopedSlots,\n        this$1.$slots = resolveSlots(children, parent)\n      );\n    }\n    return this$1.$slots\n  };\n\n  Object.defineProperty(this, 'scopedSlots', ({\n    enumerable: true,\n    get: function get () {\n      return normalizeScopedSlots(data.scopedSlots, this.slots())\n    }\n  }));\n\n  // support for compiled functional template\n  if (isCompiled) {\n    // exposing $options for renderStatic()\n    this.$options = options;\n    // pre-resolve slots for renderSlot()\n    this.$slots = this.slots();\n    this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);\n  }\n\n  if (options._scopeId) {\n    this._c = function (a, b, c, d) {\n      var vnode = createElement(contextVm, a, b, c, d, needNormalization);\n      if (vnode && !Array.isArray(vnode)) {\n        vnode.fnScopeId = options._scopeId;\n        vnode.fnContext = parent;\n      }\n      return vnode\n    };\n  } else {\n    this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };\n  }\n}\n\ninstallRenderHelpers(FunctionalRenderContext.prototype);\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  contextVm,\n  children\n) {\n  var options = Ctor.options;\n  var props = {};\n  var propOptions = options.props;\n  if (isDef(propOptions)) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData || emptyObject);\n    }\n  } else {\n    if (isDef(data.attrs)) { mergeProps(props, data.attrs); }\n    if (isDef(data.props)) { mergeProps(props, data.props); }\n  }\n\n  var renderContext = new FunctionalRenderContext(\n    data,\n    props,\n    children,\n    contextVm,\n    Ctor\n  );\n\n  var vnode = options.render.call(null, renderContext._c, renderContext);\n\n  if (vnode instanceof VNode) {\n    return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)\n  } else if (Array.isArray(vnode)) {\n    var vnodes = normalizeChildren(vnode) || [];\n    var res = new Array(vnodes.length);\n    for (var i = 0; i < vnodes.length; i++) {\n      res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n    }\n    return res\n  }\n}\n\nfunction cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {\n  // #7817 clone node before setting fnContext, otherwise if the node is reused\n  // (e.g. it was from a cached normal slot) the fnContext causes named slots\n  // that should not be matched to match.\n  var clone = cloneVNode(vnode);\n  clone.fnContext = contextVm;\n  clone.fnOptions = options;\n  if (true) {\n    (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;\n  }\n  if (data.slot) {\n    (clone.data || (clone.data = {})).slot = data.slot;\n  }\n  return clone\n}\n\nfunction mergeProps (to, from) {\n  for (var key in from) {\n    to[camelize(key)] = from[key];\n  }\n}\n\n/*  */\n\n/*  */\n\n/*  */\n\n/*  */\n\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (vnode, hydrating) {\n    if (\n      vnode.componentInstance &&\n      !vnode.componentInstance._isDestroyed &&\n      vnode.data.keepAlive\n    ) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    } else {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    var context = vnode.context;\n    var componentInstance = vnode.componentInstance;\n    if (!componentInstance._isMounted) {\n      componentInstance._isMounted = true;\n      callHook(componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      if (context._isMounted) {\n        // vue-router#1212\n        // During updates, a kept-alive component's child components may\n        // change, so directly walking the tree here may call activated hooks\n        // on incorrect children. Instead we push them into a queue which will\n        // be processed after the whole patch process ended.\n        queueActivatedComponent(componentInstance);\n      } else {\n        activateChildComponent(componentInstance, true /* direct */);\n      }\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    var componentInstance = vnode.componentInstance;\n    if (!componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (isUndef(Ctor)) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n\n  // plain options object: turn it into a constructor\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  // if at this stage it's not a constructor or an async component factory,\n  // reject.\n  if (typeof Ctor !== 'function') {\n    if (true) {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  var asyncFactory;\n  if (isUndef(Ctor.cid)) {\n    asyncFactory = Ctor;\n    Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n    if (Ctor === undefined) {\n      // return a placeholder node for async component, which is rendered\n      // as a comment node but preserves all the raw information for the node.\n      // the information will be used for async server-rendering and hydration.\n      return createAsyncPlaceholder(\n        asyncFactory,\n        data,\n        context,\n        children,\n        tag\n      )\n    }\n  }\n\n  data = data || {};\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  // transform component v-model data into props & events\n  if (isDef(data.model)) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n\n  // functional component\n  if (isTrue(Ctor.options.functional)) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  // so it gets processed during parent component patch.\n  data.on = data.nativeOn;\n\n  if (isTrue(Ctor.options.abstract)) {\n    // abstract components do not keep anything\n    // other than props & listeners & slot\n\n    // work around flow\n    var slot = data.slot;\n    data = {};\n    if (slot) {\n      data.slot = slot;\n    }\n  }\n\n  // install component management hooks onto the placeholder node\n  installComponentHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },\n    asyncFactory\n  );\n\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent // activeInstance in lifecycle state\n) {\n  var options = {\n    _isComponent: true,\n    _parentVnode: vnode,\n    parent: parent\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (isDef(inlineTemplate)) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnode.componentOptions.Ctor(options)\n}\n\nfunction installComponentHooks (data) {\n  var hooks = data.hook || (data.hook = {});\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var existing = hooks[key];\n    var toMerge = componentVNodeHooks[key];\n    if (existing !== toMerge && !(existing && existing._merged)) {\n      hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;\n    }\n  }\n}\n\nfunction mergeHook$1 (f1, f2) {\n  var merged = function (a, b) {\n    // flow complains about extra args which is why we use any\n    f1(a, b);\n    f2(a, b);\n  };\n  merged._merged = true;\n  return merged\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input'\n  ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  var existing = on[event];\n  var callback = data.model.callback;\n  if (isDef(existing)) {\n    if (\n      Array.isArray(existing)\n        ? existing.indexOf(callback) === -1\n        : existing !== callback\n    ) {\n      on[event] = [callback].concat(existing);\n    }\n  } else {\n    on[event] = callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (isTrue(alwaysNormalize)) {\n    normalizationType = ALWAYS_NORMALIZE;\n  }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (isDef(data) && isDef((data).__ob__)) {\n     true && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  // object syntax in v-bind\n  if (isDef(data) && isDef(data.is)) {\n    tag = data.is;\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // warn against non-primitive key\n  if ( true &&\n    isDef(data) && isDef(data.key) && !isPrimitive(data.key)\n  ) {\n    {\n      warn(\n        'Avoid using non-primitive value as key, ' +\n        'use string/number value instead.',\n        context\n      );\n    }\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n    typeof children[0] === 'function'\n  ) {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (Array.isArray(vnode)) {\n    return vnode\n  } else if (isDef(vnode)) {\n    if (isDef(ns)) { applyNS(vnode, ns); }\n    if (isDef(data)) { registerDeepBindings(data); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns, force) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    ns = undefined;\n    force = true;\n  }\n  if (isDef(vnode.children)) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (isDef(child.tag) && (\n        isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n        applyNS(child, ns, force);\n      }\n    }\n  }\n}\n\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings (data) {\n  if (isObject(data.style)) {\n    traverse(data.style);\n  }\n  if (isObject(data.class)) {\n    traverse(data.class);\n  }\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null; // v-once cached trees\n  var options = vm.$options;\n  var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n\n  // $attrs & $listeners are exposed for easier HOC creation.\n  // they need to be reactive so that HOCs using them are always updated\n  var parentData = parentVnode && parentVnode.data;\n\n  /* istanbul ignore else */\n  if (true) {\n    defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {\n      !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n    }, true);\n    defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {\n      !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n    }, true);\n  } else {}\n}\n\nvar currentRenderingInstance = null;\n\nfunction renderMixin (Vue) {\n  // install runtime convenience helpers\n  installRenderHelpers(Vue.prototype);\n\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var _parentVnode = ref._parentVnode;\n\n    if (_parentVnode) {\n      vm.$scopedSlots = normalizeScopedSlots(\n        _parentVnode.data.scopedSlots,\n        vm.$slots,\n        vm.$scopedSlots\n      );\n    }\n\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      // There's no need to maintain a stack becaues all render fns are called\n      // separately from one another. Nested component's render fns are called\n      // when parent component is patched.\n      currentRenderingInstance = vm;\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      if ( true && vm.$options.renderError) {\n        try {\n          vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n        } catch (e) {\n          handleError(e, vm, \"renderError\");\n          vnode = vm._vnode;\n        }\n      } else {\n        vnode = vm._vnode;\n      }\n    } finally {\n      currentRenderingInstance = null;\n    }\n    // if the returned array contains only a single node, allow it\n    if (Array.isArray(vnode) && vnode.length === 1) {\n      vnode = vnode[0];\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if ( true && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n}\n\n/*  */\n\nfunction ensureCtor (comp, base) {\n  if (\n    comp.__esModule ||\n    (hasSymbol && comp[Symbol.toStringTag] === 'Module')\n  ) {\n    comp = comp.default;\n  }\n  return isObject(comp)\n    ? base.extend(comp)\n    : comp\n}\n\nfunction createAsyncPlaceholder (\n  factory,\n  data,\n  context,\n  children,\n  tag\n) {\n  var node = createEmptyVNode();\n  node.asyncFactory = factory;\n  node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n  return node\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor\n) {\n  if (isTrue(factory.error) && isDef(factory.errorComp)) {\n    return factory.errorComp\n  }\n\n  if (isDef(factory.resolved)) {\n    return factory.resolved\n  }\n\n  var owner = currentRenderingInstance;\n  if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n    // already pending\n    factory.owners.push(owner);\n  }\n\n  if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n    return factory.loadingComp\n  }\n\n  if (owner && !isDef(factory.owners)) {\n    var owners = factory.owners = [owner];\n    var sync = true;\n    var timerLoading = null;\n    var timerTimeout = null\n\n    ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });\n\n    var forceRender = function (renderCompleted) {\n      for (var i = 0, l = owners.length; i < l; i++) {\n        (owners[i]).$forceUpdate();\n      }\n\n      if (renderCompleted) {\n        owners.length = 0;\n        if (timerLoading !== null) {\n          clearTimeout(timerLoading);\n          timerLoading = null;\n        }\n        if (timerTimeout !== null) {\n          clearTimeout(timerTimeout);\n          timerTimeout = null;\n        }\n      }\n    };\n\n    var resolve = once(function (res) {\n      // cache resolved\n      factory.resolved = ensureCtor(res, baseCtor);\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        forceRender(true);\n      } else {\n        owners.length = 0;\n      }\n    });\n\n    var reject = once(function (reason) {\n       true && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n      if (isDef(factory.errorComp)) {\n        factory.error = true;\n        forceRender(true);\n      }\n    });\n\n    var res = factory(resolve, reject);\n\n    if (isObject(res)) {\n      if (isPromise(res)) {\n        // () => Promise\n        if (isUndef(factory.resolved)) {\n          res.then(resolve, reject);\n        }\n      } else if (isPromise(res.component)) {\n        res.component.then(resolve, reject);\n\n        if (isDef(res.error)) {\n          factory.errorComp = ensureCtor(res.error, baseCtor);\n        }\n\n        if (isDef(res.loading)) {\n          factory.loadingComp = ensureCtor(res.loading, baseCtor);\n          if (res.delay === 0) {\n            factory.loading = true;\n          } else {\n            timerLoading = setTimeout(function () {\n              timerLoading = null;\n              if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                factory.loading = true;\n                forceRender(false);\n              }\n            }, res.delay || 200);\n          }\n        }\n\n        if (isDef(res.timeout)) {\n          timerTimeout = setTimeout(function () {\n            timerTimeout = null;\n            if (isUndef(factory.resolved)) {\n              reject(\n                 true\n                  ? (\"timeout (\" + (res.timeout) + \"ms)\")\n                  : undefined\n              );\n            }\n          }, res.timeout);\n        }\n      }\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.loading\n      ? factory.loadingComp\n      : factory.resolved\n  }\n}\n\n/*  */\n\nfunction isAsyncPlaceholder (node) {\n  return node.isComment && node.asyncFactory\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  if (Array.isArray(children)) {\n    for (var i = 0; i < children.length; i++) {\n      var c = children[i];\n      if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n        return c\n      }\n    }\n  }\n}\n\n/*  */\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn) {\n  target.$on(event, fn);\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction createOnceHandler (event, fn) {\n  var _target = target;\n  return function onceHandler () {\n    var res = fn.apply(null, arguments);\n    if (res !== null) {\n      _target.$off(event, onceHandler);\n    }\n  }\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);\n  target = undefined;\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        vm.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        vm.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (!fn) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    if (true) {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      var info = \"event handler for \\\"\" + event + \"\\\"\";\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\n\nfunction setActiveInstance(vm) {\n  var prevActiveInstance = activeInstance;\n  activeInstance = vm;\n  return function () {\n    activeInstance = prevActiveInstance;\n  }\n}\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var restoreActiveInstance = setActiveInstance(vm);\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    restoreActiveInstance();\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // release circular reference (#6759)\n    if (vm.$vnode) {\n      vm.$vnode.parent = null;\n    }\n  };\n}\n\nfunction mountComponent (\n  vm,\n  el,\n  hydrating\n) {\n  vm.$el = el;\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyVNode;\n    if (true) {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  callHook(vm, 'beforeMount');\n\n  var updateComponent;\n  /* istanbul ignore if */\n  if ( true && config.performance && mark) {\n    updateComponent = function () {\n      var name = vm._name;\n      var id = vm._uid;\n      var startTag = \"vue-perf-start:\" + id;\n      var endTag = \"vue-perf-end:\" + id;\n\n      mark(startTag);\n      var vnode = vm._render();\n      mark(endTag);\n      measure((\"vue \" + name + \" render\"), startTag, endTag);\n\n      mark(startTag);\n      vm._update(vnode, hydrating);\n      mark(endTag);\n      measure((\"vue \" + name + \" patch\"), startTag, endTag);\n    };\n  } else {\n    updateComponent = function () {\n      vm._update(vm._render(), hydrating);\n    };\n  }\n\n  // we set this to vm._watcher inside the watcher's constructor\n  // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n  // component's mounted hook), which relies on vm._watcher being already defined\n  new Watcher(vm, updateComponent, noop, {\n    before: function before () {\n      if (vm._isMounted && !vm._isDestroyed) {\n        callHook(vm, 'beforeUpdate');\n      }\n    }\n  }, true /* isRenderWatcher */);\n  hydrating = false;\n\n  // manually mounted instance, call mounted on self\n  // mounted is called for render-created child components in its inserted hook\n  if (vm.$vnode == null) {\n    vm._isMounted = true;\n    callHook(vm, 'mounted');\n  }\n  return vm\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  if (true) {\n    isUpdatingChildComponent = true;\n  }\n\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren.\n\n  // check if there are dynamic scopedSlots (hand-written or compiled but with\n  // dynamic slot names). Static scoped slots compiled from template has the\n  // \"$stable\" marker.\n  var newScopedSlots = parentVnode.data.scopedSlots;\n  var oldScopedSlots = vm.$scopedSlots;\n  var hasDynamicScopedSlot = !!(\n    (newScopedSlots && !newScopedSlots.$stable) ||\n    (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n    (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)\n  );\n\n  // Any static slot children from the parent may have changed during parent's\n  // update. Dynamic scoped slots may also have changed. In such cases, a forced\n  // update is necessary to ensure correctness.\n  var needsForceUpdate = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    hasDynamicScopedSlot\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update $attrs and $listeners hash\n  // these are also reactive so they may trigger child update if the child\n  // used them during render\n  vm.$attrs = parentVnode.data.attrs || emptyObject;\n  vm.$listeners = listeners || emptyObject;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    toggleObserving(false);\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      var propOptions = vm.$options.props; // wtf flow?\n      props[key] = validateProp(key, propOptions, propsData, vm);\n    }\n    toggleObserving(true);\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n\n  // update listeners\n  listeners = listeners || emptyObject;\n  var oldListeners = vm.$options._parentListeners;\n  vm.$options._parentListeners = listeners;\n  updateComponentListeners(vm, listeners, oldListeners);\n\n  // resolve slots + force update if has children\n  if (needsForceUpdate) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n\n  if (true) {\n    isUpdatingChildComponent = false;\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive === null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  // #7573 disable dep collection when invoking lifecycle hooks\n  pushTarget();\n  var handlers = vm.$options[hook];\n  var info = hook + \" hook\";\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      invokeWithErrorHandling(handlers[i], vm, null, vm, info);\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n  popTarget();\n}\n\n/*  */\n\nvar MAX_UPDATE_COUNT = 100;\n\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  index = queue.length = activatedChildren.length = 0;\n  has = {};\n  if (true) {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nvar currentFlushTimestamp = 0;\n\n// Async edge case fix requires storing an event listener's attach timestamp.\nvar getNow = Date.now;\n\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n  var performance = window.performance;\n  if (\n    performance &&\n    typeof performance.now === 'function' &&\n    getNow() > document.createEvent('Event').timeStamp\n  ) {\n    // if the event timestamp, although evaluated AFTER the Date.now(), is\n    // smaller than it, it means the event is using a hi-res timestamp,\n    // and we need to use the hi-res version for event listener timestamps as\n    // well.\n    getNow = function () { return performance.now(); };\n  }\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  currentFlushTimestamp = getNow();\n  flushing = true;\n  var watcher, id;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    if (watcher.before) {\n      watcher.before();\n    }\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if ( true && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > MAX_UPDATE_COUNT) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // keep copies of post queues before resetting state\n  var activatedQueue = activatedChildren.slice();\n  var updatedQueue = queue.slice();\n\n  resetSchedulerState();\n\n  // call component updated and activated hooks\n  callActivatedHooks(activatedQueue);\n  callUpdatedHooks(updatedQueue);\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\nfunction callUpdatedHooks (queue) {\n  var i = queue.length;\n  while (i--) {\n    var watcher = queue[i];\n    var vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n      callHook(vm, 'updated');\n    }\n  }\n}\n\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent (vm) {\n  // setting _inactive to false here so that a render function can\n  // rely on checking whether it's in an inactive tree (e.g. router-view)\n  vm._inactive = false;\n  activatedChildren.push(vm);\n}\n\nfunction callActivatedHooks (queue) {\n  for (var i = 0; i < queue.length; i++) {\n    queue[i]._inactive = true;\n    activateChildComponent(queue[i], true /* true */);\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i > index && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n\n      if ( true && !config.async) {\n        flushSchedulerQueue();\n        return\n      }\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\n\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options,\n  isRenderWatcher\n) {\n  this.vm = vm;\n  if (isRenderWatcher) {\n    vm._watcher = this;\n  }\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n    this.before = options.before;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression =  true\n    ? expOrFn.toString()\n    : undefined;\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = noop;\n       true && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  try {\n    value = this.getter.call(vm, vm);\n  } catch (e) {\n    if (this.user) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    } else {\n      throw e\n    }\n  } finally {\n    // \"touch\" every property so they are all tracked as\n    // dependencies for deep watching\n    if (this.deep) {\n      traverse(value);\n    }\n    popTarget();\n    this.cleanupDeps();\n  }\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this.deps[i];\n    if (!this.newDepIds.has(dep.id)) {\n      dep.removeSub(this);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n  var i = this.deps.length;\n  while (i--) {\n    this.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this.deps[i].removeSub(this);\n    }\n    this.active = false;\n  }\n};\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch && opts.watch !== nativeWatch) {\n    initWatch(vm, opts.watch);\n  }\n}\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  if (!isRoot) {\n    toggleObserving(false);\n  }\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    if (true) {\n      var hyphenatedKey = hyphenate(key);\n      if (isReservedAttribute(hyphenatedKey) ||\n          config.isReservedAttr(hyphenatedKey)) {\n        warn(\n          (\"\\\"\" + hyphenatedKey + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (!isRoot && !isUpdatingChildComponent) {\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    } else {}\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  toggleObserving(true);\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n     true && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var methods = vm.$options.methods;\n  var i = keys.length;\n  while (i--) {\n    var key = keys[i];\n    if (true) {\n      if (methods && hasOwn(methods, key)) {\n        warn(\n          (\"Method \\\"\" + key + \"\\\" has already been defined as a data property.\"),\n          vm\n        );\n      }\n    }\n    if (props && hasOwn(props, key)) {\n       true && warn(\n        \"The data property \\\"\" + key + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(key)) {\n      proxy(vm, \"_data\", key);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  // #7573 disable dep collection when invoking data getters\n  pushTarget();\n  try {\n    return data.call(vm, vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  } finally {\n    popTarget();\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  // $flow-disable-line\n  var watchers = vm._computedWatchers = Object.create(null);\n  // computed properties are just getters during SSR\n  var isSSR = isServerRendering();\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    if ( true && getter == null) {\n      warn(\n        (\"Getter is missing for computed property \\\"\" + key + \"\\\".\"),\n        vm\n      );\n    }\n\n    if (!isSSR) {\n      // create internal watcher for the computed property.\n      watchers[key] = new Watcher(\n        vm,\n        getter || noop,\n        noop,\n        computedWatcherOptions\n      );\n    }\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    } else if (true) {\n      if (key in vm.$data) {\n        warn((\"The computed property \\\"\" + key + \"\\\" is already defined in data.\"), vm);\n      } else if (vm.$options.props && key in vm.$options.props) {\n        warn((\"The computed property \\\"\" + key + \"\\\" is already defined as a prop.\"), vm);\n      }\n    }\n  }\n}\n\nfunction defineComputed (\n  target,\n  key,\n  userDef\n) {\n  var shouldCache = !isServerRendering();\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = shouldCache\n      ? createComputedGetter(key)\n      : createGetterInvoker(userDef);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? shouldCache && userDef.cache !== false\n        ? createComputedGetter(key)\n        : createGetterInvoker(userDef.get)\n      : noop;\n    sharedPropertyDefinition.set = userDef.set || noop;\n  }\n  if ( true &&\n      sharedPropertyDefinition.set === noop) {\n    sharedPropertyDefinition.set = function () {\n      warn(\n        (\"Computed property \\\"\" + key + \"\\\" was assigned to but it has no setter.\"),\n        this\n      );\n    };\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.target) {\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction createGetterInvoker(fn) {\n  return function computedGetter () {\n    return fn.call(this, this)\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    if (true) {\n      if (typeof methods[key] !== 'function') {\n        warn(\n          \"Method \\\"\" + key + \"\\\" has type \\\"\" + (typeof methods[key]) + \"\\\" in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"Method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n      if ((key in vm) && isReserved(key)) {\n        warn(\n          \"Method \\\"\" + key + \"\\\" conflicts with an existing Vue instance method. \" +\n          \"Avoid defining component methods that start with _ or $.\"\n        );\n      }\n    }\n    vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (\n  vm,\n  expOrFn,\n  handler,\n  options\n) {\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  return vm.$watch(expOrFn, handler, options)\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  if (true) {\n    dataDef.set = function () {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    if (isPlainObject(cb)) {\n      return createWatcher(vm, expOrFn, cb, options)\n    }\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      try {\n        cb.call(vm, watcher.value);\n      } catch (error) {\n        handleError(error, vm, (\"callback for immediate watcher \\\"\" + (watcher.expression) + \"\\\"\"));\n      }\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\nvar uid$3 = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid$3++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if ( true && config.performance && mark) {\n      startTag = \"vue-perf-start:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    if (true) {\n      initProxy(vm);\n    } else {}\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    initInjections(vm); // resolve injections before data/props\n    initState(vm);\n    initProvide(vm); // resolve provide after data/props\n    callHook(vm, 'created');\n\n    /* istanbul ignore if */\n    if ( true && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure((\"vue \" + (vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  var parentVnode = options._parentVnode;\n  opts.parent = options.parent;\n  opts._parentVnode = parentVnode;\n\n  var vnodeComponentOptions = parentVnode.componentOptions;\n  opts.propsData = vnodeComponentOptions.propsData;\n  opts._parentListeners = vnodeComponentOptions.listeners;\n  opts._renderChildren = vnodeComponentOptions.children;\n  opts._componentTag = vnodeComponentOptions.tag;\n\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = latest[key];\n    }\n  }\n  return modified\n}\n\nfunction Vue (options) {\n  if ( true &&\n    !(this instanceof Vue)\n  ) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue);\nstateMixin(Vue);\neventsMixin(Vue);\nlifecycleMixin(Vue);\nrenderMixin(Vue);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));\n    if (installedPlugins.indexOf(plugin) > -1) {\n      return this\n    }\n\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    installedPlugins.push(plugin);\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n    return this\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    if ( true && name) {\n      validateComponentName(name);\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    ASSET_TYPES.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  ASSET_TYPES.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        if ( true && type === 'component') {\n          validateComponentName(id);\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\n\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (Array.isArray(pattern)) {\n    return pattern.indexOf(name) > -1\n  } else if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (isRegExp(pattern)) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (keepAliveInstance, filter) {\n  var cache = keepAliveInstance.cache;\n  var keys = keepAliveInstance.keys;\n  var _vnode = keepAliveInstance._vnode;\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cache, key, keys, _vnode);\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (\n  cache,\n  key,\n  keys,\n  current\n) {\n  var cached$$1 = cache[key];\n  if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {\n    cached$$1.componentInstance.$destroy();\n  }\n  cache[key] = null;\n  remove(keys, key);\n}\n\nvar patternTypes = [String, RegExp, Array];\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes,\n    max: [String, Number]\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n    this.keys = [];\n  },\n\n  destroyed: function destroyed () {\n    for (var key in this.cache) {\n      pruneCacheEntry(this.cache, key, this.keys);\n    }\n  },\n\n  mounted: function mounted () {\n    var this$1 = this;\n\n    this.$watch('include', function (val) {\n      pruneCache(this$1, function (name) { return matches(val, name); });\n    });\n    this.$watch('exclude', function (val) {\n      pruneCache(this$1, function (name) { return !matches(val, name); });\n    });\n  },\n\n  render: function render () {\n    var slot = this.$slots.default;\n    var vnode = getFirstComponentChild(slot);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      var ref = this;\n      var include = ref.include;\n      var exclude = ref.exclude;\n      if (\n        // not included\n        (include && (!name || !matches(include, name))) ||\n        // excluded\n        (exclude && name && matches(exclude, name))\n      ) {\n        return vnode\n      }\n\n      var ref$1 = this;\n      var cache = ref$1.cache;\n      var keys = ref$1.keys;\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (cache[key]) {\n        vnode.componentInstance = cache[key].componentInstance;\n        // make current key freshest\n        remove(keys, key);\n        keys.push(key);\n      } else {\n        cache[key] = vnode;\n        keys.push(key);\n        // prune oldest entry\n        if (this.max && keys.length > parseInt(this.max)) {\n          pruneCacheEntry(cache, keys[0], keys, this._vnode);\n        }\n      }\n\n      vnode.data.keepAlive = true;\n    }\n    return vnode || (slot && slot[0])\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  if (true) {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  // 2.6 explicit observable API\n  Vue.observable = function (obj) {\n    observe(obj);\n    return obj\n  };\n\n  Vue.options = Object.create(null);\n  ASSET_TYPES.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\n\nObject.defineProperty(Vue.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n  get: function get () {\n    /* istanbul ignore next */\n    return this.$vnode && this.$vnode.ssrContext\n  }\n});\n\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n  value: FunctionalRenderContext\n});\n\nVue.version = '2.6.10';\n\n/*  */\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nvar isReservedAttr = makeMap('style,class');\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select,progress');\nvar mustUseProp = function (tag, type, attr) {\n  return (\n    (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n    (attr === 'selected' && tag === 'option') ||\n    (attr === 'checked' && tag === 'input') ||\n    (attr === 'muted' && tag === 'video')\n  )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\n\nvar convertEnumeratedValue = function (key, value) {\n  return isFalsyAttrValue(value) || value === 'false'\n    ? 'false'\n    // allow arbitrary string value for contenteditable\n    : key === 'contenteditable' && isValidContentEditableValue(value)\n      ? value\n      : 'true'\n};\n\nvar isBooleanAttr = makeMap(\n  'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n  'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n  'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n  'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n  'required,reversed,scoped,seamless,selected,sortable,translate,' +\n  'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n  return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n  return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n  return val == null || val === false\n};\n\n/*  */\n\nfunction genClassForVnode (vnode) {\n  var data = vnode.data;\n  var parentNode = vnode;\n  var childNode = vnode;\n  while (isDef(childNode.componentInstance)) {\n    childNode = childNode.componentInstance._vnode;\n    if (childNode && childNode.data) {\n      data = mergeClassData(childNode.data, data);\n    }\n  }\n  while (isDef(parentNode = parentNode.parent)) {\n    if (parentNode && parentNode.data) {\n      data = mergeClassData(data, parentNode.data);\n    }\n  }\n  return renderClass(data.staticClass, data.class)\n}\n\nfunction mergeClassData (child, parent) {\n  return {\n    staticClass: concat(child.staticClass, parent.staticClass),\n    class: isDef(child.class)\n      ? [child.class, parent.class]\n      : parent.class\n  }\n}\n\nfunction renderClass (\n  staticClass,\n  dynamicClass\n) {\n  if (isDef(staticClass) || isDef(dynamicClass)) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  if (Array.isArray(value)) {\n    return stringifyArray(value)\n  }\n  if (isObject(value)) {\n    return stringifyObject(value)\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction stringifyArray (value) {\n  var res = '';\n  var stringified;\n  for (var i = 0, l = value.length; i < l; i++) {\n    if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {\n      if (res) { res += ' '; }\n      res += stringified;\n    }\n  }\n  return res\n}\n\nfunction stringifyObject (value) {\n  var res = '';\n  for (var key in value) {\n    if (value[key]) {\n      if (res) { res += ' '; }\n      res += key;\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar namespaceMap = {\n  svg: 'http://www.w3.org/2000/svg',\n  math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n  'html,body,base,head,link,meta,style,title,' +\n  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n  'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n  'embed,object,param,source,canvas,script,noscript,del,ins,' +\n  'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n  'output,progress,select,textarea,' +\n  'details,dialog,menu,menuitem,summary,' +\n  'content,element,shadow,template,blockquote,iframe,tfoot'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n  'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n  'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n  'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n  true\n);\n\nvar isReservedTag = function (tag) {\n  return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n  if (isSVG(tag)) {\n    return 'svg'\n  }\n  // basic support for MathML\n  // note it doesn't support other MathML elements being component roots\n  if (tag === 'math') {\n    return 'math'\n  }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n  /* istanbul ignore if */\n  if (!inBrowser) {\n    return true\n  }\n  if (isReservedTag(tag)) {\n    return false\n  }\n  tag = tag.toLowerCase();\n  /* istanbul ignore if */\n  if (unknownElementCache[tag] != null) {\n    return unknownElementCache[tag]\n  }\n  var el = document.createElement(tag);\n  if (tag.indexOf('-') > -1) {\n    // http://stackoverflow.com/a/28210364/1070244\n    return (unknownElementCache[tag] = (\n      el.constructor === window.HTMLUnknownElement ||\n      el.constructor === window.HTMLElement\n    ))\n  } else {\n    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n  }\n}\n\nvar isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/*  */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n  if (typeof el === 'string') {\n    var selected = document.querySelector(el);\n    if (!selected) {\n       true && warn(\n        'Cannot find element: ' + el\n      );\n      return document.createElement('div')\n    }\n    return selected\n  } else {\n    return el\n  }\n}\n\n/*  */\n\nfunction createElement$1 (tagName, vnode) {\n  var elm = document.createElement(tagName);\n  if (tagName !== 'select') {\n    return elm\n  }\n  // false or null will remove the attribute but undefined will not\n  if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n    elm.setAttribute('multiple', 'multiple');\n  }\n  return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n  return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n  return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n  return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n  parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n  node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n  node.appendChild(child);\n}\n\nfunction parentNode (node) {\n  return node.parentNode\n}\n\nfunction nextSibling (node) {\n  return node.nextSibling\n}\n\nfunction tagName (node) {\n  return node.tagName\n}\n\nfunction setTextContent (node, text) {\n  node.textContent = text;\n}\n\nfunction setStyleScope (node, scopeId) {\n  node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n  createElement: createElement$1,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: tagName,\n  setTextContent: setTextContent,\n  setStyleScope: setStyleScope\n});\n\n/*  */\n\nvar ref = {\n  create: function create (_, vnode) {\n    registerRef(vnode);\n  },\n  update: function update (oldVnode, vnode) {\n    if (oldVnode.data.ref !== vnode.data.ref) {\n      registerRef(oldVnode, true);\n      registerRef(vnode);\n    }\n  },\n  destroy: function destroy (vnode) {\n    registerRef(vnode, true);\n  }\n};\n\nfunction registerRef (vnode, isRemoval) {\n  var key = vnode.data.ref;\n  if (!isDef(key)) { return }\n\n  var vm = vnode.context;\n  var ref = vnode.componentInstance || vnode.elm;\n  var refs = vm.$refs;\n  if (isRemoval) {\n    if (Array.isArray(refs[key])) {\n      remove(refs[key], ref);\n    } else if (refs[key] === ref) {\n      refs[key] = undefined;\n    }\n  } else {\n    if (vnode.data.refInFor) {\n      if (!Array.isArray(refs[key])) {\n        refs[key] = [ref];\n      } else if (refs[key].indexOf(ref) < 0) {\n        // $flow-disable-line\n        refs[key].push(ref);\n      }\n    } else {\n      refs[key] = ref;\n    }\n  }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction sameVnode (a, b) {\n  return (\n    a.key === b.key && (\n      (\n        a.tag === b.tag &&\n        a.isComment === b.isComment &&\n        isDef(a.data) === isDef(b.data) &&\n        sameInputType(a, b)\n      ) || (\n        isTrue(a.isAsyncPlaceholder) &&\n        a.asyncFactory === b.asyncFactory &&\n        isUndef(b.asyncFactory.error)\n      )\n    )\n  )\n}\n\nfunction sameInputType (a, b) {\n  if (a.tag !== 'input') { return true }\n  var i;\n  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n  return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n  var i, key;\n  var map = {};\n  for (i = beginIdx; i <= endIdx; ++i) {\n    key = children[i].key;\n    if (isDef(key)) { map[key] = i; }\n  }\n  return map\n}\n\nfunction createPatchFunction (backend) {\n  var i, j;\n  var cbs = {};\n\n  var modules = backend.modules;\n  var nodeOps = backend.nodeOps;\n\n  for (i = 0; i < hooks.length; ++i) {\n    cbs[hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      if (isDef(modules[j][hooks[i]])) {\n        cbs[hooks[i]].push(modules[j][hooks[i]]);\n      }\n    }\n  }\n\n  function emptyNodeAt (elm) {\n    return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n  }\n\n  function createRmCb (childElm, listeners) {\n    function remove$$1 () {\n      if (--remove$$1.listeners === 0) {\n        removeNode(childElm);\n      }\n    }\n    remove$$1.listeners = listeners;\n    return remove$$1\n  }\n\n  function removeNode (el) {\n    var parent = nodeOps.parentNode(el);\n    // element may have already been removed due to v-html / v-text\n    if (isDef(parent)) {\n      nodeOps.removeChild(parent, el);\n    }\n  }\n\n  function isUnknownElement$$1 (vnode, inVPre) {\n    return (\n      !inVPre &&\n      !vnode.ns &&\n      !(\n        config.ignoredElements.length &&\n        config.ignoredElements.some(function (ignore) {\n          return isRegExp(ignore)\n            ? ignore.test(vnode.tag)\n            : ignore === vnode.tag\n        })\n      ) &&\n      config.isUnknownElement(vnode.tag)\n    )\n  }\n\n  var creatingElmInVPre = 0;\n\n  function createElm (\n    vnode,\n    insertedVnodeQueue,\n    parentElm,\n    refElm,\n    nested,\n    ownerArray,\n    index\n  ) {\n    if (isDef(vnode.elm) && isDef(ownerArray)) {\n      // This vnode was used in a previous render!\n      // now it's used as a new node, overwriting its elm would cause\n      // potential patch errors down the road when it's used as an insertion\n      // reference node. Instead, we clone the node on-demand before creating\n      // associated DOM element for it.\n      vnode = ownerArray[index] = cloneVNode(vnode);\n    }\n\n    vnode.isRootInsert = !nested; // for transition enter check\n    if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n      return\n    }\n\n    var data = vnode.data;\n    var children = vnode.children;\n    var tag = vnode.tag;\n    if (isDef(tag)) {\n      if (true) {\n        if (data && data.pre) {\n          creatingElmInVPre++;\n        }\n        if (isUnknownElement$$1(vnode, creatingElmInVPre)) {\n          warn(\n            'Unknown custom element: <' + tag + '> - did you ' +\n            'register the component correctly? For recursive components, ' +\n            'make sure to provide the \"name\" option.',\n            vnode.context\n          );\n        }\n      }\n\n      vnode.elm = vnode.ns\n        ? nodeOps.createElementNS(vnode.ns, tag)\n        : nodeOps.createElement(tag, vnode);\n      setScope(vnode);\n\n      /* istanbul ignore if */\n      {\n        createChildren(vnode, children, insertedVnodeQueue);\n        if (isDef(data)) {\n          invokeCreateHooks(vnode, insertedVnodeQueue);\n        }\n        insert(parentElm, vnode.elm, refElm);\n      }\n\n      if ( true && data && data.pre) {\n        creatingElmInVPre--;\n      }\n    } else if (isTrue(vnode.isComment)) {\n      vnode.elm = nodeOps.createComment(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    } else {\n      vnode.elm = nodeOps.createTextNode(vnode.text);\n      insert(parentElm, vnode.elm, refElm);\n    }\n  }\n\n  function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i = vnode.data;\n    if (isDef(i)) {\n      var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n      if (isDef(i = i.hook) && isDef(i = i.init)) {\n        i(vnode, false /* hydrating */);\n      }\n      // after calling the init hook, if the vnode is a child component\n      // it should've created a child instance and mounted it. the child\n      // component also has set the placeholder vnode's elm.\n      // in that case we can just return the element and be done.\n      if (isDef(vnode.componentInstance)) {\n        initComponent(vnode, insertedVnodeQueue);\n        insert(parentElm, vnode.elm, refElm);\n        if (isTrue(isReactivated)) {\n          reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n        }\n        return true\n      }\n    }\n  }\n\n  function initComponent (vnode, insertedVnodeQueue) {\n    if (isDef(vnode.data.pendingInsert)) {\n      insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n      vnode.data.pendingInsert = null;\n    }\n    vnode.elm = vnode.componentInstance.$el;\n    if (isPatchable(vnode)) {\n      invokeCreateHooks(vnode, insertedVnodeQueue);\n      setScope(vnode);\n    } else {\n      // empty component root.\n      // skip all element-related modules except for ref (#3455)\n      registerRef(vnode);\n      // make sure to invoke the insert hook\n      insertedVnodeQueue.push(vnode);\n    }\n  }\n\n  function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n    var i;\n    // hack for #4339: a reactivated component with inner transition\n    // does not trigger because the inner node's created hooks are not called\n    // again. It's not ideal to involve module-specific logic in here but\n    // there doesn't seem to be a better way to do it.\n    var innerNode = vnode;\n    while (innerNode.componentInstance) {\n      innerNode = innerNode.componentInstance._vnode;\n      if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n        for (i = 0; i < cbs.activate.length; ++i) {\n          cbs.activate[i](emptyNode, innerNode);\n        }\n        insertedVnodeQueue.push(innerNode);\n        break\n      }\n    }\n    // unlike a newly created component,\n    // a reactivated keep-alive component doesn't insert itself\n    insert(parentElm, vnode.elm, refElm);\n  }\n\n  function insert (parent, elm, ref$$1) {\n    if (isDef(parent)) {\n      if (isDef(ref$$1)) {\n        if (nodeOps.parentNode(ref$$1) === parent) {\n          nodeOps.insertBefore(parent, elm, ref$$1);\n        }\n      } else {\n        nodeOps.appendChild(parent, elm);\n      }\n    }\n  }\n\n  function createChildren (vnode, children, insertedVnodeQueue) {\n    if (Array.isArray(children)) {\n      if (true) {\n        checkDuplicateKeys(children);\n      }\n      for (var i = 0; i < children.length; ++i) {\n        createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n      }\n    } else if (isPrimitive(vnode.text)) {\n      nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n    }\n  }\n\n  function isPatchable (vnode) {\n    while (vnode.componentInstance) {\n      vnode = vnode.componentInstance._vnode;\n    }\n    return isDef(vnode.tag)\n  }\n\n  function invokeCreateHooks (vnode, insertedVnodeQueue) {\n    for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n      cbs.create[i$1](emptyNode, vnode);\n    }\n    i = vnode.data.hook; // Reuse variable\n    if (isDef(i)) {\n      if (isDef(i.create)) { i.create(emptyNode, vnode); }\n      if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n    }\n  }\n\n  // set scope id attribute for scoped CSS.\n  // this is implemented as a special case to avoid the overhead\n  // of going through the normal attribute patching process.\n  function setScope (vnode) {\n    var i;\n    if (isDef(i = vnode.fnScopeId)) {\n      nodeOps.setStyleScope(vnode.elm, i);\n    } else {\n      var ancestor = vnode;\n      while (ancestor) {\n        if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n          nodeOps.setStyleScope(vnode.elm, i);\n        }\n        ancestor = ancestor.parent;\n      }\n    }\n    // for slot content they should also get the scopeId from the host instance.\n    if (isDef(i = activeInstance) &&\n      i !== vnode.context &&\n      i !== vnode.fnContext &&\n      isDef(i = i.$options._scopeId)\n    ) {\n      nodeOps.setStyleScope(vnode.elm, i);\n    }\n  }\n\n  function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n    }\n  }\n\n  function invokeDestroyHook (vnode) {\n    var i, j;\n    var data = vnode.data;\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n      for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n    }\n    if (isDef(i = vnode.children)) {\n      for (j = 0; j < vnode.children.length; ++j) {\n        invokeDestroyHook(vnode.children[j]);\n      }\n    }\n  }\n\n  function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (isDef(ch)) {\n        if (isDef(ch.tag)) {\n          removeAndInvokeRemoveHook(ch);\n          invokeDestroyHook(ch);\n        } else { // Text node\n          removeNode(ch.elm);\n        }\n      }\n    }\n  }\n\n  function removeAndInvokeRemoveHook (vnode, rm) {\n    if (isDef(rm) || isDef(vnode.data)) {\n      var i;\n      var listeners = cbs.remove.length + 1;\n      if (isDef(rm)) {\n        // we have a recursively passed down rm callback\n        // increase the listeners count\n        rm.listeners += listeners;\n      } else {\n        // directly removing\n        rm = createRmCb(vnode.elm, listeners);\n      }\n      // recursively invoke hooks on child component root node\n      if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n        removeAndInvokeRemoveHook(i, rm);\n      }\n      for (i = 0; i < cbs.remove.length; ++i) {\n        cbs.remove[i](vnode, rm);\n      }\n      if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n        i(vnode, rm);\n      } else {\n        rm();\n      }\n    } else {\n      removeNode(vnode.elm);\n    }\n  }\n\n  function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n    var oldStartIdx = 0;\n    var newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n\n    // removeOnly is a special flag used only by <transition-group>\n    // to ensure removed elements stay in correct relative positions\n    // during leaving transitions\n    var canMove = !removeOnly;\n\n    if (true) {\n      checkDuplicateKeys(newCh);\n    }\n\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (isUndef(oldStartVnode)) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n      } else if (isUndef(oldEndVnode)) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n        canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n        canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n        idxInOld = isDef(newStartVnode.key)\n          ? oldKeyToIdx[newStartVnode.key]\n          : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n        if (isUndef(idxInOld)) { // New element\n          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n        } else {\n          vnodeToMove = oldCh[idxInOld];\n          if (sameVnode(vnodeToMove, newStartVnode)) {\n            patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n            oldCh[idxInOld] = undefined;\n            canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n          } else {\n            // same key but different element. treat as new element\n            createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n          }\n        }\n        newStartVnode = newCh[++newStartIdx];\n      }\n    }\n    if (oldStartIdx > oldEndIdx) {\n      refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n      addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n    } else if (newStartIdx > newEndIdx) {\n      removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n    }\n  }\n\n  function checkDuplicateKeys (children) {\n    var seenKeys = {};\n    for (var i = 0; i < children.length; i++) {\n      var vnode = children[i];\n      var key = vnode.key;\n      if (isDef(key)) {\n        if (seenKeys[key]) {\n          warn(\n            (\"Duplicate keys detected: '\" + key + \"'. This may cause an update error.\"),\n            vnode.context\n          );\n        } else {\n          seenKeys[key] = true;\n        }\n      }\n    }\n  }\n\n  function findIdxInOld (node, oldCh, start, end) {\n    for (var i = start; i < end; i++) {\n      var c = oldCh[i];\n      if (isDef(c) && sameVnode(node, c)) { return i }\n    }\n  }\n\n  function patchVnode (\n    oldVnode,\n    vnode,\n    insertedVnodeQueue,\n    ownerArray,\n    index,\n    removeOnly\n  ) {\n    if (oldVnode === vnode) {\n      return\n    }\n\n    if (isDef(vnode.elm) && isDef(ownerArray)) {\n      // clone reused vnode\n      vnode = ownerArray[index] = cloneVNode(vnode);\n    }\n\n    var elm = vnode.elm = oldVnode.elm;\n\n    if (isTrue(oldVnode.isAsyncPlaceholder)) {\n      if (isDef(vnode.asyncFactory.resolved)) {\n        hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n      } else {\n        vnode.isAsyncPlaceholder = true;\n      }\n      return\n    }\n\n    // reuse element for static trees.\n    // note we only do this if the vnode is cloned -\n    // if the new node is not cloned it means the render functions have been\n    // reset by the hot-reload-api and we need to do a proper re-render.\n    if (isTrue(vnode.isStatic) &&\n      isTrue(oldVnode.isStatic) &&\n      vnode.key === oldVnode.key &&\n      (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))\n    ) {\n      vnode.componentInstance = oldVnode.componentInstance;\n      return\n    }\n\n    var i;\n    var data = vnode.data;\n    if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n      i(oldVnode, vnode);\n    }\n\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (isDef(data) && isPatchable(vnode)) {\n      for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n      if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n      } else if (isDef(ch)) {\n        if (true) {\n          checkDuplicateKeys(ch);\n        }\n        if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        nodeOps.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      nodeOps.setTextContent(elm, vnode.text);\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n    }\n  }\n\n  function invokeInsertHook (vnode, queue, initial) {\n    // delay insert hooks for component root nodes, invoke them after the\n    // element is really inserted\n    if (isTrue(initial) && isDef(vnode.parent)) {\n      vnode.parent.data.pendingInsert = queue;\n    } else {\n      for (var i = 0; i < queue.length; ++i) {\n        queue[i].data.hook.insert(queue[i]);\n      }\n    }\n  }\n\n  var hydrationBailed = false;\n  // list of modules that can skip create hook during hydration because they\n  // are already rendered on the client or has no need for initialization\n  // Note: style is excluded because it relies on initial clone for future\n  // deep updates (#7063).\n  var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n\n  // Note: this is a browser-only function so we can assume elms are DOM nodes.\n  function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {\n    var i;\n    var tag = vnode.tag;\n    var data = vnode.data;\n    var children = vnode.children;\n    inVPre = inVPre || (data && data.pre);\n    vnode.elm = elm;\n\n    if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n      vnode.isAsyncPlaceholder = true;\n      return true\n    }\n    // assert node match\n    if (true) {\n      if (!assertNodeMatch(elm, vnode, inVPre)) {\n        return false\n      }\n    }\n    if (isDef(data)) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n      if (isDef(i = vnode.componentInstance)) {\n        // child component. it should have hydrated its own tree.\n        initComponent(vnode, insertedVnodeQueue);\n        return true\n      }\n    }\n    if (isDef(tag)) {\n      if (isDef(children)) {\n        // empty element, allow client to pick up and populate children\n        if (!elm.hasChildNodes()) {\n          createChildren(vnode, children, insertedVnodeQueue);\n        } else {\n          // v-html and domProps: innerHTML\n          if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {\n            if (i !== elm.innerHTML) {\n              /* istanbul ignore if */\n              if ( true &&\n                typeof console !== 'undefined' &&\n                !hydrationBailed\n              ) {\n                hydrationBailed = true;\n                console.warn('Parent: ', elm);\n                console.warn('server innerHTML: ', i);\n                console.warn('client innerHTML: ', elm.innerHTML);\n              }\n              return false\n            }\n          } else {\n            // iterate and compare children lists\n            var childrenMatch = true;\n            var childNode = elm.firstChild;\n            for (var i$1 = 0; i$1 < children.length; i$1++) {\n              if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {\n                childrenMatch = false;\n                break\n              }\n              childNode = childNode.nextSibling;\n            }\n            // if childNode is not null, it means the actual childNodes list is\n            // longer than the virtual children list.\n            if (!childrenMatch || childNode) {\n              /* istanbul ignore if */\n              if ( true &&\n                typeof console !== 'undefined' &&\n                !hydrationBailed\n              ) {\n                hydrationBailed = true;\n                console.warn('Parent: ', elm);\n                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n              }\n              return false\n            }\n          }\n        }\n      }\n      if (isDef(data)) {\n        var fullInvoke = false;\n        for (var key in data) {\n          if (!isRenderedModule(key)) {\n            fullInvoke = true;\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            break\n          }\n        }\n        if (!fullInvoke && data['class']) {\n          // ensure collecting deps for deep class bindings for future updates\n          traverse(data['class']);\n        }\n      }\n    } else if (elm.data !== vnode.text) {\n      elm.data = vnode.text;\n    }\n    return true\n  }\n\n  function assertNodeMatch (node, vnode, inVPre) {\n    if (isDef(vnode.tag)) {\n      return vnode.tag.indexOf('vue-component') === 0 || (\n        !isUnknownElement$$1(vnode, inVPre) &&\n        vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n      )\n    } else {\n      return node.nodeType === (vnode.isComment ? 8 : 3)\n    }\n  }\n\n  return function patch (oldVnode, vnode, hydrating, removeOnly) {\n    if (isUndef(vnode)) {\n      if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n      return\n    }\n\n    var isInitialPatch = false;\n    var insertedVnodeQueue = [];\n\n    if (isUndef(oldVnode)) {\n      // empty mount (likely as component), create new root element\n      isInitialPatch = true;\n      createElm(vnode, insertedVnodeQueue);\n    } else {\n      var isRealElement = isDef(oldVnode.nodeType);\n      if (!isRealElement && sameVnode(oldVnode, vnode)) {\n        // patch existing root node\n        patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n      } else {\n        if (isRealElement) {\n          // mounting to a real element\n          // check if this is server-rendered content and if we can perform\n          // a successful hydration.\n          if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n            oldVnode.removeAttribute(SSR_ATTR);\n            hydrating = true;\n          }\n          if (isTrue(hydrating)) {\n            if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n              invokeInsertHook(vnode, insertedVnodeQueue, true);\n              return oldVnode\n            } else if (true) {\n              warn(\n                'The client-side rendered virtual DOM tree is not matching ' +\n                'server-rendered content. This is likely caused by incorrect ' +\n                'HTML markup, for example nesting block-level elements inside ' +\n                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                'full client-side render.'\n              );\n            }\n          }\n          // either not server-rendered, or hydration failed.\n          // create an empty node and replace it\n          oldVnode = emptyNodeAt(oldVnode);\n        }\n\n        // replacing existing element\n        var oldElm = oldVnode.elm;\n        var parentElm = nodeOps.parentNode(oldElm);\n\n        // create new node\n        createElm(\n          vnode,\n          insertedVnodeQueue,\n          // extremely rare edge case: do not insert if old element is in a\n          // leaving transition. Only happens when combining transition +\n          // keep-alive + HOCs. (#4590)\n          oldElm._leaveCb ? null : parentElm,\n          nodeOps.nextSibling(oldElm)\n        );\n\n        // update parent placeholder node element, recursively\n        if (isDef(vnode.parent)) {\n          var ancestor = vnode.parent;\n          var patchable = isPatchable(vnode);\n          while (ancestor) {\n            for (var i = 0; i < cbs.destroy.length; ++i) {\n              cbs.destroy[i](ancestor);\n            }\n            ancestor.elm = vnode.elm;\n            if (patchable) {\n              for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n                cbs.create[i$1](emptyNode, ancestor);\n              }\n              // #6513\n              // invoke insert hooks that may have been merged by create hooks.\n              // e.g. for directives that uses the \"inserted\" hook.\n              var insert = ancestor.data.hook.insert;\n              if (insert.merged) {\n                // start at index 1 to avoid re-invoking component mounted hook\n                for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {\n                  insert.fns[i$2]();\n                }\n              }\n            } else {\n              registerRef(ancestor);\n            }\n            ancestor = ancestor.parent;\n          }\n        }\n\n        // destroy old node\n        if (isDef(parentElm)) {\n          removeVnodes(parentElm, [oldVnode], 0, 0);\n        } else if (isDef(oldVnode.tag)) {\n          invokeDestroyHook(oldVnode);\n        }\n      }\n    }\n\n    invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n    return vnode.elm\n  }\n}\n\n/*  */\n\nvar directives = {\n  create: updateDirectives,\n  update: updateDirectives,\n  destroy: function unbindDirectives (vnode) {\n    updateDirectives(vnode, emptyNode);\n  }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n  if (oldVnode.data.directives || vnode.data.directives) {\n    _update(oldVnode, vnode);\n  }\n}\n\nfunction _update (oldVnode, vnode) {\n  var isCreate = oldVnode === emptyNode;\n  var isDestroy = vnode === emptyNode;\n  var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n  var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n  var dirsWithInsert = [];\n  var dirsWithPostpatch = [];\n\n  var key, oldDir, dir;\n  for (key in newDirs) {\n    oldDir = oldDirs[key];\n    dir = newDirs[key];\n    if (!oldDir) {\n      // new directive, bind\n      callHook$1(dir, 'bind', vnode, oldVnode);\n      if (dir.def && dir.def.inserted) {\n        dirsWithInsert.push(dir);\n      }\n    } else {\n      // existing directive, update\n      dir.oldValue = oldDir.value;\n      dir.oldArg = oldDir.arg;\n      callHook$1(dir, 'update', vnode, oldVnode);\n      if (dir.def && dir.def.componentUpdated) {\n        dirsWithPostpatch.push(dir);\n      }\n    }\n  }\n\n  if (dirsWithInsert.length) {\n    var callInsert = function () {\n      for (var i = 0; i < dirsWithInsert.length; i++) {\n        callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n      }\n    };\n    if (isCreate) {\n      mergeVNodeHook(vnode, 'insert', callInsert);\n    } else {\n      callInsert();\n    }\n  }\n\n  if (dirsWithPostpatch.length) {\n    mergeVNodeHook(vnode, 'postpatch', function () {\n      for (var i = 0; i < dirsWithPostpatch.length; i++) {\n        callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n      }\n    });\n  }\n\n  if (!isCreate) {\n    for (key in oldDirs) {\n      if (!newDirs[key]) {\n        // no longer present, unbind\n        callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n      }\n    }\n  }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n  dirs,\n  vm\n) {\n  var res = Object.create(null);\n  if (!dirs) {\n    // $flow-disable-line\n    return res\n  }\n  var i, dir;\n  for (i = 0; i < dirs.length; i++) {\n    dir = dirs[i];\n    if (!dir.modifiers) {\n      // $flow-disable-line\n      dir.modifiers = emptyModifiers;\n    }\n    res[getRawDirName(dir)] = dir;\n    dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n  }\n  // $flow-disable-line\n  return res\n}\n\nfunction getRawDirName (dir) {\n  return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n  var fn = dir.def && dir.def[hook];\n  if (fn) {\n    try {\n      fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n    } catch (e) {\n      handleError(e, vnode.context, (\"directive \" + (dir.name) + \" \" + hook + \" hook\"));\n    }\n  }\n}\n\nvar baseModules = [\n  ref,\n  directives\n];\n\n/*  */\n\nfunction updateAttrs (oldVnode, vnode) {\n  var opts = vnode.componentOptions;\n  if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n    return\n  }\n  if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n    return\n  }\n  var key, cur, old;\n  var elm = vnode.elm;\n  var oldAttrs = oldVnode.data.attrs || {};\n  var attrs = vnode.data.attrs || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (isDef(attrs.__ob__)) {\n    attrs = vnode.data.attrs = extend({}, attrs);\n  }\n\n  for (key in attrs) {\n    cur = attrs[key];\n    old = oldAttrs[key];\n    if (old !== cur) {\n      setAttr(elm, key, cur);\n    }\n  }\n  // #4391: in IE9, setting type can reset value for input[type=radio]\n  // #6666: IE/Edge forces progress value down to 1 before setting a max\n  /* istanbul ignore if */\n  if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n    setAttr(elm, 'value', attrs.value);\n  }\n  for (key in oldAttrs) {\n    if (isUndef(attrs[key])) {\n      if (isXlink(key)) {\n        elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n      } else if (!isEnumeratedAttr(key)) {\n        elm.removeAttribute(key);\n      }\n    }\n  }\n}\n\nfunction setAttr (el, key, value) {\n  if (el.tagName.indexOf('-') > -1) {\n    baseSetAttr(el, key, value);\n  } else if (isBooleanAttr(key)) {\n    // set attribute for blank value\n    // e.g. <option disabled>Select one</option>\n    if (isFalsyAttrValue(value)) {\n      el.removeAttribute(key);\n    } else {\n      // technically allowfullscreen is a boolean attribute for <iframe>,\n      // but Flash expects a value of \"true\" when used on <embed> tag\n      value = key === 'allowfullscreen' && el.tagName === 'EMBED'\n        ? 'true'\n        : key;\n      el.setAttribute(key, value);\n    }\n  } else if (isEnumeratedAttr(key)) {\n    el.setAttribute(key, convertEnumeratedValue(key, value));\n  } else if (isXlink(key)) {\n    if (isFalsyAttrValue(value)) {\n      el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    baseSetAttr(el, key, value);\n  }\n}\n\nfunction baseSetAttr (el, key, value) {\n  if (isFalsyAttrValue(value)) {\n    el.removeAttribute(key);\n  } else {\n    // #7138: IE10 & 11 fires input event when setting placeholder on\n    // <textarea>... block the first input event and remove the blocker\n    // immediately.\n    /* istanbul ignore if */\n    if (\n      isIE && !isIE9 &&\n      el.tagName === 'TEXTAREA' &&\n      key === 'placeholder' && value !== '' && !el.__ieph\n    ) {\n      var blocker = function (e) {\n        e.stopImmediatePropagation();\n        el.removeEventListener('input', blocker);\n      };\n      el.addEventListener('input', blocker);\n      // $flow-disable-line\n      el.__ieph = true; /* IE placeholder patched */\n    }\n    el.setAttribute(key, value);\n  }\n}\n\nvar attrs = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n\n/*  */\n\nfunction updateClass (oldVnode, vnode) {\n  var el = vnode.elm;\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n  if (\n    isUndef(data.staticClass) &&\n    isUndef(data.class) && (\n      isUndef(oldData) || (\n        isUndef(oldData.staticClass) &&\n        isUndef(oldData.class)\n      )\n    )\n  ) {\n    return\n  }\n\n  var cls = genClassForVnode(vnode);\n\n  // handle transition classes\n  var transitionClass = el._transitionClasses;\n  if (isDef(transitionClass)) {\n    cls = concat(cls, stringifyClass(transitionClass));\n  }\n\n  // set the class\n  if (cls !== el._prevClass) {\n    el.setAttribute('class', cls);\n    el._prevClass = cls;\n  }\n}\n\nvar klass = {\n  create: updateClass,\n  update: updateClass\n};\n\n/*  */\n\n/*  */\n\n/*  */\n\n/*  */\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n/*  */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n  /* istanbul ignore if */\n  if (isDef(on[RANGE_TOKEN])) {\n    // IE input[type=range] only supports `change` event\n    var event = isIE ? 'change' : 'input';\n    on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n    delete on[RANGE_TOKEN];\n  }\n  // This was originally intended to fix #4521 but no longer necessary\n  // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n  /* istanbul ignore if */\n  if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n    on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n    delete on[CHECKBOX_RADIO_TOKEN];\n  }\n}\n\nvar target$1;\n\nfunction createOnceHandler$1 (event, handler, capture) {\n  var _target = target$1; // save current target element in closure\n  return function onceHandler () {\n    var res = handler.apply(null, arguments);\n    if (res !== null) {\n      remove$2(event, onceHandler, capture, _target);\n    }\n  }\n}\n\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nvar useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\n\nfunction add$1 (\n  name,\n  handler,\n  capture,\n  passive\n) {\n  // async edge case #6566: inner click event triggers patch, event handler\n  // attached to outer element during patch, and triggered again. This\n  // happens because browsers fire microtask ticks between event propagation.\n  // the solution is simple: we save the timestamp when a handler is attached,\n  // and the handler would only fire if the event passed to it was fired\n  // AFTER it was attached.\n  if (useMicrotaskFix) {\n    var attachedTimestamp = currentFlushTimestamp;\n    var original = handler;\n    handler = original._wrapper = function (e) {\n      if (\n        // no bubbling, should always fire.\n        // this is just a safety net in case event.timeStamp is unreliable in\n        // certain weird environments...\n        e.target === e.currentTarget ||\n        // event is fired after handler attachment\n        e.timeStamp >= attachedTimestamp ||\n        // bail for environments that have buggy event.timeStamp implementations\n        // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n        // #9681 QtWebEngine event.timeStamp is negative value\n        e.timeStamp <= 0 ||\n        // #9448 bail if event is fired in another document in a multi-page\n        // electron/nw.js app, since event.timeStamp will be using a different\n        // starting reference\n        e.target.ownerDocument !== document\n      ) {\n        return original.apply(this, arguments)\n      }\n    };\n  }\n  target$1.addEventListener(\n    name,\n    handler,\n    supportsPassive\n      ? { capture: capture, passive: passive }\n      : capture\n  );\n}\n\nfunction remove$2 (\n  name,\n  handler,\n  capture,\n  _target\n) {\n  (_target || target$1).removeEventListener(\n    name,\n    handler._wrapper || handler,\n    capture\n  );\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n  if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n    return\n  }\n  var on = vnode.data.on || {};\n  var oldOn = oldVnode.data.on || {};\n  target$1 = vnode.elm;\n  normalizeEvents(on);\n  updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);\n  target$1 = undefined;\n}\n\nvar events = {\n  create: updateDOMListeners,\n  update: updateDOMListeners\n};\n\n/*  */\n\nvar svgContainer;\n\nfunction updateDOMProps (oldVnode, vnode) {\n  if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n    return\n  }\n  var key, cur;\n  var elm = vnode.elm;\n  var oldProps = oldVnode.data.domProps || {};\n  var props = vnode.data.domProps || {};\n  // clone observed objects, as the user probably wants to mutate it\n  if (isDef(props.__ob__)) {\n    props = vnode.data.domProps = extend({}, props);\n  }\n\n  for (key in oldProps) {\n    if (!(key in props)) {\n      elm[key] = '';\n    }\n  }\n\n  for (key in props) {\n    cur = props[key];\n    // ignore children if the node has textContent or innerHTML,\n    // as these will throw away existing DOM nodes and cause removal errors\n    // on subsequent patches (#3360)\n    if (key === 'textContent' || key === 'innerHTML') {\n      if (vnode.children) { vnode.children.length = 0; }\n      if (cur === oldProps[key]) { continue }\n      // #6601 work around Chrome version <= 55 bug where single textNode\n      // replaced by innerHTML/textContent retains its parentNode property\n      if (elm.childNodes.length === 1) {\n        elm.removeChild(elm.childNodes[0]);\n      }\n    }\n\n    if (key === 'value' && elm.tagName !== 'PROGRESS') {\n      // store value as _value as well since\n      // non-string values will be stringified\n      elm._value = cur;\n      // avoid resetting cursor position when value is the same\n      var strCur = isUndef(cur) ? '' : String(cur);\n      if (shouldUpdateValue(elm, strCur)) {\n        elm.value = strCur;\n      }\n    } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {\n      // IE doesn't support innerHTML for SVG elements\n      svgContainer = svgContainer || document.createElement('div');\n      svgContainer.innerHTML = \"<svg>\" + cur + \"</svg>\";\n      var svg = svgContainer.firstChild;\n      while (elm.firstChild) {\n        elm.removeChild(elm.firstChild);\n      }\n      while (svg.firstChild) {\n        elm.appendChild(svg.firstChild);\n      }\n    } else if (\n      // skip the update if old and new VDOM state is the same.\n      // `value` is handled separately because the DOM value may be temporarily\n      // out of sync with VDOM state due to focus, composition and modifiers.\n      // This  #4521 by skipping the unnecesarry `checked` update.\n      cur !== oldProps[key]\n    ) {\n      // some property updates can throw\n      // e.g. `value` on <progress> w/ non-finite value\n      try {\n        elm[key] = cur;\n      } catch (e) {}\n    }\n  }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (elm, checkVal) {\n  return (!elm.composing && (\n    elm.tagName === 'OPTION' ||\n    isNotInFocusAndDirty(elm, checkVal) ||\n    isDirtyWithModifiers(elm, checkVal)\n  ))\n}\n\nfunction isNotInFocusAndDirty (elm, checkVal) {\n  // return true when textbox (.number and .trim) loses focus and its value is\n  // not equal to the updated value\n  var notInFocus = true;\n  // #6157\n  // work around IE bug when accessing document.activeElement in an iframe\n  try { notInFocus = document.activeElement !== elm; } catch (e) {}\n  return notInFocus && elm.value !== checkVal\n}\n\nfunction isDirtyWithModifiers (elm, newVal) {\n  var value = elm.value;\n  var modifiers = elm._vModifiers; // injected by v-model runtime\n  if (isDef(modifiers)) {\n    if (modifiers.number) {\n      return toNumber(value) !== toNumber(newVal)\n    }\n    if (modifiers.trim) {\n      return value.trim() !== newVal.trim()\n    }\n  }\n  return value !== newVal\n}\n\nvar domProps = {\n  create: updateDOMProps,\n  update: updateDOMProps\n};\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n  var style = normalizeStyleBinding(data.style);\n  // static style is pre-processed into an object during compilation\n  // and is always a fresh object, so it's safe to merge into it\n  return data.staticStyle\n    ? extend(data.staticStyle, style)\n    : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n  var res = {};\n  var styleData;\n\n  if (checkChild) {\n    var childNode = vnode;\n    while (childNode.componentInstance) {\n      childNode = childNode.componentInstance._vnode;\n      if (\n        childNode && childNode.data &&\n        (styleData = normalizeStyleData(childNode.data))\n      ) {\n        extend(res, styleData);\n      }\n    }\n  }\n\n  if ((styleData = normalizeStyleData(vnode.data))) {\n    extend(res, styleData);\n  }\n\n  var parentNode = vnode;\n  while ((parentNode = parentNode.parent)) {\n    if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n      extend(res, styleData);\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n  /* istanbul ignore if */\n  if (cssVarRE.test(name)) {\n    el.style.setProperty(name, val);\n  } else if (importantRE.test(val)) {\n    el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n  } else {\n    var normalizedName = normalize(name);\n    if (Array.isArray(val)) {\n      // Support values array created by autoprefixer, e.g.\n      // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n      // Set them one by one, and the browser will only set those it can recognize\n      for (var i = 0, len = val.length; i < len; i++) {\n        el.style[normalizedName] = val[i];\n      }\n    } else {\n      el.style[normalizedName] = val;\n    }\n  }\n};\n\nvar vendorNames = ['Webkit', 'Moz', 'ms'];\n\nvar emptyStyle;\nvar normalize = cached(function (prop) {\n  emptyStyle = emptyStyle || document.createElement('div').style;\n  prop = camelize(prop);\n  if (prop !== 'filter' && (prop in emptyStyle)) {\n    return prop\n  }\n  var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n  for (var i = 0; i < vendorNames.length; i++) {\n    var name = vendorNames[i] + capName;\n    if (name in emptyStyle) {\n      return name\n    }\n  }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n  var data = vnode.data;\n  var oldData = oldVnode.data;\n\n  if (isUndef(data.staticStyle) && isUndef(data.style) &&\n    isUndef(oldData.staticStyle) && isUndef(oldData.style)\n  ) {\n    return\n  }\n\n  var cur, name;\n  var el = vnode.elm;\n  var oldStaticStyle = oldData.staticStyle;\n  var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n\n  // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n  var oldStyle = oldStaticStyle || oldStyleBinding;\n\n  var style = normalizeStyleBinding(vnode.data.style) || {};\n\n  // store normalized style under a different key for next diff\n  // make sure to clone it if it's reactive, since the user likely wants\n  // to mutate it.\n  vnode.data.normalizedStyle = isDef(style.__ob__)\n    ? extend({}, style)\n    : style;\n\n  var newStyle = getStyle(vnode, true);\n\n  for (name in oldStyle) {\n    if (isUndef(newStyle[name])) {\n      setProp(el, name, '');\n    }\n  }\n  for (name in newStyle) {\n    cur = newStyle[name];\n    if (cur !== oldStyle[name]) {\n      // ie9 setting to null has no effect, must use empty string\n      setProp(el, name, cur == null ? '' : cur);\n    }\n  }\n}\n\nvar style = {\n  create: updateStyle,\n  update: updateStyle\n};\n\n/*  */\n\nvar whitespaceRE = /\\s+/;\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });\n    } else {\n      el.classList.add(cls);\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    if (cur.indexOf(' ' + cls + ' ') < 0) {\n      el.setAttribute('class', (cur + cls).trim());\n    }\n  }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n  /* istanbul ignore if */\n  if (!cls || !(cls = cls.trim())) {\n    return\n  }\n\n  /* istanbul ignore else */\n  if (el.classList) {\n    if (cls.indexOf(' ') > -1) {\n      cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });\n    } else {\n      el.classList.remove(cls);\n    }\n    if (!el.classList.length) {\n      el.removeAttribute('class');\n    }\n  } else {\n    var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n    var tar = ' ' + cls + ' ';\n    while (cur.indexOf(tar) >= 0) {\n      cur = cur.replace(tar, ' ');\n    }\n    cur = cur.trim();\n    if (cur) {\n      el.setAttribute('class', cur);\n    } else {\n      el.removeAttribute('class');\n    }\n  }\n}\n\n/*  */\n\nfunction resolveTransition (def$$1) {\n  if (!def$$1) {\n    return\n  }\n  /* istanbul ignore else */\n  if (typeof def$$1 === 'object') {\n    var res = {};\n    if (def$$1.css !== false) {\n      extend(res, autoCssTransition(def$$1.name || 'v'));\n    }\n    extend(res, def$$1);\n    return res\n  } else if (typeof def$$1 === 'string') {\n    return autoCssTransition(def$$1)\n  }\n}\n\nvar autoCssTransition = cached(function (name) {\n  return {\n    enterClass: (name + \"-enter\"),\n    enterToClass: (name + \"-enter-to\"),\n    enterActiveClass: (name + \"-enter-active\"),\n    leaveClass: (name + \"-leave\"),\n    leaveToClass: (name + \"-leave-to\"),\n    leaveActiveClass: (name + \"-leave-active\")\n  }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n  /* istanbul ignore if */\n  if (window.ontransitionend === undefined &&\n    window.onwebkittransitionend !== undefined\n  ) {\n    transitionProp = 'WebkitTransition';\n    transitionEndEvent = 'webkitTransitionEnd';\n  }\n  if (window.onanimationend === undefined &&\n    window.onwebkitanimationend !== undefined\n  ) {\n    animationProp = 'WebkitAnimation';\n    animationEndEvent = 'webkitAnimationEnd';\n  }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser\n  ? window.requestAnimationFrame\n    ? window.requestAnimationFrame.bind(window)\n    : setTimeout\n  : /* istanbul ignore next */ function (fn) { return fn(); };\n\nfunction nextFrame (fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\n\nfunction addTransitionClass (el, cls) {\n  var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n  if (transitionClasses.indexOf(cls) < 0) {\n    transitionClasses.push(cls);\n    addClass(el, cls);\n  }\n}\n\nfunction removeTransitionClass (el, cls) {\n  if (el._transitionClasses) {\n    remove(el._transitionClasses, cls);\n  }\n  removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n  el,\n  expectedType,\n  cb\n) {\n  var ref = getTransitionInfo(el, expectedType);\n  var type = ref.type;\n  var timeout = ref.timeout;\n  var propCount = ref.propCount;\n  if (!type) { return cb() }\n  var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n  var ended = 0;\n  var end = function () {\n    el.removeEventListener(event, onEnd);\n    cb();\n  };\n  var onEnd = function (e) {\n    if (e.target === el) {\n      if (++ended >= propCount) {\n        end();\n      }\n    }\n  };\n  setTimeout(function () {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n  var styles = window.getComputedStyle(el);\n  // JSDOM may return undefined for transition properties\n  var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n  var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n  var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n  var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n  var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n  var type;\n  var timeout = 0;\n  var propCount = 0;\n  /* istanbul ignore if */\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0\n      ? transitionTimeout > animationTimeout\n        ? TRANSITION\n        : ANIMATION\n      : null;\n    propCount = type\n      ? type === TRANSITION\n        ? transitionDurations.length\n        : animationDurations.length\n      : 0;\n  }\n  var hasTransform =\n    type === TRANSITION &&\n    transformRE.test(styles[transitionProp + 'Property']);\n  return {\n    type: type,\n    timeout: timeout,\n    propCount: propCount,\n    hasTransform: hasTransform\n  }\n}\n\nfunction getTimeout (delays, durations) {\n  /* istanbul ignore next */\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n\n  return Math.max.apply(null, durations.map(function (d, i) {\n    return toMs(d) + toMs(delays[i])\n  }))\n}\n\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs (s) {\n  return Number(s.slice(0, -1).replace(',', '.')) * 1000\n}\n\n/*  */\n\nfunction enter (vnode, toggleDisplay) {\n  var el = vnode.elm;\n\n  // call leave callback now\n  if (isDef(el._leaveCb)) {\n    el._leaveCb.cancelled = true;\n    el._leaveCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (isUndef(data)) {\n    return\n  }\n\n  /* istanbul ignore if */\n  if (isDef(el._enterCb) || el.nodeType !== 1) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var enterClass = data.enterClass;\n  var enterToClass = data.enterToClass;\n  var enterActiveClass = data.enterActiveClass;\n  var appearClass = data.appearClass;\n  var appearToClass = data.appearToClass;\n  var appearActiveClass = data.appearActiveClass;\n  var beforeEnter = data.beforeEnter;\n  var enter = data.enter;\n  var afterEnter = data.afterEnter;\n  var enterCancelled = data.enterCancelled;\n  var beforeAppear = data.beforeAppear;\n  var appear = data.appear;\n  var afterAppear = data.afterAppear;\n  var appearCancelled = data.appearCancelled;\n  var duration = data.duration;\n\n  // activeInstance will always be the <transition> component managing this\n  // transition. One edge case to check is when the <transition> is placed\n  // as the root node of a child component. In that case we need to check\n  // <transition>'s parent for appear check.\n  var context = activeInstance;\n  var transitionNode = activeInstance.$vnode;\n  while (transitionNode && transitionNode.parent) {\n    context = transitionNode.context;\n    transitionNode = transitionNode.parent;\n  }\n\n  var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n  if (isAppear && !appear && appear !== '') {\n    return\n  }\n\n  var startClass = isAppear && appearClass\n    ? appearClass\n    : enterClass;\n  var activeClass = isAppear && appearActiveClass\n    ? appearActiveClass\n    : enterActiveClass;\n  var toClass = isAppear && appearToClass\n    ? appearToClass\n    : enterToClass;\n\n  var beforeEnterHook = isAppear\n    ? (beforeAppear || beforeEnter)\n    : beforeEnter;\n  var enterHook = isAppear\n    ? (typeof appear === 'function' ? appear : enter)\n    : enter;\n  var afterEnterHook = isAppear\n    ? (afterAppear || afterEnter)\n    : afterEnter;\n  var enterCancelledHook = isAppear\n    ? (appearCancelled || enterCancelled)\n    : enterCancelled;\n\n  var explicitEnterDuration = toNumber(\n    isObject(duration)\n      ? duration.enter\n      : duration\n  );\n\n  if ( true && explicitEnterDuration != null) {\n    checkDuration(explicitEnterDuration, 'enter', vnode);\n  }\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(enterHook);\n\n  var cb = el._enterCb = once(function () {\n    if (expectsCSS) {\n      removeTransitionClass(el, toClass);\n      removeTransitionClass(el, activeClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, startClass);\n      }\n      enterCancelledHook && enterCancelledHook(el);\n    } else {\n      afterEnterHook && afterEnterHook(el);\n    }\n    el._enterCb = null;\n  });\n\n  if (!vnode.data.show) {\n    // remove pending leave element on enter by injecting an insert hook\n    mergeVNodeHook(vnode, 'insert', function () {\n      var parent = el.parentNode;\n      var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n      if (pendingNode &&\n        pendingNode.tag === vnode.tag &&\n        pendingNode.elm._leaveCb\n      ) {\n        pendingNode.elm._leaveCb();\n      }\n      enterHook && enterHook(el, cb);\n    });\n  }\n\n  // start enter transition\n  beforeEnterHook && beforeEnterHook(el);\n  if (expectsCSS) {\n    addTransitionClass(el, startClass);\n    addTransitionClass(el, activeClass);\n    nextFrame(function () {\n      removeTransitionClass(el, startClass);\n      if (!cb.cancelled) {\n        addTransitionClass(el, toClass);\n        if (!userWantsControl) {\n          if (isValidDuration(explicitEnterDuration)) {\n            setTimeout(cb, explicitEnterDuration);\n          } else {\n            whenTransitionEnds(el, type, cb);\n          }\n        }\n      }\n    });\n  }\n\n  if (vnode.data.show) {\n    toggleDisplay && toggleDisplay();\n    enterHook && enterHook(el, cb);\n  }\n\n  if (!expectsCSS && !userWantsControl) {\n    cb();\n  }\n}\n\nfunction leave (vnode, rm) {\n  var el = vnode.elm;\n\n  // call enter callback now\n  if (isDef(el._enterCb)) {\n    el._enterCb.cancelled = true;\n    el._enterCb();\n  }\n\n  var data = resolveTransition(vnode.data.transition);\n  if (isUndef(data) || el.nodeType !== 1) {\n    return rm()\n  }\n\n  /* istanbul ignore if */\n  if (isDef(el._leaveCb)) {\n    return\n  }\n\n  var css = data.css;\n  var type = data.type;\n  var leaveClass = data.leaveClass;\n  var leaveToClass = data.leaveToClass;\n  var leaveActiveClass = data.leaveActiveClass;\n  var beforeLeave = data.beforeLeave;\n  var leave = data.leave;\n  var afterLeave = data.afterLeave;\n  var leaveCancelled = data.leaveCancelled;\n  var delayLeave = data.delayLeave;\n  var duration = data.duration;\n\n  var expectsCSS = css !== false && !isIE9;\n  var userWantsControl = getHookArgumentsLength(leave);\n\n  var explicitLeaveDuration = toNumber(\n    isObject(duration)\n      ? duration.leave\n      : duration\n  );\n\n  if ( true && isDef(explicitLeaveDuration)) {\n    checkDuration(explicitLeaveDuration, 'leave', vnode);\n  }\n\n  var cb = el._leaveCb = once(function () {\n    if (el.parentNode && el.parentNode._pending) {\n      el.parentNode._pending[vnode.key] = null;\n    }\n    if (expectsCSS) {\n      removeTransitionClass(el, leaveToClass);\n      removeTransitionClass(el, leaveActiveClass);\n    }\n    if (cb.cancelled) {\n      if (expectsCSS) {\n        removeTransitionClass(el, leaveClass);\n      }\n      leaveCancelled && leaveCancelled(el);\n    } else {\n      rm();\n      afterLeave && afterLeave(el);\n    }\n    el._leaveCb = null;\n  });\n\n  if (delayLeave) {\n    delayLeave(performLeave);\n  } else {\n    performLeave();\n  }\n\n  function performLeave () {\n    // the delayed leave may have already been cancelled\n    if (cb.cancelled) {\n      return\n    }\n    // record leaving element\n    if (!vnode.data.show && el.parentNode) {\n      (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;\n    }\n    beforeLeave && beforeLeave(el);\n    if (expectsCSS) {\n      addTransitionClass(el, leaveClass);\n      addTransitionClass(el, leaveActiveClass);\n      nextFrame(function () {\n        removeTransitionClass(el, leaveClass);\n        if (!cb.cancelled) {\n          addTransitionClass(el, leaveToClass);\n          if (!userWantsControl) {\n            if (isValidDuration(explicitLeaveDuration)) {\n              setTimeout(cb, explicitLeaveDuration);\n            } else {\n              whenTransitionEnds(el, type, cb);\n            }\n          }\n        }\n      });\n    }\n    leave && leave(el, cb);\n    if (!expectsCSS && !userWantsControl) {\n      cb();\n    }\n  }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n  if (typeof val !== 'number') {\n    warn(\n      \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n      \"got \" + (JSON.stringify(val)) + \".\",\n      vnode.context\n    );\n  } else if (isNaN(val)) {\n    warn(\n      \"<transition> explicit \" + name + \" duration is NaN - \" +\n      'the duration expression might be incorrect.',\n      vnode.context\n    );\n  }\n}\n\nfunction isValidDuration (val) {\n  return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n  if (isUndef(fn)) {\n    return false\n  }\n  var invokerFns = fn.fns;\n  if (isDef(invokerFns)) {\n    // invoker\n    return getHookArgumentsLength(\n      Array.isArray(invokerFns)\n        ? invokerFns[0]\n        : invokerFns\n    )\n  } else {\n    return (fn._length || fn.length) > 1\n  }\n}\n\nfunction _enter (_, vnode) {\n  if (vnode.data.show !== true) {\n    enter(vnode);\n  }\n}\n\nvar transition = inBrowser ? {\n  create: _enter,\n  activate: _enter,\n  remove: function remove$$1 (vnode, rm) {\n    /* istanbul ignore else */\n    if (vnode.data.show !== true) {\n      leave(vnode, rm);\n    } else {\n      rm();\n    }\n  }\n} : {};\n\nvar platformModules = [\n  attrs,\n  klass,\n  events,\n  domProps,\n  style,\n  transition\n];\n\n/*  */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n  // http://www.matts411.com/post/internet-explorer-9-oninput/\n  document.addEventListener('selectionchange', function () {\n    var el = document.activeElement;\n    if (el && el.vmodel) {\n      trigger(el, 'input');\n    }\n  });\n}\n\nvar directive = {\n  inserted: function inserted (el, binding, vnode, oldVnode) {\n    if (vnode.tag === 'select') {\n      // #6903\n      if (oldVnode.elm && !oldVnode.elm._vOptions) {\n        mergeVNodeHook(vnode, 'postpatch', function () {\n          directive.componentUpdated(el, binding, vnode);\n        });\n      } else {\n        setSelected(el, binding, vnode.context);\n      }\n      el._vOptions = [].map.call(el.options, getValue);\n    } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n      el._vModifiers = binding.modifiers;\n      if (!binding.modifiers.lazy) {\n        el.addEventListener('compositionstart', onCompositionStart);\n        el.addEventListener('compositionend', onCompositionEnd);\n        // Safari < 10.2 & UIWebView doesn't fire compositionend when\n        // switching focus before confirming composition choice\n        // this also fixes the issue where some browsers e.g. iOS Chrome\n        // fires \"change\" instead of \"input\" on autocomplete.\n        el.addEventListener('change', onCompositionEnd);\n        /* istanbul ignore if */\n        if (isIE9) {\n          el.vmodel = true;\n        }\n      }\n    }\n  },\n\n  componentUpdated: function componentUpdated (el, binding, vnode) {\n    if (vnode.tag === 'select') {\n      setSelected(el, binding, vnode.context);\n      // in case the options rendered by v-for have changed,\n      // it's possible that the value is out-of-sync with the rendered options.\n      // detect such cases and filter out values that no longer has a matching\n      // option in the DOM.\n      var prevOptions = el._vOptions;\n      var curOptions = el._vOptions = [].map.call(el.options, getValue);\n      if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {\n        // trigger change event if\n        // no matching option found for at least one value\n        var needReset = el.multiple\n          ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })\n          : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);\n        if (needReset) {\n          trigger(el, 'change');\n        }\n      }\n    }\n  }\n};\n\nfunction setSelected (el, binding, vm) {\n  actuallySetSelected(el, binding, vm);\n  /* istanbul ignore if */\n  if (isIE || isEdge) {\n    setTimeout(function () {\n      actuallySetSelected(el, binding, vm);\n    }, 0);\n  }\n}\n\nfunction actuallySetSelected (el, binding, vm) {\n  var value = binding.value;\n  var isMultiple = el.multiple;\n  if (isMultiple && !Array.isArray(value)) {\n     true && warn(\n      \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n      \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n      vm\n    );\n    return\n  }\n  var selected, option;\n  for (var i = 0, l = el.options.length; i < l; i++) {\n    option = el.options[i];\n    if (isMultiple) {\n      selected = looseIndexOf(value, getValue(option)) > -1;\n      if (option.selected !== selected) {\n        option.selected = selected;\n      }\n    } else {\n      if (looseEqual(getValue(option), value)) {\n        if (el.selectedIndex !== i) {\n          el.selectedIndex = i;\n        }\n        return\n      }\n    }\n  }\n  if (!isMultiple) {\n    el.selectedIndex = -1;\n  }\n}\n\nfunction hasNoMatchingOption (value, options) {\n  return options.every(function (o) { return !looseEqual(o, value); })\n}\n\nfunction getValue (option) {\n  return '_value' in option\n    ? option._value\n    : option.value\n}\n\nfunction onCompositionStart (e) {\n  e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n  // prevent triggering an input event for no reason\n  if (!e.target.composing) { return }\n  e.target.composing = false;\n  trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n  var e = document.createEvent('HTMLEvents');\n  e.initEvent(type, true, true);\n  el.dispatchEvent(e);\n}\n\n/*  */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n  return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n    ? locateNode(vnode.componentInstance._vnode)\n    : vnode\n}\n\nvar show = {\n  bind: function bind (el, ref, vnode) {\n    var value = ref.value;\n\n    vnode = locateNode(vnode);\n    var transition$$1 = vnode.data && vnode.data.transition;\n    var originalDisplay = el.__vOriginalDisplay =\n      el.style.display === 'none' ? '' : el.style.display;\n    if (value && transition$$1) {\n      vnode.data.show = true;\n      enter(vnode, function () {\n        el.style.display = originalDisplay;\n      });\n    } else {\n      el.style.display = value ? originalDisplay : 'none';\n    }\n  },\n\n  update: function update (el, ref, vnode) {\n    var value = ref.value;\n    var oldValue = ref.oldValue;\n\n    /* istanbul ignore if */\n    if (!value === !oldValue) { return }\n    vnode = locateNode(vnode);\n    var transition$$1 = vnode.data && vnode.data.transition;\n    if (transition$$1) {\n      vnode.data.show = true;\n      if (value) {\n        enter(vnode, function () {\n          el.style.display = el.__vOriginalDisplay;\n        });\n      } else {\n        leave(vnode, function () {\n          el.style.display = 'none';\n        });\n      }\n    } else {\n      el.style.display = value ? el.__vOriginalDisplay : 'none';\n    }\n  },\n\n  unbind: function unbind (\n    el,\n    binding,\n    vnode,\n    oldVnode,\n    isDestroy\n  ) {\n    if (!isDestroy) {\n      el.style.display = el.__vOriginalDisplay;\n    }\n  }\n};\n\nvar platformDirectives = {\n  model: directive,\n  show: show\n};\n\n/*  */\n\nvar transitionProps = {\n  name: String,\n  appear: Boolean,\n  css: Boolean,\n  mode: String,\n  type: String,\n  enterClass: String,\n  leaveClass: String,\n  enterToClass: String,\n  leaveToClass: String,\n  enterActiveClass: String,\n  leaveActiveClass: String,\n  appearClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n  var compOptions = vnode && vnode.componentOptions;\n  if (compOptions && compOptions.Ctor.options.abstract) {\n    return getRealChild(getFirstComponentChild(compOptions.children))\n  } else {\n    return vnode\n  }\n}\n\nfunction extractTransitionData (comp) {\n  var data = {};\n  var options = comp.$options;\n  // props\n  for (var key in options.propsData) {\n    data[key] = comp[key];\n  }\n  // events.\n  // extract listeners and pass them directly to the transition methods\n  var listeners = options._parentListeners;\n  for (var key$1 in listeners) {\n    data[camelize(key$1)] = listeners[key$1];\n  }\n  return data\n}\n\nfunction placeholder (h, rawChild) {\n  if (/\\d-keep-alive$/.test(rawChild.tag)) {\n    return h('keep-alive', {\n      props: rawChild.componentOptions.propsData\n    })\n  }\n}\n\nfunction hasParentTransition (vnode) {\n  while ((vnode = vnode.parent)) {\n    if (vnode.data.transition) {\n      return true\n    }\n  }\n}\n\nfunction isSameChild (child, oldChild) {\n  return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\n\nvar isVShowDirective = function (d) { return d.name === 'show'; };\n\nvar Transition = {\n  name: 'transition',\n  props: transitionProps,\n  abstract: true,\n\n  render: function render (h) {\n    var this$1 = this;\n\n    var children = this.$slots.default;\n    if (!children) {\n      return\n    }\n\n    // filter out text nodes (possible whitespaces)\n    children = children.filter(isNotTextNode);\n    /* istanbul ignore if */\n    if (!children.length) {\n      return\n    }\n\n    // warn multiple elements\n    if ( true && children.length > 1) {\n      warn(\n        '<transition> can only be used on a single element. Use ' +\n        '<transition-group> for lists.',\n        this.$parent\n      );\n    }\n\n    var mode = this.mode;\n\n    // warn invalid mode\n    if ( true &&\n      mode && mode !== 'in-out' && mode !== 'out-in'\n    ) {\n      warn(\n        'invalid <transition> mode: ' + mode,\n        this.$parent\n      );\n    }\n\n    var rawChild = children[0];\n\n    // if this is a component root node and the component's\n    // parent container node also has transition, skip.\n    if (hasParentTransition(this.$vnode)) {\n      return rawChild\n    }\n\n    // apply transition data to child\n    // use getRealChild() to ignore abstract components e.g. keep-alive\n    var child = getRealChild(rawChild);\n    /* istanbul ignore if */\n    if (!child) {\n      return rawChild\n    }\n\n    if (this._leaving) {\n      return placeholder(h, rawChild)\n    }\n\n    // ensure a key that is unique to the vnode type and to this transition\n    // component instance. This key will be used to remove pending leaving nodes\n    // during entering.\n    var id = \"__transition-\" + (this._uid) + \"-\";\n    child.key = child.key == null\n      ? child.isComment\n        ? id + 'comment'\n        : id + child.tag\n      : isPrimitive(child.key)\n        ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n        : child.key;\n\n    var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n    var oldRawChild = this._vnode;\n    var oldChild = getRealChild(oldRawChild);\n\n    // mark v-show\n    // so that the transition module can hand over the control to the directive\n    if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n      child.data.show = true;\n    }\n\n    if (\n      oldChild &&\n      oldChild.data &&\n      !isSameChild(child, oldChild) &&\n      !isAsyncPlaceholder(oldChild) &&\n      // #6687 component root is a comment node\n      !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)\n    ) {\n      // replace old child transition data with fresh one\n      // important for dynamic transitions!\n      var oldData = oldChild.data.transition = extend({}, data);\n      // handle transition mode\n      if (mode === 'out-in') {\n        // return placeholder node and queue update when leave finishes\n        this._leaving = true;\n        mergeVNodeHook(oldData, 'afterLeave', function () {\n          this$1._leaving = false;\n          this$1.$forceUpdate();\n        });\n        return placeholder(h, rawChild)\n      } else if (mode === 'in-out') {\n        if (isAsyncPlaceholder(child)) {\n          return oldRawChild\n        }\n        var delayedLeave;\n        var performLeave = function () { delayedLeave(); };\n        mergeVNodeHook(data, 'afterEnter', performLeave);\n        mergeVNodeHook(data, 'enterCancelled', performLeave);\n        mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n      }\n    }\n\n    return rawChild\n  }\n};\n\n/*  */\n\nvar props = extend({\n  tag: String,\n  moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n  props: props,\n\n  beforeMount: function beforeMount () {\n    var this$1 = this;\n\n    var update = this._update;\n    this._update = function (vnode, hydrating) {\n      var restoreActiveInstance = setActiveInstance(this$1);\n      // force removing pass\n      this$1.__patch__(\n        this$1._vnode,\n        this$1.kept,\n        false, // hydrating\n        true // removeOnly (!important, avoids unnecessary moves)\n      );\n      this$1._vnode = this$1.kept;\n      restoreActiveInstance();\n      update.call(this$1, vnode, hydrating);\n    };\n  },\n\n  render: function render (h) {\n    var tag = this.tag || this.$vnode.data.tag || 'span';\n    var map = Object.create(null);\n    var prevChildren = this.prevChildren = this.children;\n    var rawChildren = this.$slots.default || [];\n    var children = this.children = [];\n    var transitionData = extractTransitionData(this);\n\n    for (var i = 0; i < rawChildren.length; i++) {\n      var c = rawChildren[i];\n      if (c.tag) {\n        if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n          children.push(c);\n          map[c.key] = c\n          ;(c.data || (c.data = {})).transition = transitionData;\n        } else if (true) {\n          var opts = c.componentOptions;\n          var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n          warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n        }\n      }\n    }\n\n    if (prevChildren) {\n      var kept = [];\n      var removed = [];\n      for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n        var c$1 = prevChildren[i$1];\n        c$1.data.transition = transitionData;\n        c$1.data.pos = c$1.elm.getBoundingClientRect();\n        if (map[c$1.key]) {\n          kept.push(c$1);\n        } else {\n          removed.push(c$1);\n        }\n      }\n      this.kept = h(tag, null, kept);\n      this.removed = removed;\n    }\n\n    return h(tag, null, children)\n  },\n\n  updated: function updated () {\n    var children = this.prevChildren;\n    var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n    if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n      return\n    }\n\n    // we divide the work into three loops to avoid mixing DOM reads and writes\n    // in each iteration - which helps prevent layout thrashing.\n    children.forEach(callPendingCbs);\n    children.forEach(recordPosition);\n    children.forEach(applyTranslation);\n\n    // force reflow to put everything in position\n    // assign to this to avoid being removed in tree-shaking\n    // $flow-disable-line\n    this._reflow = document.body.offsetHeight;\n\n    children.forEach(function (c) {\n      if (c.data.moved) {\n        var el = c.elm;\n        var s = el.style;\n        addTransitionClass(el, moveClass);\n        s.transform = s.WebkitTransform = s.transitionDuration = '';\n        el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n          if (e && e.target !== el) {\n            return\n          }\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(transitionEndEvent, cb);\n            el._moveCb = null;\n            removeTransitionClass(el, moveClass);\n          }\n        });\n      }\n    });\n  },\n\n  methods: {\n    hasMove: function hasMove (el, moveClass) {\n      /* istanbul ignore if */\n      if (!hasTransition) {\n        return false\n      }\n      /* istanbul ignore if */\n      if (this._hasMove) {\n        return this._hasMove\n      }\n      // Detect whether an element with the move class applied has\n      // CSS transitions. Since the element may be inside an entering\n      // transition at this very moment, we make a clone of it and remove\n      // all other transition classes applied to ensure only the move class\n      // is applied.\n      var clone = el.cloneNode();\n      if (el._transitionClasses) {\n        el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n      }\n      addClass(clone, moveClass);\n      clone.style.display = 'none';\n      this.$el.appendChild(clone);\n      var info = getTransitionInfo(clone);\n      this.$el.removeChild(clone);\n      return (this._hasMove = info.hasTransform)\n    }\n  }\n};\n\nfunction callPendingCbs (c) {\n  /* istanbul ignore if */\n  if (c.elm._moveCb) {\n    c.elm._moveCb();\n  }\n  /* istanbul ignore if */\n  if (c.elm._enterCb) {\n    c.elm._enterCb();\n  }\n}\n\nfunction recordPosition (c) {\n  c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n  var oldPos = c.data.pos;\n  var newPos = c.data.newPos;\n  var dx = oldPos.left - newPos.left;\n  var dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    c.data.moved = true;\n    var s = c.elm.style;\n    s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n    s.transitionDuration = '0s';\n  }\n}\n\nvar platformComponents = {\n  Transition: Transition,\n  TransitionGroup: TransitionGroup\n};\n\n/*  */\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue.prototype.$mount = function (\n  el,\n  hydrating\n) {\n  el = el && inBrowser ? query(el) : undefined;\n  return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n  setTimeout(function () {\n    if (config.devtools) {\n      if (devtools) {\n        devtools.emit('init', Vue);\n      } else if (\n        true\n      ) {\n        console[console.info ? 'info' : 'log'](\n          'Download the Vue Devtools extension for a better development experience:\\n' +\n          'https://github.com/vuejs/vue-devtools'\n        );\n      }\n    }\n    if ( true &&\n      config.productionTip !== false &&\n      typeof console !== 'undefined'\n    ) {\n      console[console.info ? 'info' : 'log'](\n        \"You are running Vue in development mode.\\n\" +\n        \"Make sure to turn on production mode when deploying for production.\\n\" +\n        \"See more tips at https://vuejs.org/guide/deployment.html\"\n      );\n    }\n  }, 0);\n}\n\n/*  */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Vue);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"./node_modules/timers-browserify/main.js\").setImmediate))\n\n//# sourceURL=webpack:///./node_modules/vue/dist/vue.runtime.esm.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?");

/***/ }),

/***/ "./src/asserts/bkg.jpg":
/*!*****************************!*\
  !*** ./src/asserts/bkg.jpg ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__.p + \"asserts/bkg.jpg\";\n\n//# sourceURL=webpack:///./src/asserts/bkg.jpg?");

/***/ }),

/***/ "./src/asserts/close.png":
/*!*******************************!*\
  !*** ./src/asserts/close.png ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__.p + \"asserts/close.png\";\n\n//# sourceURL=webpack:///./src/asserts/close.png?");

/***/ }),

/***/ "./src/asserts/max.png":
/*!*****************************!*\
  !*** ./src/asserts/max.png ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__.p + \"asserts/max.png\";\n\n//# sourceURL=webpack:///./src/asserts/max.png?");

/***/ }),

/***/ "./src/asserts/min.png":
/*!*****************************!*\
  !*** ./src/asserts/min.png ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__.p + \"asserts/min.png\";\n\n//# sourceURL=webpack:///./src/asserts/min.png?");

/***/ }),

/***/ "./src/components/btn-list.vue":
/*!*************************************!*\
  !*** ./src/components/btn-list.vue ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _btn_list_vue_vue_type_template_id_411b2c02_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./btn-list.vue?vue&type=template&id=411b2c02&scoped=true& */ \"./src/components/btn-list.vue?vue&type=template&id=411b2c02&scoped=true&\");\n/* harmony import */ var _btn_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./btn-list.vue?vue&type=script&lang=js& */ \"./src/components/btn-list.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css& */ \"./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _btn_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _btn_list_vue_vue_type_template_id_411b2c02_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _btn_list_vue_vue_type_template_id_411b2c02_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"411b2c02\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/btn-list.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/btn-list.vue?");

/***/ }),

/***/ "./src/components/btn-list.vue?vue&type=script&lang=js&":
/*!**************************************************************!*\
  !*** ./src/components/btn-list.vue?vue&type=script&lang=js& ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./btn-list.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/btn-list.vue?");

/***/ }),

/***/ "./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css&":
/*!**********************************************************************************************!*\
  !*** ./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css& ***!
  \**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=style&index=0&id=411b2c02&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_style_index_0_id_411b2c02_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/btn-list.vue?");

/***/ }),

/***/ "./src/components/btn-list.vue?vue&type=template&id=411b2c02&scoped=true&":
/*!********************************************************************************!*\
  !*** ./src/components/btn-list.vue?vue&type=template&id=411b2c02&scoped=true& ***!
  \********************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_template_id_411b2c02_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./btn-list.vue?vue&type=template&id=411b2c02&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/btn-list.vue?vue&type=template&id=411b2c02&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_template_id_411b2c02_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_btn_list_vue_vue_type_template_id_411b2c02_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/btn-list.vue?");

/***/ }),

/***/ "./src/components/dplayer.vue":
/*!************************************!*\
  !*** ./src/components/dplayer.vue ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _dplayer_vue_vue_type_template_id_4e94c036_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dplayer.vue?vue&type=template&id=4e94c036&scoped=true& */ \"./src/components/dplayer.vue?vue&type=template&id=4e94c036&scoped=true&\");\n/* harmony import */ var _dplayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dplayer.vue?vue&type=script&lang=js& */ \"./src/components/dplayer.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css& */ \"./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _dplayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _dplayer_vue_vue_type_template_id_4e94c036_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _dplayer_vue_vue_type_template_id_4e94c036_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"4e94c036\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/dplayer.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/dplayer.vue?");

/***/ }),

/***/ "./src/components/dplayer.vue?vue&type=script&lang=js&":
/*!*************************************************************!*\
  !*** ./src/components/dplayer.vue?vue&type=script&lang=js& ***!
  \*************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./dplayer.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/dplayer.vue?");

/***/ }),

/***/ "./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css&":
/*!*********************************************************************************************!*\
  !*** ./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css& ***!
  \*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=style&index=0&id=4e94c036&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_style_index_0_id_4e94c036_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/dplayer.vue?");

/***/ }),

/***/ "./src/components/dplayer.vue?vue&type=template&id=4e94c036&scoped=true&":
/*!*******************************************************************************!*\
  !*** ./src/components/dplayer.vue?vue&type=template&id=4e94c036&scoped=true& ***!
  \*******************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_template_id_4e94c036_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./dplayer.vue?vue&type=template&id=4e94c036&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/dplayer.vue?vue&type=template&id=4e94c036&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_template_id_4e94c036_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_dplayer_vue_vue_type_template_id_4e94c036_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/dplayer.vue?");

/***/ }),

/***/ "./src/components/func.vue":
/*!*********************************!*\
  !*** ./src/components/func.vue ***!
  \*********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _func_vue_vue_type_template_id_247d68d4_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./func.vue?vue&type=template&id=247d68d4&scoped=true& */ \"./src/components/func.vue?vue&type=template&id=247d68d4&scoped=true&\");\n/* harmony import */ var _func_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./func.vue?vue&type=script&lang=js& */ \"./src/components/func.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css& */ \"./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _func_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _func_vue_vue_type_template_id_247d68d4_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _func_vue_vue_type_template_id_247d68d4_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"247d68d4\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/func.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/func.vue?");

/***/ }),

/***/ "./src/components/func.vue?vue&type=script&lang=js&":
/*!**********************************************************!*\
  !*** ./src/components/func.vue?vue&type=script&lang=js& ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./func.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/func.vue?");

/***/ }),

/***/ "./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css&":
/*!******************************************************************************************!*\
  !*** ./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css& ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=style&index=0&id=247d68d4&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_style_index_0_id_247d68d4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/func.vue?");

/***/ }),

/***/ "./src/components/func.vue?vue&type=template&id=247d68d4&scoped=true&":
/*!****************************************************************************!*\
  !*** ./src/components/func.vue?vue&type=template&id=247d68d4&scoped=true& ***!
  \****************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_template_id_247d68d4_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./func.vue?vue&type=template&id=247d68d4&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/func.vue?vue&type=template&id=247d68d4&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_template_id_247d68d4_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_func_vue_vue_type_template_id_247d68d4_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/func.vue?");

/***/ }),

/***/ "./src/components/layout.vue":
/*!***********************************!*\
  !*** ./src/components/layout.vue ***!
  \***********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _layout_vue_vue_type_template_id_ecebbf8c_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layout.vue?vue&type=template&id=ecebbf8c&scoped=true& */ \"./src/components/layout.vue?vue&type=template&id=ecebbf8c&scoped=true&\");\n/* harmony import */ var _layout_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout.vue?vue&type=script&lang=js& */ \"./src/components/layout.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css& */ \"./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _layout_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _layout_vue_vue_type_template_id_ecebbf8c_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _layout_vue_vue_type_template_id_ecebbf8c_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"ecebbf8c\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/layout.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/layout.vue?");

/***/ }),

/***/ "./src/components/layout.vue?vue&type=script&lang=js&":
/*!************************************************************!*\
  !*** ./src/components/layout.vue?vue&type=script&lang=js& ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./layout.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/layout.vue?");

/***/ }),

/***/ "./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css&":
/*!********************************************************************************************!*\
  !*** ./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css& ***!
  \********************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=style&index=0&id=ecebbf8c&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_id_ecebbf8c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/layout.vue?");

/***/ }),

/***/ "./src/components/layout.vue?vue&type=template&id=ecebbf8c&scoped=true&":
/*!******************************************************************************!*\
  !*** ./src/components/layout.vue?vue&type=template&id=ecebbf8c&scoped=true& ***!
  \******************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_template_id_ecebbf8c_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./layout.vue?vue&type=template&id=ecebbf8c&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/layout.vue?vue&type=template&id=ecebbf8c&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_template_id_ecebbf8c_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_template_id_ecebbf8c_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/layout.vue?");

/***/ }),

/***/ "./src/components/menu.vue":
/*!*********************************!*\
  !*** ./src/components/menu.vue ***!
  \*********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _menu_vue_vue_type_template_id_a380d422_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./menu.vue?vue&type=template&id=a380d422&scoped=true& */ \"./src/components/menu.vue?vue&type=template&id=a380d422&scoped=true&\");\n/* harmony import */ var _menu_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./menu.vue?vue&type=script&lang=js& */ \"./src/components/menu.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./menu.vue?vue&type=style&index=0&lang=css& */ \"./src/components/menu.vue?vue&type=style&index=0&lang=css&\");\n/* harmony import */ var _menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css& */ \"./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\n  _menu_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _menu_vue_vue_type_template_id_a380d422_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _menu_vue_vue_type_template_id_a380d422_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"a380d422\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/menu.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/menu.vue?");

/***/ }),

/***/ "./src/components/menu.vue?vue&type=script&lang=js&":
/*!**********************************************************!*\
  !*** ./src/components/menu.vue?vue&type=script&lang=js& ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./menu.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/menu.vue?");

/***/ }),

/***/ "./src/components/menu.vue?vue&type=style&index=0&lang=css&":
/*!******************************************************************!*\
  !*** ./src/components/menu.vue?vue&type=style&index=0&lang=css& ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./menu.vue?vue&type=style&index=0&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=0&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/menu.vue?");

/***/ }),

/***/ "./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css&":
/*!******************************************************************************************!*\
  !*** ./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css& ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=style&index=1&id=a380d422&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_1_id_a380d422_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/menu.vue?");

/***/ }),

/***/ "./src/components/menu.vue?vue&type=template&id=a380d422&scoped=true&":
/*!****************************************************************************!*\
  !*** ./src/components/menu.vue?vue&type=template&id=a380d422&scoped=true& ***!
  \****************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_template_id_a380d422_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./menu.vue?vue&type=template&id=a380d422&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/menu.vue?vue&type=template&id=a380d422&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_template_id_a380d422_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_template_id_a380d422_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/menu.vue?");

/***/ }),

/***/ "./src/components/vedio.vue":
/*!**********************************!*\
  !*** ./src/components/vedio.vue ***!
  \**********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vedio_vue_vue_type_template_id_2e15da1b_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vedio.vue?vue&type=template&id=2e15da1b&scoped=true& */ \"./src/components/vedio.vue?vue&type=template&id=2e15da1b&scoped=true&\");\n/* harmony import */ var _vedio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vedio.vue?vue&type=script&lang=js& */ \"./src/components/vedio.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css& */ \"./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _vedio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _vedio_vue_vue_type_template_id_2e15da1b_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _vedio_vue_vue_type_template_id_2e15da1b_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"2e15da1b\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/vedio.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/vedio.vue?");

/***/ }),

/***/ "./src/components/vedio.vue?vue&type=script&lang=js&":
/*!***********************************************************!*\
  !*** ./src/components/vedio.vue?vue&type=script&lang=js& ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./vedio.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/vedio.vue?");

/***/ }),

/***/ "./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css&":
/*!*******************************************************************************************!*\
  !*** ./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css& ***!
  \*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=style&index=0&id=2e15da1b&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_style_index_0_id_2e15da1b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/vedio.vue?");

/***/ }),

/***/ "./src/components/vedio.vue?vue&type=template&id=2e15da1b&scoped=true&":
/*!*****************************************************************************!*\
  !*** ./src/components/vedio.vue?vue&type=template&id=2e15da1b&scoped=true& ***!
  \*****************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_template_id_2e15da1b_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./vedio.vue?vue&type=template&id=2e15da1b&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/vedio.vue?vue&type=template&id=2e15da1b&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_template_id_2e15da1b_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_vedio_vue_vue_type_template_id_2e15da1b_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/vedio.vue?");

/***/ }),

/***/ "./src/components/video-list.vue":
/*!***************************************!*\
  !*** ./src/components/video-list.vue ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _video_list_vue_vue_type_template_id_26de6e80_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./video-list.vue?vue&type=template&id=26de6e80&scoped=true& */ \"./src/components/video-list.vue?vue&type=template&id=26de6e80&scoped=true&\");\n/* harmony import */ var _video_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./video-list.vue?vue&type=script&lang=js& */ \"./src/components/video-list.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css& */ \"./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _video_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _video_list_vue_vue_type_template_id_26de6e80_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _video_list_vue_vue_type_template_id_26de6e80_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  \"26de6e80\",\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/video-list.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/video-list.vue?");

/***/ }),

/***/ "./src/components/video-list.vue?vue&type=script&lang=js&":
/*!****************************************************************!*\
  !*** ./src/components/video-list.vue?vue&type=script&lang=js& ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib??vue-loader-options!./video-list.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/video-list.vue?");

/***/ }),

/***/ "./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css&":
/*!************************************************************************************************!*\
  !*** ./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css& ***!
  \************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-style-loader!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib??vue-loader-options!./video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css& */ \"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=style&index=0&id=26de6e80&scoped=true&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_style_index_0_id_26de6e80_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./src/components/video-list.vue?");

/***/ }),

/***/ "./src/components/video-list.vue?vue&type=template&id=26de6e80&scoped=true&":
/*!**********************************************************************************!*\
  !*** ./src/components/video-list.vue?vue&type=template&id=26de6e80&scoped=true& ***!
  \**********************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_template_id_26de6e80_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib??vue-loader-options!./video-list.vue?vue&type=template&id=26de6e80&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./src/components/video-list.vue?vue&type=template&id=26de6e80&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_template_id_26de6e80_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_video_list_vue_vue_type_template_id_26de6e80_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/video-list.vue?");

/***/ }),

/***/ "./src/index.js":
/*!**********************!*\
  !*** ./src/index.js ***!
  \**********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _asserts_bkg_jpg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./asserts/bkg.jpg */ \"./src/asserts/bkg.jpg\");\n/* harmony import */ var _asserts_bkg_jpg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_asserts_bkg_jpg__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _asserts_min_png__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./asserts/min.png */ \"./src/asserts/min.png\");\n/* harmony import */ var _asserts_min_png__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_asserts_min_png__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _asserts_max_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./asserts/max.png */ \"./src/asserts/max.png\");\n/* harmony import */ var _asserts_max_png__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_asserts_max_png__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _asserts_close_png__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./asserts/close.png */ \"./src/asserts/close.png\");\n/* harmony import */ var _asserts_close_png__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_asserts_close_png__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _components_layout_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/layout.vue */ \"./src/components/layout.vue\");\n\n\n\n\n\n\n\n\n\nlet bus = new vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.$bus = bus;\n\nlet app = new vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n    el: '#app',\n    render: h => h(_components_layout_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n});\n\n//# sourceURL=webpack:///./src/index.js?");

/***/ }),

/***/ "./src/lib/DPlayer.min.css":
/*!*********************************!*\
  !*** ./src/lib/DPlayer.min.css ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js!./DPlayer.min.css */ \"./node_modules/css-loader/dist/cjs.js!./src/lib/DPlayer.min.css\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"8e4b5984\", content, false, {});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/lib/DPlayer.min.css?");

/***/ }),

/***/ "./src/lib/DPlayer.min.js":
/*!********************************!*\
  !*** ./src/lib/DPlayer.min.js ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("!function (e, t) {\n   true ? module.exports = t() : undefined;\n}(window, function () {\n  return function (e) {\n    var t = {};function n(i) {\n      if (t[i]) return t[i].exports;var a = t[i] = { i: i, l: !1, exports: {} };return e[i].call(a.exports, a, a.exports, n), a.l = !0, a.exports;\n    }return n.m = e, n.c = t, n.d = function (e, t, i) {\n      n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: i });\n    }, n.r = function (e) {\n      \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(e, \"__esModule\", { value: !0 });\n    }, n.t = function (e, t) {\n      if (1 & t && (e = n(e)), 8 & t) return e;if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;var i = Object.create(null);if (n.r(i), Object.defineProperty(i, \"default\", { enumerable: !0, value: e }), 2 & t && \"string\" != typeof e) for (var a in e) n.d(i, a, function (t) {\n        return e[t];\n      }.bind(null, a));return i;\n    }, n.n = function (e) {\n      var t = e && e.__esModule ? function () {\n        return e.default;\n      } : function () {\n        return e;\n      };return n.d(t, \"a\", t), t;\n    }, n.o = function (e, t) {\n      return Object.prototype.hasOwnProperty.call(e, t);\n    }, n.p = \"/\", n(n.s = 53);\n  }([function (e, t, n) {\n    \"use strict\";\n    function i(e) {\n      return (i = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n        return typeof e;\n      } : function (e) {\n        return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n      })(e);\n    }var a = n(5),\n        o = n(37),\n        r = Object.prototype.toString;function s(e) {\n      return \"[object Array]\" === r.call(e);\n    }function l(e) {\n      return null !== e && \"object\" === i(e);\n    }function c(e) {\n      return \"[object Function]\" === r.call(e);\n    }function u(e, t) {\n      if (null != e) if (\"object\" !== i(e) && (e = [e]), s(e)) for (var n = 0, a = e.length; n < a; n++) t.call(null, e[n], n, e);else for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.call(null, e[o], o, e);\n    }e.exports = { isArray: s, isArrayBuffer: function (e) {\n        return \"[object ArrayBuffer]\" === r.call(e);\n      }, isBuffer: o, isFormData: function (e) {\n        return \"undefined\" != typeof FormData && e instanceof FormData;\n      }, isArrayBufferView: function (e) {\n        return \"undefined\" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && e.buffer instanceof ArrayBuffer;\n      }, isString: function (e) {\n        return \"string\" == typeof e;\n      }, isNumber: function (e) {\n        return \"number\" == typeof e;\n      }, isObject: l, isUndefined: function (e) {\n        return void 0 === e;\n      }, isDate: function (e) {\n        return \"[object Date]\" === r.call(e);\n      }, isFile: function (e) {\n        return \"[object File]\" === r.call(e);\n      }, isBlob: function (e) {\n        return \"[object Blob]\" === r.call(e);\n      }, isFunction: c, isStream: function (e) {\n        return l(e) && c(e.pipe);\n      }, isURLSearchParams: function (e) {\n        return \"undefined\" != typeof URLSearchParams && e instanceof URLSearchParams;\n      }, isStandardBrowserEnv: function () {\n        return (\"undefined\" == typeof navigator || \"ReactNative\" !== navigator.product && \"NativeScript\" !== navigator.product && \"NS\" !== navigator.product) && \"undefined\" != typeof window && \"undefined\" != typeof document;\n      }, forEach: u, merge: function e() {\n        var t = {};function n(n, a) {\n          \"object\" === i(t[a]) && \"object\" === i(n) ? t[a] = e(t[a], n) : t[a] = n;\n        }for (var a = 0, o = arguments.length; a < o; a++) u(arguments[a], n);return t;\n      }, deepMerge: function e() {\n        var t = {};function n(n, a) {\n          \"object\" === i(t[a]) && \"object\" === i(n) ? t[a] = e(t[a], n) : \"object\" === i(n) ? t[a] = e({}, n) : t[a] = n;\n        }for (var a = 0, o = arguments.length; a < o; a++) u(arguments[a], n);return t;\n      }, extend: function (e, t, n) {\n        return u(t, function (t, i) {\n          e[i] = n && \"function\" == typeof t ? a(t, n) : t;\n        }), e;\n      }, trim: function (e) {\n        return e.replace(/^\\s*/, \"\").replace(/\\s*$/, \"\");\n      } };\n  }, function (e, t, n) {\n    e.exports = n(36);\n  }, function (e, t) {\n    function n(e) {\n      return (n = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n        return typeof e;\n      } : function (e) {\n        return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n      })(e);\n    }var i;i = function () {\n      return this;\n    }();try {\n      i = i || new Function(\"return this\")();\n    } catch (e) {\n      \"object\" === (\"undefined\" == typeof window ? \"undefined\" : n(window)) && (i = window);\n    }e.exports = i;\n  }, function (e, t, n) {\n    var i = n(13);e.exports = function (e) {\n      \"use strict\";\n      var t = \"\",\n          n = (e = e || {}).enableSubtitle,\n          a = e.subtitle,\n          o = e.current,\n          r = e.pic,\n          s = i.$escape,\n          l = e.screenshot,\n          c = e.preload,\n          u = e.url;n = a && \"webvtt\" === a.type;return t += '\\n<video\\n    class=\"dplayer-video ', o && (t += \"dplayer-video-current\"), t += '\"\\n    webkit-playsinline\\n    playsinline\\n    ', r && (t += 'poster=\"', t += s(r), t += '\"'), t += \"\\n    \", (l || n) && (t += 'crossorigin=\"anonymous\"'), t += \"\\n    \", c && (t += 'preload=\"', t += s(c), t += '\"'), t += \"\\n    \", u && (t += 'src=\"', t += s(u), t += '\"'), t += \"\\n    >\\n    \", n && (t += '\\n    <track kind=\"metadata\" default src=\"', t += s(a.url), t += '\"></track>\\n    '), t += \"\\n</video>\";\n    };\n  }, function (e, t) {\n    var n,\n        i,\n        a = e.exports = {};function o() {\n      throw new Error(\"setTimeout has not been defined\");\n    }function r() {\n      throw new Error(\"clearTimeout has not been defined\");\n    }function s(e) {\n      if (n === setTimeout) return setTimeout(e, 0);if ((n === o || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);try {\n        return n(e, 0);\n      } catch (t) {\n        try {\n          return n.call(null, e, 0);\n        } catch (t) {\n          return n.call(this, e, 0);\n        }\n      }\n    }!function () {\n      try {\n        n = \"function\" == typeof setTimeout ? setTimeout : o;\n      } catch (e) {\n        n = o;\n      }try {\n        i = \"function\" == typeof clearTimeout ? clearTimeout : r;\n      } catch (e) {\n        i = r;\n      }\n    }();var l,\n        c = [],\n        u = !1,\n        d = -1;function p() {\n      u && l && (u = !1, l.length ? c = l.concat(c) : d = -1, c.length && h());\n    }function h() {\n      if (!u) {\n        var e = s(p);u = !0;for (var t = c.length; t;) {\n          for (l = c, c = []; ++d < t;) l && l[d].run();d = -1, t = c.length;\n        }l = null, u = !1, function (e) {\n          if (i === clearTimeout) return clearTimeout(e);if ((i === r || !i) && clearTimeout) return i = clearTimeout, clearTimeout(e);try {\n            i(e);\n          } catch (t) {\n            try {\n              return i.call(null, e);\n            } catch (t) {\n              return i.call(this, e);\n            }\n          }\n        }(e);\n      }\n    }function m(e, t) {\n      this.fun = e, this.array = t;\n    }function y() {}a.nextTick = function (e) {\n      var t = new Array(arguments.length - 1);if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];c.push(new m(e, t)), 1 !== c.length || u || s(h);\n    }, m.prototype.run = function () {\n      this.fun.apply(null, this.array);\n    }, a.title = \"browser\", a.browser = !0, a.env = {}, a.argv = [], a.version = \"\", a.versions = {}, a.on = y, a.addListener = y, a.once = y, a.off = y, a.removeListener = y, a.removeAllListeners = y, a.emit = y, a.prependListener = y, a.prependOnceListener = y, a.listeners = function (e) {\n      return [];\n    }, a.binding = function (e) {\n      throw new Error(\"process.binding is not supported\");\n    }, a.cwd = function () {\n      return \"/\";\n    }, a.chdir = function (e) {\n      throw new Error(\"process.chdir is not supported\");\n    }, a.umask = function () {\n      return 0;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = function (e, t) {\n      return function () {\n        for (var n = new Array(arguments.length), i = 0; i < n.length; i++) n[i] = arguments[i];return e.apply(t, n);\n      };\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);function a(e) {\n      return encodeURIComponent(e).replace(/%40/gi, \"@\").replace(/%3A/gi, \":\").replace(/%24/g, \"$\").replace(/%2C/gi, \",\").replace(/%20/g, \"+\").replace(/%5B/gi, \"[\").replace(/%5D/gi, \"]\");\n    }e.exports = function (e, t, n) {\n      if (!t) return e;var o;if (n) o = n(t);else if (i.isURLSearchParams(t)) o = t.toString();else {\n        var r = [];i.forEach(t, function (e, t) {\n          null != e && (i.isArray(e) ? t += \"[]\" : e = [e], i.forEach(e, function (e) {\n            i.isDate(e) ? e = e.toISOString() : i.isObject(e) && (e = JSON.stringify(e)), r.push(a(t) + \"=\" + a(e));\n          }));\n        }), o = r.join(\"&\");\n      }if (o) {\n        var s = e.indexOf(\"#\");-1 !== s && (e = e.slice(0, s)), e += (-1 === e.indexOf(\"?\") ? \"?\" : \"&\") + o;\n      }return e;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = function (e) {\n      return !(!e || !e.__CANCEL__);\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    (function (t) {\n      var i = n(0),\n          a = n(42),\n          o = { \"Content-Type\": \"application/x-www-form-urlencoded\" };function r(e, t) {\n        !i.isUndefined(e) && i.isUndefined(e[\"Content-Type\"]) && (e[\"Content-Type\"] = t);\n      }var s,\n          l = { adapter: (void 0 !== t && \"[object process]\" === Object.prototype.toString.call(t) ? s = n(9) : \"undefined\" != typeof XMLHttpRequest && (s = n(9)), s), transformRequest: [function (e, t) {\n          return a(t, \"Accept\"), a(t, \"Content-Type\"), i.isFormData(e) || i.isArrayBuffer(e) || i.isBuffer(e) || i.isStream(e) || i.isFile(e) || i.isBlob(e) ? e : i.isArrayBufferView(e) ? e.buffer : i.isURLSearchParams(e) ? (r(t, \"application/x-www-form-urlencoded;charset=utf-8\"), e.toString()) : i.isObject(e) ? (r(t, \"application/json;charset=utf-8\"), JSON.stringify(e)) : e;\n        }], transformResponse: [function (e) {\n          if (\"string\" == typeof e) try {\n            e = JSON.parse(e);\n          } catch (e) {}return e;\n        }], timeout: 0, xsrfCookieName: \"XSRF-TOKEN\", xsrfHeaderName: \"X-XSRF-TOKEN\", maxContentLength: -1, validateStatus: function (e) {\n          return e >= 200 && e < 300;\n        } };l.headers = { common: { Accept: \"application/json, text/plain, */*\" } }, i.forEach([\"delete\", \"get\", \"head\"], function (e) {\n        l.headers[e] = {};\n      }), i.forEach([\"post\", \"put\", \"patch\"], function (e) {\n        l.headers[e] = i.merge(o);\n      }), e.exports = l;\n    }).call(this, n(4));\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0),\n        a = n(43),\n        o = n(6),\n        r = n(45),\n        s = n(46),\n        l = n(10);e.exports = function (e) {\n      return new Promise(function (t, c) {\n        var u = e.data,\n            d = e.headers;i.isFormData(u) && delete d[\"Content-Type\"];var p = new XMLHttpRequest();if (e.auth) {\n          var h = e.auth.username || \"\",\n              m = e.auth.password || \"\";d.Authorization = \"Basic \" + btoa(h + \":\" + m);\n        }if (p.open(e.method.toUpperCase(), o(e.url, e.params, e.paramsSerializer), !0), p.timeout = e.timeout, p.onreadystatechange = function () {\n          if (p && 4 === p.readyState && (0 !== p.status || p.responseURL && 0 === p.responseURL.indexOf(\"file:\"))) {\n            var n = \"getAllResponseHeaders\" in p ? r(p.getAllResponseHeaders()) : null,\n                i = { data: e.responseType && \"text\" !== e.responseType ? p.response : p.responseText, status: p.status, statusText: p.statusText, headers: n, config: e, request: p };a(t, c, i), p = null;\n          }\n        }, p.onabort = function () {\n          p && (c(l(\"Request aborted\", e, \"ECONNABORTED\", p)), p = null);\n        }, p.onerror = function () {\n          c(l(\"Network Error\", e, null, p)), p = null;\n        }, p.ontimeout = function () {\n          c(l(\"timeout of \" + e.timeout + \"ms exceeded\", e, \"ECONNABORTED\", p)), p = null;\n        }, i.isStandardBrowserEnv()) {\n          var y = n(47),\n              f = (e.withCredentials || s(e.url)) && e.xsrfCookieName ? y.read(e.xsrfCookieName) : void 0;f && (d[e.xsrfHeaderName] = f);\n        }if (\"setRequestHeader\" in p && i.forEach(d, function (e, t) {\n          void 0 === u && \"content-type\" === t.toLowerCase() ? delete d[t] : p.setRequestHeader(t, e);\n        }), e.withCredentials && (p.withCredentials = !0), e.responseType) try {\n          p.responseType = e.responseType;\n        } catch (t) {\n          if (\"json\" !== e.responseType) throw t;\n        }\"function\" == typeof e.onDownloadProgress && p.addEventListener(\"progress\", e.onDownloadProgress), \"function\" == typeof e.onUploadProgress && p.upload && p.upload.addEventListener(\"progress\", e.onUploadProgress), e.cancelToken && e.cancelToken.promise.then(function (e) {\n          p && (p.abort(), c(e), p = null);\n        }), void 0 === u && (u = null), p.send(u);\n      });\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(44);e.exports = function (e, t, n, a, o) {\n      var r = new Error(e);return i(r, t, n, a, o);\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);e.exports = function (e, t) {\n      t = t || {};var n = {};return i.forEach([\"url\", \"method\", \"params\", \"data\"], function (e) {\n        void 0 !== t[e] && (n[e] = t[e]);\n      }), i.forEach([\"headers\", \"auth\", \"proxy\"], function (a) {\n        i.isObject(t[a]) ? n[a] = i.deepMerge(e[a], t[a]) : void 0 !== t[a] ? n[a] = t[a] : i.isObject(e[a]) ? n[a] = i.deepMerge(e[a]) : void 0 !== e[a] && (n[a] = e[a]);\n      }), i.forEach([\"baseURL\", \"transformRequest\", \"transformResponse\", \"paramsSerializer\", \"timeout\", \"withCredentials\", \"adapter\", \"responseType\", \"xsrfCookieName\", \"xsrfHeaderName\", \"onUploadProgress\", \"onDownloadProgress\", \"maxContentLength\", \"validateStatus\", \"maxRedirects\", \"httpAgent\", \"httpsAgent\", \"cancelToken\", \"socketPath\"], function (i) {\n        void 0 !== t[i] ? n[i] = t[i] : void 0 !== e[i] && (n[i] = e[i]);\n      }), n;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    function i(e) {\n      this.message = e;\n    }i.prototype.toString = function () {\n      return \"Cancel\" + (this.message ? \": \" + this.message : \"\");\n    }, i.prototype.__CANCEL__ = !0, e.exports = i;\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = n(52);\n  }, function (e, t, n) {\n    \"use strict\";\n    (function (e) {\n      var i = n(15);function a(e) {\n        return (a = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n          return typeof e;\n        } : function (e) {\n          return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n        })(e);\n      }var o = setTimeout;function r() {}function s(e) {\n        if (!(this instanceof s)) throw new TypeError(\"Promises must be constructed via new\");if (\"function\" != typeof e) throw new TypeError(\"not a function\");this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], h(e, this);\n      }function l(e, t) {\n        for (; 3 === e._state;) e = e._value;0 !== e._state ? (e._handled = !0, s._immediateFn(function () {\n          var n = 1 === e._state ? t.onFulfilled : t.onRejected;if (null !== n) {\n            var i;try {\n              i = n(e._value);\n            } catch (e) {\n              return void u(t.promise, e);\n            }c(t.promise, i);\n          } else (1 === e._state ? c : u)(t.promise, e._value);\n        })) : e._deferreds.push(t);\n      }function c(e, t) {\n        try {\n          if (t === e) throw new TypeError(\"A promise cannot be resolved with itself.\");if (t && (\"object\" === a(t) || \"function\" == typeof t)) {\n            var n = t.then;if (t instanceof s) return e._state = 3, e._value = t, void d(e);if (\"function\" == typeof n) return void h((i = n, o = t, function () {\n              i.apply(o, arguments);\n            }), e);\n          }e._state = 1, e._value = t, d(e);\n        } catch (t) {\n          u(e, t);\n        }var i, o;\n      }function u(e, t) {\n        e._state = 2, e._value = t, d(e);\n      }function d(e) {\n        2 === e._state && 0 === e._deferreds.length && s._immediateFn(function () {\n          e._handled || s._unhandledRejectionFn(e._value);\n        });for (var t = 0, n = e._deferreds.length; t < n; t++) l(e, e._deferreds[t]);e._deferreds = null;\n      }function p(e, t, n) {\n        this.onFulfilled = \"function\" == typeof e ? e : null, this.onRejected = \"function\" == typeof t ? t : null, this.promise = n;\n      }function h(e, t) {\n        var n = !1;try {\n          e(function (e) {\n            n || (n = !0, c(t, e));\n          }, function (e) {\n            n || (n = !0, u(t, e));\n          });\n        } catch (e) {\n          if (n) return;n = !0, u(t, e);\n        }\n      }s.prototype.catch = function (e) {\n        return this.then(null, e);\n      }, s.prototype.then = function (e, t) {\n        var n = new this.constructor(r);return l(this, new p(e, t, n)), n;\n      }, s.prototype.finally = i.a, s.all = function (e) {\n        return new s(function (t, n) {\n          if (!e || void 0 === e.length) throw new TypeError(\"Promise.all accepts an array\");var i = Array.prototype.slice.call(e);if (0 === i.length) return t([]);var o = i.length;function r(e, s) {\n            try {\n              if (s && (\"object\" === a(s) || \"function\" == typeof s)) {\n                var l = s.then;if (\"function\" == typeof l) return void l.call(s, function (t) {\n                  r(e, t);\n                }, n);\n              }i[e] = s, 0 == --o && t(i);\n            } catch (e) {\n              n(e);\n            }\n          }for (var s = 0; s < i.length; s++) r(s, i[s]);\n        });\n      }, s.resolve = function (e) {\n        return e && \"object\" === a(e) && e.constructor === s ? e : new s(function (t) {\n          t(e);\n        });\n      }, s.reject = function (e) {\n        return new s(function (t, n) {\n          n(e);\n        });\n      }, s.race = function (e) {\n        return new s(function (t, n) {\n          for (var i = 0, a = e.length; i < a; i++) e[i].then(t, n);\n        });\n      }, s._immediateFn = \"function\" == typeof e && function (t) {\n        e(t);\n      } || function (e) {\n        o(e, 0);\n      }, s._unhandledRejectionFn = function (e) {\n        \"undefined\" != typeof console && console && console.warn(\"Possible Unhandled Promise Rejection:\", e);\n      }, t.a = s;\n    }).call(this, n(34).setImmediate);\n  }, function (e, t, n) {\n    \"use strict\";\n    t.a = function (e) {\n      var t = this.constructor;return this.then(function (n) {\n        return t.resolve(e()).then(function () {\n          return n;\n        });\n      }, function (n) {\n        return t.resolve(e()).then(function () {\n          return t.reject(n);\n        });\n      });\n    };\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 16 32\"><path d=\"M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 17 32\"><path d=\"M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 21 32\"><path d=\"M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 21 32\"><path d=\"M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 21 32\"><path d=\"M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 33\"><path d=\"M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 33\"><path d=\"M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 28\"><path d=\"M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 32 32\"><path d=\"M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z\"></path></svg>';\n  }, function (e, t) {\n    e.exports = '<svg version=\"1.1\" viewBox=\"0 0 22 22\"><svg x=\"7\" y=\"1\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-0\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"11\" y=\"3\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-1\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"13\" y=\"7\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-2\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"11\" y=\"11\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-3\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"7\" y=\"13\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-4\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"3\" y=\"11\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-5\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"1\" y=\"7\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-6\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg><svg x=\"3\" y=\"3\"><circle class=\"diplayer-loading-dot diplayer-loading-dot-7\" cx=\"4\" cy=\"4\" r=\"2\"></circle></svg></svg>';\n  }, function (e, t, n) {\n    var i = n(13);e.exports = function (e) {\n      \"use strict\";\n      e = e || {};var t,\n          a = \"\",\n          o = (arguments[1], e.video),\n          r = e.options,\n          s = i.$escape,\n          l = e.tran,\n          c = e.icons,\n          u = e.index,\n          d = i.$each;e.$value, e.$index;return a += '<div class=\"dplayer-mask\"></div>\\n<div class=\"dplayer-video-wrap\">\\n    ', t = n(3)(o), a += t, a += \"\\n    \", r.logo && (a += '\\n    <div class=\"dplayer-logo\">\\n        <img src=\"', a += s(r.logo), a += '\">\\n    </div>\\n    '), a += '\\n    <div class=\"dplayer-danmaku\"', r.danmaku && r.danmaku.bottm && (a += ' style=\"margin-bottom:', a += s(r.danmaku.bottm), a += '\"'), a += '>\\n        <div class=\"dplayer-danmaku-item dplayer-danmaku-item--demo\"></div>\\n    </div>\\n    <div class=\"dplayer-subtitle\"></div>\\n    <div class=\"dplayer-bezel\">\\n        <span class=\"dplayer-bezel-icon\"></span>\\n        ', r.danmaku && (a += '\\n        <span class=\"dplayer-danloading\">', a += s(l(\"Danmaku is loading\")), a += \"</span>\\n        \"), a += '\\n        <span class=\"diplayer-loading-icon\">', a += c.loading, a += '</span>\\n    </div>\\n</div>\\n<div class=\"dplayer-controller-mask\"></div>\\n<div class=\"dplayer-controller\">\\n    <div class=\"dplayer-icons dplayer-comment-box\">\\n        <button class=\"dplayer-icon dplayer-comment-setting-icon\" data-balloon=\"', a += s(l(\"Setting\")), a += '\" data-balloon-pos=\"up\">\\n            <span class=\"dplayer-icon-content\">', a += c.pallette, a += '</span>\\n        </button>\\n        <div class=\"dplayer-comment-setting-box\">\\n            <div class=\"dplayer-comment-setting-color\">\\n                <div class=\"dplayer-comment-setting-title\">', a += s(l(\"Set danmaku color\")), a += '</div>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-color-', a += s(u), a += '\" value=\"#fff\" checked>\\n                    <span style=\"background: #fff;\"></span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-color-', a += s(u), a += '\" value=\"#e54256\">\\n                    <span style=\"background: #e54256\"></span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-color-', a += s(u), a += '\" value=\"#ffe133\">\\n                    <span style=\"background: #ffe133\"></span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-color-', a += s(u), a += '\" value=\"#64DD17\">\\n                    <span style=\"background: #64DD17\"></span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-color-', a += s(u), a += '\" value=\"#39ccff\">\\n                    <span style=\"background: #39ccff\"></span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-color-', a += s(u), a += '\" value=\"#D500F9\">\\n                    <span style=\"background: #D500F9\"></span>\\n                </label>\\n            </div>\\n            <div class=\"dplayer-comment-setting-type\">\\n                <div class=\"dplayer-comment-setting-title\">', a += s(l(\"Set danmaku type\")), a += '</div>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-type-', a += s(u), a += '\" value=\"1\">\\n                    <span>', a += s(l(\"Top\")), a += '</span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-type-', a += s(u), a += '\" value=\"0\" checked>\\n                    <span>', a += s(l(\"Rolling\")), a += '</span>\\n                </label>\\n                <label>\\n                    <input type=\"radio\" name=\"dplayer-danmaku-type-', a += s(u), a += '\" value=\"2\">\\n                    <span>', a += s(l(\"Bottom\")), a += '</span>\\n                </label>\\n            </div>\\n        </div>\\n        <input class=\"dplayer-comment-input\" type=\"text\" placeholder=\"', a += s(l(\"Input danmaku, hit Enter\")), a += '\" maxlength=\"30\">\\n        <button class=\"dplayer-icon dplayer-send-icon\" data-balloon=\"', a += s(l(\"Send\")), a += '\" data-balloon-pos=\"up\">\\n            <span class=\"dplayer-icon-content\">', a += c.send, a += '</span>\\n        </button>\\n    </div>\\n    <div class=\"dplayer-icons dplayer-icons-left\">\\n        <button class=\"dplayer-icon dplayer-play-icon\">\\n            <span class=\"dplayer-icon-content\">', a += c.play, a += '</span>\\n        </button>\\n        <div class=\"dplayer-volume\">\\n            <button class=\"dplayer-icon dplayer-volume-icon\">\\n                <span class=\"dplayer-icon-content\">', a += c.volumeDown, a += '</span>\\n            </button>\\n            <div class=\"dplayer-volume-bar-wrap\" data-balloon-pos=\"up\">\\n                <div class=\"dplayer-volume-bar\">\\n                    <div class=\"dplayer-volume-bar-inner\" style=\"background: ', a += s(r.theme), a += ';\">\\n                        <span class=\"dplayer-thumb\" style=\"background: ', a += s(r.theme), a += '\"></span>\\n                    </div>\\n                </div>\\n            </div>\\n        </div>\\n        <span class=\"dplayer-time\">\\n            <span class=\"dplayer-ptime\">0:00</span> /\\n            <span class=\"dplayer-dtime\">0:00</span>\\n        </span>\\n        ', r.live && (a += '\\n        <span class=\"dplayer-live-badge\"><span class=\"dplayer-live-dot\" style=\"background: ', a += s(r.theme), a += ';\"></span>', a += s(l(\"Live\")), a += \"</span>\\n        \"), a += '\\n    </div>\\n    <div class=\"dplayer-icons dplayer-icons-right\">\\n        ', r.video.quality && (a += '\\n        <div class=\"dplayer-quality\">\\n            <button class=\"dplayer-icon dplayer-quality-icon\">', a += s(r.video.quality[r.video.defaultQuality].name), a += '</button>\\n            <div class=\"dplayer-quality-mask\">\\n                <div class=\"dplayer-quality-list\">\\n                ', d(r.video.quality, function (e, t) {\n        a += '\\n                    <div class=\"dplayer-quality-item\" data-index=\"', a += s(t), a += '\">', a += s(e.name), a += \"</div>\\n                \";\n      }), a += \"\\n                </div>\\n            </div>\\n        </div>\\n        \"), a += \"\\n        \", r.screenshot && (a += '\\n        <div class=\"dplayer-icon dplayer-camera-icon\" data-balloon=\"', a += s(l(\"Screenshot\")), a += '\" data-balloon-pos=\"up\">\\n            <span class=\"dplayer-icon-content\">', a += c.camera, a += \"</span>\\n        </div>\\n        \"), a += '\\n        <div class=\"dplayer-comment\">\\n            <button class=\"dplayer-icon dplayer-comment-icon\" data-balloon=\"', a += s(l(\"Send danmaku\")), a += '\" data-balloon-pos=\"up\">\\n                <span class=\"dplayer-icon-content\">', a += c.comment, a += \"</span>\\n            </button>\\n        </div>\\n        \", r.subtitle && (a += '\\n        <div class=\"dplayer-subtitle-btn\">\\n            <button class=\"dplayer-icon dplayer-subtitle-icon\" data-balloon=\"', a += s(l(\"Hide subtitle\")), a += '\" data-balloon-pos=\"up\">\\n                <span class=\"dplayer-icon-content\">', a += c.subtitle, a += \"</span>\\n            </button>\\n        </div>\\n        \"), a += '\\n        <div class=\"dplayer-setting\">\\n            <button class=\"dplayer-icon dplayer-setting-icon\" data-balloon=\"', a += s(l(\"Setting\")), a += '\" data-balloon-pos=\"up\">\\n                <span class=\"dplayer-icon-content\">', a += c.setting, a += '</span>\\n            </button>\\n            <div class=\"dplayer-setting-box\">\\n                <div class=\"dplayer-setting-origin-panel\">\\n                    <div class=\"dplayer-setting-item dplayer-setting-speed\">\\n                        <span class=\"dplayer-label\">', a += s(l(\"Speed\")), a += '</span>\\n                        <div class=\"dplayer-toggle\">', a += c.right, a += '</div>\\n                    </div>\\n                    <div class=\"dplayer-setting-item dplayer-setting-loop\">\\n                        <span class=\"dplayer-label\">', a += s(l(\"Loop\")), a += '</span>\\n                        <div class=\"dplayer-toggle\">\\n                            <input class=\"dplayer-toggle-setting-input\" type=\"checkbox\" name=\"dplayer-toggle\">\\n                            <label for=\"dplayer-toggle\"></label>\\n                        </div>\\n                    </div>\\n                    <div class=\"dplayer-setting-item dplayer-setting-showdan\">\\n                        <span class=\"dplayer-label\">', a += s(l(\"Show danmaku\")), a += '</span>\\n                        <div class=\"dplayer-toggle\">\\n                            <input class=\"dplayer-showdan-setting-input\" type=\"checkbox\" name=\"dplayer-toggle-dan\">\\n                            <label for=\"dplayer-toggle-dan\"></label>\\n                        </div>\\n                    </div>\\n                    <div class=\"dplayer-setting-item dplayer-setting-danunlimit\">\\n                        <span class=\"dplayer-label\">', a += s(l(\"Unlimited danmaku\")), a += '</span>\\n                        <div class=\"dplayer-toggle\">\\n                            <input class=\"dplayer-danunlimit-setting-input\" type=\"checkbox\" name=\"dplayer-toggle-danunlimit\">\\n                            <label for=\"dplayer-toggle-danunlimit\"></label>\\n                        </div>\\n                    </div>\\n                    <div class=\"dplayer-setting-item dplayer-setting-danmaku\">\\n                        <span class=\"dplayer-label\">', a += s(l(\"Opacity for danmaku\")), a += '</span>\\n                        <div class=\"dplayer-danmaku-bar-wrap\">\\n                            <div class=\"dplayer-danmaku-bar\">\\n                                <div class=\"dplayer-danmaku-bar-inner\">\\n                                    <span class=\"dplayer-thumb\"></span>\\n                                </div>\\n                            </div>\\n                        </div>\\n                    </div>\\n                </div>\\n                <div class=\"dplayer-setting-speed-panel\">\\n                    <div class=\"dplayer-setting-speed-item\" data-speed=\"0.5\">\\n                        <span class=\"dplayer-label\">0.5</span>\\n                    </div>\\n                    <div class=\"dplayer-setting-speed-item\" data-speed=\"0.75\">\\n                        <span class=\"dplayer-label\">0.75</span>\\n                    </div>\\n                    <div class=\"dplayer-setting-speed-item\" data-speed=\"1\">\\n                        <span class=\"dplayer-label\">', a += s(l(\"Normal\")), a += '</span>\\n                    </div>\\n                    <div class=\"dplayer-setting-speed-item\" data-speed=\"1.25\">\\n                        <span class=\"dplayer-label\">1.25</span>\\n                    </div>\\n                    <div class=\"dplayer-setting-speed-item\" data-speed=\"1.5\">\\n                        <span class=\"dplayer-label\">1.5</span>\\n                    </div>\\n                    <div class=\"dplayer-setting-speed-item\" data-speed=\"2\">\\n                        <span class=\"dplayer-label\">2</span>\\n                    </div>\\n                </div>\\n            </div>\\n        </div>\\n        <div class=\"dplayer-full\">\\n            <button class=\"dplayer-icon dplayer-full-in-icon\" data-balloon=\"', a += s(l(\"Web full screen\")), a += '\" data-balloon-pos=\"up\">\\n                <span class=\"dplayer-icon-content\">', a += c.fullWeb, a += '</span>\\n            </button>\\n            <button class=\"dplayer-icon dplayer-full-icon\" data-balloon=\"', a += s(l(\"Full screen\")), a += '\" data-balloon-pos=\"up\">\\n                <span class=\"dplayer-icon-content\">', a += c.full, a += '</span>\\n            </button>\\n        </div>\\n    </div>\\n    <div class=\"dplayer-bar-wrap\">\\n        <div class=\"dplayer-bar-time hidden\">00:00</div>\\n        <div class=\"dplayer-bar-preview\"></div>\\n        <div class=\"dplayer-bar\">\\n            <div class=\"dplayer-loaded\" style=\"width: 0;\"></div>\\n            <div class=\"dplayer-played\" style=\"width: 0; background: ', a += s(r.theme), a += '\">\\n                <span class=\"dplayer-thumb\" style=\"background: ', a += s(r.theme), a += '\"></span>\\n            </div>\\n        </div>\\n    </div>\\n</div>\\n<div class=\"dplayer-info-panel dplayer-info-panel-hide\">\\n    <div class=\"dplayer-info-panel-close\">[x]</div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-version\">\\n        <span class=\"dplayer-info-panel-item-title\">Player version</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-fps\">\\n        <span class=\"dplayer-info-panel-item-title\">Player FPS</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-type\">\\n        <span class=\"dplayer-info-panel-item-title\">Video type</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-url\">\\n        <span class=\"dplayer-info-panel-item-title\">Video url</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-resolution\">\\n        <span class=\"dplayer-info-panel-item-title\">Video resolution</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-duration\">\\n        <span class=\"dplayer-info-panel-item-title\">Video duration</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    ', r.danmaku && (a += '\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-danmaku-id\">\\n        <span class=\"dplayer-info-panel-item-title\">Danamku id</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-danmaku-api\">\\n        <span class=\"dplayer-info-panel-item-title\">Danamku api</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    <div class=\"dplayer-info-panel-item dplayer-info-panel-item-danmaku-amount\">\\n        <span class=\"dplayer-info-panel-item-title\">Danamku amount</span>\\n        <span class=\"dplayer-info-panel-item-data\"></span>\\n    </div>\\n    '), a += '\\n</div>\\n<div class=\"dplayer-menu\">\\n    ', d(r.contextmenu, function (e, t) {\n        a += '\\n        <div class=\"dplayer-menu-item\">\\n            <a', e.link && (a += ' target=\"_blank\"'), a += ' href=\"', a += s(e.link || \"javascript:void(0);\"), a += '\">', a += s(l(e.text)), a += \"</a>\\n        </div>\\n    \";\n      }), a += '\\n</div>\\n<div class=\"dplayer-notice\"></div>';\n    };\n  }, function (e, t, n) {}, function (e, t, n) {\n    (function (e) {\n      var i = void 0 !== e && e || \"undefined\" != typeof self && self || window,\n          a = Function.prototype.apply;function o(e, t) {\n        this._id = e, this._clearFn = t;\n      }t.setTimeout = function () {\n        return new o(a.call(setTimeout, i, arguments), clearTimeout);\n      }, t.setInterval = function () {\n        return new o(a.call(setInterval, i, arguments), clearInterval);\n      }, t.clearTimeout = t.clearInterval = function (e) {\n        e && e.close();\n      }, o.prototype.unref = o.prototype.ref = function () {}, o.prototype.close = function () {\n        this._clearFn.call(i, this._id);\n      }, t.enroll = function (e, t) {\n        clearTimeout(e._idleTimeoutId), e._idleTimeout = t;\n      }, t.unenroll = function (e) {\n        clearTimeout(e._idleTimeoutId), e._idleTimeout = -1;\n      }, t._unrefActive = t.active = function (e) {\n        clearTimeout(e._idleTimeoutId);var t = e._idleTimeout;t >= 0 && (e._idleTimeoutId = setTimeout(function () {\n          e._onTimeout && e._onTimeout();\n        }, t));\n      }, n(35), t.setImmediate = \"undefined\" != typeof self && self.setImmediate || void 0 !== e && e.setImmediate || this && this.setImmediate, t.clearImmediate = \"undefined\" != typeof self && self.clearImmediate || void 0 !== e && e.clearImmediate || this && this.clearImmediate;\n    }).call(this, n(2));\n  }, function (e, t, n) {\n    (function (e, t) {\n      !function (e, n) {\n        \"use strict\";\n        if (!e.setImmediate) {\n          var i,\n              a,\n              o,\n              r,\n              s,\n              l = 1,\n              c = {},\n              u = !1,\n              d = e.document,\n              p = Object.getPrototypeOf && Object.getPrototypeOf(e);p = p && p.setTimeout ? p : e, \"[object process]\" === {}.toString.call(e.process) ? i = function (e) {\n            t.nextTick(function () {\n              m(e);\n            });\n          } : !function () {\n            if (e.postMessage && !e.importScripts) {\n              var t = !0,\n                  n = e.onmessage;return e.onmessage = function () {\n                t = !1;\n              }, e.postMessage(\"\", \"*\"), e.onmessage = n, t;\n            }\n          }() ? e.MessageChannel ? ((o = new MessageChannel()).port1.onmessage = function (e) {\n            m(e.data);\n          }, i = function (e) {\n            o.port2.postMessage(e);\n          }) : d && \"onreadystatechange\" in d.createElement(\"script\") ? (a = d.documentElement, i = function (e) {\n            var t = d.createElement(\"script\");t.onreadystatechange = function () {\n              m(e), t.onreadystatechange = null, a.removeChild(t), t = null;\n            }, a.appendChild(t);\n          }) : i = function (e) {\n            setTimeout(m, 0, e);\n          } : (r = \"setImmediate$\" + Math.random() + \"$\", s = function (t) {\n            t.source === e && \"string\" == typeof t.data && 0 === t.data.indexOf(r) && m(+t.data.slice(r.length));\n          }, e.addEventListener ? e.addEventListener(\"message\", s, !1) : e.attachEvent(\"onmessage\", s), i = function (t) {\n            e.postMessage(r + t, \"*\");\n          }), p.setImmediate = function (e) {\n            \"function\" != typeof e && (e = new Function(\"\" + e));for (var t = new Array(arguments.length - 1), n = 0; n < t.length; n++) t[n] = arguments[n + 1];var a = { callback: e, args: t };return c[l] = a, i(l), l++;\n          }, p.clearImmediate = h;\n        }function h(e) {\n          delete c[e];\n        }function m(e) {\n          if (u) setTimeout(m, 0, e);else {\n            var t = c[e];if (t) {\n              u = !0;try {\n                !function (e) {\n                  var t = e.callback,\n                      i = e.args;switch (i.length) {case 0:\n                      t();break;case 1:\n                      t(i[0]);break;case 2:\n                      t(i[0], i[1]);break;case 3:\n                      t(i[0], i[1], i[2]);break;default:\n                      t.apply(n, i);}\n                }(t);\n              } finally {\n                h(e), u = !1;\n              }\n            }\n          }\n        }\n      }(\"undefined\" == typeof self ? void 0 === e ? this : e : self);\n    }).call(this, n(2), n(4));\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0),\n        a = n(5),\n        o = n(38),\n        r = n(11);function s(e) {\n      var t = new o(e),\n          n = a(o.prototype.request, t);return i.extend(n, o.prototype, t), i.extend(n, t), n;\n    }var l = s(n(8));l.Axios = o, l.create = function (e) {\n      return s(r(l.defaults, e));\n    }, l.Cancel = n(12), l.CancelToken = n(50), l.isCancel = n(7), l.all = function (e) {\n      return Promise.all(e);\n    }, l.spread = n(51), e.exports = l, e.exports.default = l;\n  }, function (e, t) {\n    e.exports = function (e) {\n      return null != e && null != e.constructor && \"function\" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e);\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0),\n        a = n(6),\n        o = n(39),\n        r = n(40),\n        s = n(11);function l(e) {\n      this.defaults = e, this.interceptors = { request: new o(), response: new o() };\n    }l.prototype.request = function (e) {\n      \"string\" == typeof e ? (e = arguments[1] || {}).url = arguments[0] : e = e || {}, (e = s(this.defaults, e)).method = e.method ? e.method.toLowerCase() : \"get\";var t = [r, void 0],\n          n = Promise.resolve(e);for (this.interceptors.request.forEach(function (e) {\n        t.unshift(e.fulfilled, e.rejected);\n      }), this.interceptors.response.forEach(function (e) {\n        t.push(e.fulfilled, e.rejected);\n      }); t.length;) n = n.then(t.shift(), t.shift());return n;\n    }, l.prototype.getUri = function (e) {\n      return e = s(this.defaults, e), a(e.url, e.params, e.paramsSerializer).replace(/^\\?/, \"\");\n    }, i.forEach([\"delete\", \"get\", \"head\", \"options\"], function (e) {\n      l.prototype[e] = function (t, n) {\n        return this.request(i.merge(n || {}, { method: e, url: t }));\n      };\n    }), i.forEach([\"post\", \"put\", \"patch\"], function (e) {\n      l.prototype[e] = function (t, n, a) {\n        return this.request(i.merge(a || {}, { method: e, url: t, data: n }));\n      };\n    }), e.exports = l;\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);function a() {\n      this.handlers = [];\n    }a.prototype.use = function (e, t) {\n      return this.handlers.push({ fulfilled: e, rejected: t }), this.handlers.length - 1;\n    }, a.prototype.eject = function (e) {\n      this.handlers[e] && (this.handlers[e] = null);\n    }, a.prototype.forEach = function (e) {\n      i.forEach(this.handlers, function (t) {\n        null !== t && e(t);\n      });\n    }, e.exports = a;\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0),\n        a = n(41),\n        o = n(7),\n        r = n(8),\n        s = n(48),\n        l = n(49);function c(e) {\n      e.cancelToken && e.cancelToken.throwIfRequested();\n    }e.exports = function (e) {\n      return c(e), e.baseURL && !s(e.url) && (e.url = l(e.baseURL, e.url)), e.headers = e.headers || {}, e.data = a(e.data, e.headers, e.transformRequest), e.headers = i.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers || {}), i.forEach([\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\", \"common\"], function (t) {\n        delete e.headers[t];\n      }), (e.adapter || r.adapter)(e).then(function (t) {\n        return c(e), t.data = a(t.data, t.headers, e.transformResponse), t;\n      }, function (t) {\n        return o(t) || (c(e), t && t.response && (t.response.data = a(t.response.data, t.response.headers, e.transformResponse))), Promise.reject(t);\n      });\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);e.exports = function (e, t, n) {\n      return i.forEach(n, function (n) {\n        e = n(e, t);\n      }), e;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);e.exports = function (e, t) {\n      i.forEach(e, function (n, i) {\n        i !== t && i.toUpperCase() === t.toUpperCase() && (e[t] = n, delete e[i]);\n      });\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(10);e.exports = function (e, t, n) {\n      var a = n.config.validateStatus;!a || a(n.status) ? e(n) : t(i(\"Request failed with status code \" + n.status, n.config, null, n.request, n));\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = function (e, t, n, i, a) {\n      return e.config = t, n && (e.code = n), e.request = i, e.response = a, e.isAxiosError = !0, e.toJSON = function () {\n        return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: this.config, code: this.code };\n      }, e;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0),\n        a = [\"age\", \"authorization\", \"content-length\", \"content-type\", \"etag\", \"expires\", \"from\", \"host\", \"if-modified-since\", \"if-unmodified-since\", \"last-modified\", \"location\", \"max-forwards\", \"proxy-authorization\", \"referer\", \"retry-after\", \"user-agent\"];e.exports = function (e) {\n      var t,\n          n,\n          o,\n          r = {};return e ? (i.forEach(e.split(\"\\n\"), function (e) {\n        if (o = e.indexOf(\":\"), t = i.trim(e.substr(0, o)).toLowerCase(), n = i.trim(e.substr(o + 1)), t) {\n          if (r[t] && a.indexOf(t) >= 0) return;r[t] = \"set-cookie\" === t ? (r[t] ? r[t] : []).concat([n]) : r[t] ? r[t] + \", \" + n : n;\n        }\n      }), r) : r;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);e.exports = i.isStandardBrowserEnv() ? function () {\n      var e,\n          t = /(msie|trident)/i.test(navigator.userAgent),\n          n = document.createElement(\"a\");function a(e) {\n        var i = e;return t && (n.setAttribute(\"href\", i), i = n.href), n.setAttribute(\"href\", i), { href: n.href, protocol: n.protocol ? n.protocol.replace(/:$/, \"\") : \"\", host: n.host, search: n.search ? n.search.replace(/^\\?/, \"\") : \"\", hash: n.hash ? n.hash.replace(/^#/, \"\") : \"\", hostname: n.hostname, port: n.port, pathname: \"/\" === n.pathname.charAt(0) ? n.pathname : \"/\" + n.pathname };\n      }return e = a(window.location.href), function (t) {\n        var n = i.isString(t) ? a(t) : t;return n.protocol === e.protocol && n.host === e.host;\n      };\n    }() : function () {\n      return !0;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(0);e.exports = i.isStandardBrowserEnv() ? { write: function (e, t, n, a, o, r) {\n        var s = [];s.push(e + \"=\" + encodeURIComponent(t)), i.isNumber(n) && s.push(\"expires=\" + new Date(n).toGMTString()), i.isString(a) && s.push(\"path=\" + a), i.isString(o) && s.push(\"domain=\" + o), !0 === r && s.push(\"secure\"), document.cookie = s.join(\"; \");\n      }, read: function (e) {\n        var t = document.cookie.match(new RegExp(\"(^|;\\\\s*)(\" + e + \")=([^;]*)\"));return t ? decodeURIComponent(t[3]) : null;\n      }, remove: function (e) {\n        this.write(e, \"\", Date.now() - 864e5);\n      } } : { write: function () {}, read: function () {\n        return null;\n      }, remove: function () {} };\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = function (e) {\n      return (/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(e)\n      );\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = function (e, t) {\n      return t ? e.replace(/\\/+$/, \"\") + \"/\" + t.replace(/^\\/+/, \"\") : e;\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    var i = n(12);function a(e) {\n      if (\"function\" != typeof e) throw new TypeError(\"executor must be a function.\");var t;this.promise = new Promise(function (e) {\n        t = e;\n      });var n = this;e(function (e) {\n        n.reason || (n.reason = new i(e), t(n.reason));\n      });\n    }a.prototype.throwIfRequested = function () {\n      if (this.reason) throw this.reason;\n    }, a.source = function () {\n      var e;return { token: new a(function (t) {\n          e = t;\n        }), cancel: e };\n    }, e.exports = a;\n  }, function (e, t, n) {\n    \"use strict\";\n    e.exports = function (e) {\n      return function (t) {\n        return e.apply(null, t);\n      };\n    };\n  }, function (e, t, n) {\n    \"use strict\";\n    (function (t) {\n      var n = \"undefined\" != typeof self ? self : \"undefined\" != typeof window ? window : void 0 !== t ? t : {},\n          i = Object.create(n),\n          a = /[\"&'<>]/;i.$escape = function (e) {\n        return function (e) {\n          var t = \"\" + e,\n              n = a.exec(t);if (!n) return e;var i = \"\",\n              o = void 0,\n              r = void 0,\n              s = void 0;for (o = n.index, r = 0; o < t.length; o++) {\n            switch (t.charCodeAt(o)) {case 34:\n                s = \"&#34;\";break;case 38:\n                s = \"&#38;\";break;case 39:\n                s = \"&#39;\";break;case 60:\n                s = \"&#60;\";break;case 62:\n                s = \"&#62;\";break;default:\n                continue;}r !== o && (i += t.substring(r, o)), r = o + 1, i += s;\n          }return r !== o ? i + t.substring(r, o) : i;\n        }(function e(t) {\n          \"string\" != typeof t && (t = null == t ? \"\" : \"function\" == typeof t ? e(t.call(t)) : JSON.stringify(t));return t;\n        }(e));\n      }, i.$each = function (e, t) {\n        if (Array.isArray(e)) for (var n = 0, i = e.length; n < i; n++) t(e[n], n);else for (var a in e) t(e[a], a);\n      }, e.exports = i;\n    }).call(this, n(2));\n  }, function (e, t, n) {\n    \"use strict\";\n    n.r(t);n(33);var i = n(14),\n        a = /mobile/i.test(window.navigator.userAgent),\n        o = { secondToTime: function (e) {\n        var t = Math.floor(e / 3600),\n            n = Math.floor((e - 3600 * t) / 60),\n            i = Math.floor(e - 3600 * t - 60 * n);return (t > 0 ? [t, n, i] : [n, i]).map(function (e) {\n          return e < 10 ? \"0\" + e : \"\" + e;\n        }).join(\":\");\n      }, getElementViewLeft: function (e) {\n        var t = e.offsetLeft,\n            n = e.offsetParent,\n            i = document.body.scrollLeft + document.documentElement.scrollLeft;if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) for (; null !== n && n !== e;) t += n.offsetLeft, n = n.offsetParent;else for (; null !== n;) t += n.offsetLeft, n = n.offsetParent;return t - i;\n      }, getBoundingClientRectViewLeft: function (e) {\n        var t = window.scrollY || window.pageYOffset || document.body.scrollTop + (document.documentElement && document.documentElement.scrollTop || 0);if (e.getBoundingClientRect) {\n          if (\"number\" != typeof this.getBoundingClientRectViewLeft.offset) {\n            var n = document.createElement(\"div\");n.style.cssText = \"position:absolute;top:0;left:0;\", document.body.appendChild(n), this.getBoundingClientRectViewLeft.offset = -n.getBoundingClientRect().top - t, document.body.removeChild(n), n = null;\n          }var i = e.getBoundingClientRect(),\n              a = this.getBoundingClientRectViewLeft.offset;return i.left + a;\n        }return this.getElementViewLeft(e);\n      }, getScrollPosition: function () {\n        return { left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0, top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 };\n      }, setScrollPosition: function (e) {\n        var t = e.left,\n            n = void 0 === t ? 0 : t,\n            i = e.top,\n            a = void 0 === i ? 0 : i;this.isFirefox ? (document.documentElement.scrollLeft = n, document.documentElement.scrollTop = a) : window.scrollTo(n, a);\n      }, isMobile: a, isFirefox: /firefox/i.test(window.navigator.userAgent), isChrome: /chrome/i.test(window.navigator.userAgent), storage: { set: function (e, t) {\n          localStorage.setItem(e, t);\n        }, get: function (e) {\n          return localStorage.getItem(e);\n        } }, cumulativeOffset: function (e) {\n        var t = 0,\n            n = 0;do {\n          t += e.offsetTop || 0, n += e.offsetLeft || 0, e = e.offsetParent;\n        } while (e);return { top: t, left: n };\n      }, nameMap: { dragStart: a ? \"touchstart\" : \"mousedown\", dragMove: a ? \"touchmove\" : \"mousemove\", dragEnd: a ? \"touchend\" : \"mouseup\" }, color2Number: function (e) {\n        return \"#\" === e[0] && (e = e.substr(1)), 3 === e.length && (e = \"\".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2])), parseInt(e, 16) + 0 & 16777215;\n      }, number2Color: function (e) {\n        return \"#\" + (\"00000\" + e.toString(16)).slice(-6);\n      }, number2Type: function (e) {\n        switch (e) {case 0:\n            return \"right\";case 1:\n            return \"top\";case 2:\n            return \"bottom\";default:\n            return \"right\";}\n      } },\n        r = n(1),\n        s = n.n(r),\n        l = { send: function (e) {\n        s.a.post(e.url, e.data).then(function (t) {\n          var n = t.data;n && 0 === n.code ? e.success && e.success(n) : e.error && e.error(n && n.msg);\n        }).catch(function (t) {\n          console.error(t), e.error && e.error();\n        });\n      }, read: function (e) {\n        s.a.get(e.url).then(function (t) {\n          var n = t.data;n && 0 === n.code ? e.success && e.success(n.data.map(function (e) {\n            return { time: e[0], type: e[1], color: e[2], author: e[3], text: e[4] };\n          })) : e.error && e.error(n && n.msg);\n        }).catch(function (t) {\n          console.error(t), e.error && e.error();\n        });\n      } };function c(e) {\n      return (c = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n        return typeof e;\n      } : function (e) {\n        return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n      })(e);\n    }var u = function (e) {\n      var t = { container: e.element || document.getElementsByClassName(\"dplayer\")[0], live: !1, autoplay: !1, theme: \"#b7daff\", loop: !1, lang: (navigator.language || navigator.browserLanguage).toLowerCase(), screenshot: !1, hotkey: !0, preload: \"metadata\", volume: .7, apiBackend: l, video: {}, contextmenu: [], mutex: !0 };for (var n in t) t.hasOwnProperty(n) && !e.hasOwnProperty(n) && (e[n] = t[n]);return e.video && !e.video.type && (e.video.type = \"auto\"), \"object\" === c(e.danmaku) && e.danmaku && !e.danmaku.user && (e.danmaku.user = \"DIYgod\"), e.subtitle && (!e.subtitle.type && (e.subtitle.type = \"webvtt\"), !e.subtitle.fontSize && (e.subtitle.fontSize = \"20px\"), !e.subtitle.bottom && (e.subtitle.bottom = \"40px\"), !e.subtitle.color && (e.subtitle.color = \"#fff\")), e.video.quality && (e.video.url = e.video.quality[e.video.defaultQuality].url), e.lang && (e.lang = e.lang.toLowerCase()), e.contextmenu = e.contextmenu.concat([{ text: \"Video info\", click: function (e) {\n          e.infoPanel.triggle();\n        } }]), e;\n    };var d = { \"zh-cn\": { \"Danmaku is loading\": \"弹幕加载中\", Top: \"顶部\", Bottom: \"底部\", Rolling: \"滚动\", \"Input danmaku, hit Enter\": \"输入弹幕，回车发送\", \"About author\": \"关于作者\", \"DPlayer feedback\": \"播放器意见反馈\", \"About DPlayer\": \"关于 DPlayer 播放器\", Loop: \"洗脑循环\", Speed: \"速度\", \"Opacity for danmaku\": \"弹幕透明度\", Normal: \"正常\", \"Please input danmaku content!\": \"要输入弹幕内容啊喂！\", \"Set danmaku color\": \"设置弹幕颜色\", \"Set danmaku type\": \"设置弹幕类型\", \"Show danmaku\": \"显示弹幕\", \"Video load failed\": \"视频加载失败\", \"Danmaku load failed\": \"弹幕加载失败\", \"Danmaku send failed\": \"弹幕发送失败\", \"Switching to\": \"正在切换至\", \"Switched to\": \"已经切换至\", quality: \"画质\", FF: \"快进\", REW: \"快退\", \"Unlimited danmaku\": \"海量弹幕\", \"Send danmaku\": \"发送弹幕\", Setting: \"设置\", \"Full screen\": \"全屏\", \"Web full screen\": \"页面全屏\", Send: \"发送\", Screenshot: \"截图\", s: \"秒\", \"Show subtitle\": \"显示字幕\", \"Hide subtitle\": \"隐藏字幕\", Volume: \"音量\", Live: \"直播\", \"Video info\": \"视频统计信息\" }, \"zh-tw\": { \"Danmaku is loading\": \"彈幕載入中\", Top: \"頂部\", Bottom: \"底部\", Rolling: \"滾動\", \"Input danmaku, hit Enter\": \"輸入彈幕，Enter 發送\", \"About author\": \"關於作者\", \"DPlayer feedback\": \"播放器意見回饋\", \"About DPlayer\": \"關於 DPlayer 播放器\", Loop: \"循環播放\", Speed: \"速度\", \"Opacity for danmaku\": \"彈幕透明度\", Normal: \"正常\", \"Please input danmaku content!\": \"請輸入彈幕內容啊！\", \"Set danmaku color\": \"設定彈幕顏色\", \"Set danmaku type\": \"設定彈幕類型\", \"Show danmaku\": \"顯示彈幕\", \"Video load failed\": \"影片載入失敗\", \"Danmaku load failed\": \"彈幕載入失敗\", \"Danmaku send failed\": \"彈幕發送失敗\", \"Switching to\": \"正在切換至\", \"Switched to\": \"已經切換至\", quality: \"畫質\", FF: \"快進\", REW: \"快退\", \"Unlimited danmaku\": \"巨量彈幕\", \"Send danmaku\": \"發送彈幕\", Setting: \"設定\", \"Full screen\": \"全螢幕\", \"Web full screen\": \"頁面全螢幕\", Send: \"發送\", Screenshot: \"截圖\", s: \"秒\", \"Show subtitle\": \"顯示字幕\", \"Hide subtitle\": \"隱藏字幕\", Volume: \"音量\", Live: \"直播\", \"Video info\": \"影片統計訊息\" } },\n        p = function (e) {\n      var t = this;this.lang = e, this.tran = function (e) {\n        return d[t.lang] && d[t.lang][e] ? d[t.lang][e] : e;\n      };\n    },\n        h = n(16),\n        m = n.n(h),\n        y = n(17),\n        f = n.n(y),\n        v = n(18),\n        g = n.n(v),\n        b = n(19),\n        w = n.n(b),\n        k = n(20),\n        x = n.n(k),\n        S = n(21),\n        T = n.n(S),\n        L = n(22),\n        E = n.n(L),\n        q = n(23),\n        B = n.n(q),\n        M = n(24),\n        C = n.n(M),\n        _ = n(25),\n        F = n.n(_),\n        P = n(26),\n        z = n.n(P),\n        j = n(27),\n        I = n.n(j),\n        D = n(28),\n        O = n.n(D),\n        R = n(29),\n        A = n.n(R),\n        W = n(30),\n        H = n.n(W),\n        N = n(31),\n        V = n.n(N),\n        U = { play: m.a, pause: f.a, volumeUp: g.a, volumeDown: w.a, volumeOff: x.a, full: T.a, fullWeb: E.a, setting: B.a, right: C.a, comment: F.a, commentOff: z.a, send: I.a, pallette: O.a, camera: A.a, subtitle: H.a, loading: V.a },\n        X = n(32),\n        $ = n.n(X);function Q(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var J = function () {\n      function e(t) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.container = t.container, this.options = t.options, this.index = t.index, this.tran = t.tran, this.init();\n      }var t, n, i;return t = e, (n = [{ key: \"init\", value: function () {\n          this.container.innerHTML = $()({ options: this.options, index: this.index, tran: this.tran, icons: U, video: { current: !0, pic: this.options.video.pic, screenshot: this.options.screenshot, preload: this.options.preload, url: this.options.video.url, subtitle: this.options.subtitle } }), this.volumeBar = this.container.querySelector(\".dplayer-volume-bar-inner\"), this.volumeBarWrap = this.container.querySelector(\".dplayer-volume-bar\"), this.volumeBarWrapWrap = this.container.querySelector(\".dplayer-volume-bar-wrap\"), this.volumeButton = this.container.querySelector(\".dplayer-volume\"), this.volumeButtonIcon = this.container.querySelector(\".dplayer-volume-icon\"), this.volumeIcon = this.container.querySelector(\".dplayer-volume-icon .dplayer-icon-content\"), this.playedBar = this.container.querySelector(\".dplayer-played\"), this.loadedBar = this.container.querySelector(\".dplayer-loaded\"), this.playedBarWrap = this.container.querySelector(\".dplayer-bar-wrap\"), this.playedBarTime = this.container.querySelector(\".dplayer-bar-time\"), this.danmaku = this.container.querySelector(\".dplayer-danmaku\"), this.danmakuLoading = this.container.querySelector(\".dplayer-danloading\"), this.video = this.container.querySelector(\".dplayer-video-current\"), this.bezel = this.container.querySelector(\".dplayer-bezel-icon\"), this.playButton = this.container.querySelector(\".dplayer-play-icon\"), this.videoWrap = this.container.querySelector(\".dplayer-video-wrap\"), this.controllerMask = this.container.querySelector(\".dplayer-controller-mask\"), this.ptime = this.container.querySelector(\".dplayer-ptime\"), this.settingButton = this.container.querySelector(\".dplayer-setting-icon\"), this.settingBox = this.container.querySelector(\".dplayer-setting-box\"), this.mask = this.container.querySelector(\".dplayer-mask\"), this.loop = this.container.querySelector(\".dplayer-setting-loop\"), this.loopToggle = this.container.querySelector(\".dplayer-setting-loop .dplayer-toggle-setting-input\"), this.showDanmaku = this.container.querySelector(\".dplayer-setting-showdan\"), this.showDanmakuToggle = this.container.querySelector(\".dplayer-showdan-setting-input\"), this.unlimitDanmaku = this.container.querySelector(\".dplayer-setting-danunlimit\"), this.unlimitDanmakuToggle = this.container.querySelector(\".dplayer-danunlimit-setting-input\"), this.speed = this.container.querySelector(\".dplayer-setting-speed\"), this.speedItem = this.container.querySelectorAll(\".dplayer-setting-speed-item\"), this.danmakuOpacityBar = this.container.querySelector(\".dplayer-danmaku-bar-inner\"), this.danmakuOpacityBarWrap = this.container.querySelector(\".dplayer-danmaku-bar\"), this.danmakuOpacityBarWrapWrap = this.container.querySelector(\".dplayer-danmaku-bar-wrap\"), this.danmakuOpacityBox = this.container.querySelector(\".dplayer-setting-danmaku\"), this.dtime = this.container.querySelector(\".dplayer-dtime\"), this.controller = this.container.querySelector(\".dplayer-controller\"), this.commentInput = this.container.querySelector(\".dplayer-comment-input\"), this.commentButton = this.container.querySelector(\".dplayer-comment-icon\"), this.commentSettingBox = this.container.querySelector(\".dplayer-comment-setting-box\"), this.commentSettingButton = this.container.querySelector(\".dplayer-comment-setting-icon\"), this.commentSettingFill = this.container.querySelector(\".dplayer-comment-setting-icon path\"), this.commentSendButton = this.container.querySelector(\".dplayer-send-icon\"), this.commentSendFill = this.container.querySelector(\".dplayer-send-icon path\"), this.commentColorSettingBox = this.container.querySelector(\".dplayer-comment-setting-color\"), this.browserFullButton = this.container.querySelector(\".dplayer-full-icon\"), this.webFullButton = this.container.querySelector(\".dplayer-full-in-icon\"), this.menu = this.container.querySelector(\".dplayer-menu\"), this.menuItem = this.container.querySelectorAll(\".dplayer-menu-item\"), this.qualityList = this.container.querySelector(\".dplayer-quality-list\"), this.camareButton = this.container.querySelector(\".dplayer-camera-icon\"), this.subtitleButton = this.container.querySelector(\".dplayer-subtitle-icon\"), this.subtitleButtonInner = this.container.querySelector(\".dplayer-subtitle-icon .dplayer-icon-content\"), this.subtitle = this.container.querySelector(\".dplayer-subtitle\"), this.qualityButton = this.container.querySelector(\".dplayer-quality-icon\"), this.barPreview = this.container.querySelector(\".dplayer-bar-preview\"), this.barWrap = this.container.querySelector(\".dplayer-bar-wrap\"), this.notice = this.container.querySelector(\".dplayer-notice\"), this.infoPanel = this.container.querySelector(\".dplayer-info-panel\"), this.infoPanelClose = this.container.querySelector(\".dplayer-info-panel-close\"), this.infoVersion = this.container.querySelector(\".dplayer-info-panel-item-version .dplayer-info-panel-item-data\"), this.infoFPS = this.container.querySelector(\".dplayer-info-panel-item-fps .dplayer-info-panel-item-data\"), this.infoType = this.container.querySelector(\".dplayer-info-panel-item-type .dplayer-info-panel-item-data\"), this.infoUrl = this.container.querySelector(\".dplayer-info-panel-item-url .dplayer-info-panel-item-data\"), this.infoResolution = this.container.querySelector(\".dplayer-info-panel-item-resolution .dplayer-info-panel-item-data\"), this.infoDuration = this.container.querySelector(\".dplayer-info-panel-item-duration .dplayer-info-panel-item-data\"), this.infoDanmakuId = this.container.querySelector(\".dplayer-info-panel-item-danmaku-id .dplayer-info-panel-item-data\"), this.infoDanmakuApi = this.container.querySelector(\".dplayer-info-panel-item-danmaku-api .dplayer-info-panel-item-data\"), this.infoDanmakuAmount = this.container.querySelector(\".dplayer-info-panel-item-danmaku-amount .dplayer-info-panel-item-data\");\n        } }]) && Q(t.prototype, n), i && Q(t, i), e;\n    }();function Y(e) {\n      return (Y = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n        return typeof e;\n      } : function (e) {\n        return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n      })(e);\n    }function G(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var K = function () {\n      function e(t) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.options = t, this.container = this.options.container, this.danTunnel = { right: {}, top: {}, bottom: {} }, this.danIndex = 0, this.dan = [], this.showing = !0, this._opacity = this.options.opacity, this.events = this.options.events, this.unlimited = this.options.unlimited, this._measure(\"\"), this.load();\n      }var t, n, i;return t = e, (n = [{ key: \"load\", value: function () {\n          var e,\n              t = this;this.dan = [], this.clear(), this.events && this.events.trigger(\"danmaku_load_start\"), 0 === this.options.api.is ? e = \"https://www.bilibili.com/widget/getPageList?aid=\" + this.options.api.av : 1 === this.options.api.is && (e = \"https://www.bilibili.com/bangumi/play/\" + this.options.api.ep), s()({ method: \"GET\", url: e, timeout: 3e3 }).then(function (e) {\n            var n;if (0 === t.options.api.is) n = e.data[0].cid;else if (1 === t.options.api.is) {\n              var i = new RegExp('\"aid\":'.concat(t.options.api.av, ',\"cid\":[\\\\d]+'));n = e.data.match(i)[0].match(/[\\d]+/g)[1];\n            }return s()({ method: \"GET\", url: \"https://api.bilibili.com/x/v1/dm/list.so?oid=\" + n + \"&type=1\", responseType: \"document\", timeout: 3e3 }).then(function (e) {\n              var n = e.data;t.dan = Array.prototype.map.call(n.querySelectorAll(\"d\"), function (e) {\n                var t = e.attributes[0].nodeValue.split(\",\");return \"4\" === t[1] || \"5\" === t[1] ? t[1] = \"4\" === t[1] ? 1 : 2 : t[1] = 0, { time: Number(t[0]), type: t[1], color: Number(t[3]).toString(16), text: e.textContent };\n              }).sort(function (e, t) {\n                return e.time - t.time;\n              }), window.requestAnimationFrame(function () {\n                t.frame();\n              }), t.options.callback(), t.events && t.events.trigger(\"danmaku_load_end\");\n            }).catch(function (e) {\n              console.error(e), t.options.error(e || t.options.tran(\"Danmaku load failed\"));\n            });\n          });\n        } }, { key: \"reload\", value: function (e, t, n) {\n          this.options.api.av = e, this.options.api.is = t, this.options.api.ep = n, this.dan = [], this.clear(), this.load();\n        } }, { key: \"send\", value: function (e) {\n          var t = { time: this.options.time(), text: e.text, color: e.color, type: e.type };this.dan.splice(this.danIndex, 0, t), this.danIndex++;var n = { text: this.htmlEncode(t.text), color: t.color, type: t.type, border: \"2px solid \".concat(this.options.borderColor) };this.draw(n), this.events && this.events.trigger(\"danmaku_send\", t);\n        } }, { key: \"frame\", value: function () {\n          var e = this;if (this.dan.length && !this.paused && this.showing) {\n            for (var t = this.dan[this.danIndex], n = []; t && this.options.time() > parseFloat(t.time);) n.push(t), t = this.dan[++this.danIndex];this.draw(n);\n          }window.requestAnimationFrame(function () {\n            e.frame();\n          });\n        } }, { key: \"opacity\", value: function (e) {\n          if (void 0 !== e) {\n            for (var t = this.container.getElementsByClassName(\"dplayer-danmaku-item\"), n = 0; n < t.length; n++) t[n].style.opacity = e;this._opacity = e, this.events && this.events.trigger(\"danmaku_opacity\", this._opacity);\n          }return this._opacity;\n        } }, { key: \"draw\", value: function (e) {\n          var t = this;if (this.showing) {\n            var n = this.options.height,\n                i = this.container.offsetWidth,\n                a = this.container.offsetHeight,\n                r = parseInt(a / n),\n                s = function (e) {\n              var n = e.offsetWidth || parseInt(e.style.width),\n                  i = e.getBoundingClientRect().right || t.container.getBoundingClientRect().right + n;return t.container.getBoundingClientRect().right - i;\n            },\n                l = function (e) {\n              return (i + e) / 5;\n            },\n                c = function (e, n, a) {\n              for (var o = i / l(a), c = function (a) {\n                var c = t.danTunnel[n][a + \"\"];if (!c || !c.length) return t.danTunnel[n][a + \"\"] = [e], e.addEventListener(\"animationend\", function () {\n                  t.danTunnel[n][a + \"\"].splice(0, 1);\n                }), { v: a % r };if (\"right\" !== n) return \"continue\";for (var u = 0; u < c.length; u++) {\n                  var d = s(c[u]) - 10;if (d <= i - o * l(parseInt(c[u].style.width)) || d <= 0) break;if (u === c.length - 1) return t.danTunnel[n][a + \"\"].push(e), e.addEventListener(\"animationend\", function () {\n                    t.danTunnel[n][a + \"\"].splice(0, 1);\n                  }), { v: a % r };\n                }\n              }, u = 0; t.unlimited || u < r; u++) {\n                var d = c(u);switch (d) {case \"continue\":\n                    continue;default:\n                    if (\"object\" === Y(d)) return d.v;}\n              }return -1;\n            };\"[object Array]\" !== Object.prototype.toString.call(e) && (e = [e]);for (var u = document.createDocumentFragment(), d = function (a) {\n              e[a].type = o.number2Type(e[a].type), e[a].color || (e[a].color = 16777215);var r = document.createElement(\"div\");r.classList.add(\"dplayer-danmaku-item\"), r.classList.add(\"dplayer-danmaku-\".concat(e[a].type)), e[a].border ? r.innerHTML = '<span style=\"border:'.concat(e[a].border, '\">').concat(e[a].text, \"</span>\") : r.innerHTML = e[a].text, r.style.opacity = t._opacity, r.style.color = o.number2Color(e[a].color), r.addEventListener(\"animationend\", function () {\n                t.container.removeChild(r);\n              });var s = t._measure(e[a].text),\n                  l = void 0;switch (e[a].type) {case \"right\":\n                  (l = c(r, e[a].type, s)) >= 0 && (r.style.width = s + 1 + \"px\", r.style.top = n * l + \"px\", r.style.transform = \"translateX(-\".concat(i, \"px)\"));break;case \"top\":\n                  (l = c(r, e[a].type)) >= 0 && (r.style.top = n * l + \"px\");break;case \"bottom\":\n                  (l = c(r, e[a].type)) >= 0 && (r.style.bottom = n * l + \"px\");break;default:\n                  console.error(\"Can't handled danmaku type: \".concat(e[a].type));}l >= 0 && (r.classList.add(\"dplayer-danmaku-move\"), u.appendChild(r));\n            }, p = 0; p < e.length; p++) d(p);return this.container.appendChild(u), u;\n          }\n        } }, { key: \"play\", value: function () {\n          this.paused = !1;\n        } }, { key: \"pause\", value: function () {\n          this.paused = !0;\n        } }, { key: \"_measure\", value: function (e) {\n          if (!this.context) {\n            var t = getComputedStyle(this.container.getElementsByClassName(\"dplayer-danmaku-item\")[0], null);this.context = document.createElement(\"canvas\").getContext(\"2d\"), this.context.font = t.getPropertyValue(\"font\");\n          }return this.context.measureText(e).width;\n        } }, { key: \"seek\", value: function () {\n          this.clear();for (var e = 0; e < this.dan.length; e++) {\n            if (this.dan[e].time >= this.options.time()) {\n              this.danIndex = e;break;\n            }this.danIndex = this.dan.length;\n          }\n        } }, { key: \"clear\", value: function () {\n          this.danTunnel = { right: {}, top: {}, bottom: {} }, this.danIndex = 0, this.options.container.innerHTML = \"\", this.events && this.events.trigger(\"danmaku_clear\");\n        } }, { key: \"htmlEncode\", value: function (e) {\n          return e.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\").replace(/'/g, \"&#x27;\").replace(/\\//g, \"&#x2f;\");\n        } }, { key: \"resize\", value: function () {\n          for (var e = this.container.offsetWidth, t = this.container.getElementsByClassName(\"dplayer-danmaku-item\"), n = 0; n < t.length; n++) t[n].style.transform = \"translateX(-\".concat(e, \"px)\");\n        } }, { key: \"hide\", value: function () {\n          this.showing = !1, this.pause(), this.clear(), this.events && this.events.trigger(\"danmaku_hide\");\n        } }, { key: \"show\", value: function () {\n          this.seek(), this.showing = !0, this.play(), this.events && this.events.trigger(\"danmaku_show\");\n        } }, { key: \"unlimit\", value: function (e) {\n          this.unlimited = e;\n        } }]) && G(t.prototype, n), i && G(t, i), e;\n    }();function Z(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var ee = function () {\n      function e() {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.events = {}, this.videoEvents = [\"abort\", \"canplay\", \"canplaythrough\", \"durationchange\", \"emptied\", \"ended\", \"error\", \"loadeddata\", \"loadedmetadata\", \"loadstart\", \"mozaudioavailable\", \"pause\", \"play\", \"playing\", \"progress\", \"ratechange\", \"seeked\", \"seeking\", \"stalled\", \"suspend\", \"timeupdate\", \"volumechange\", \"waiting\"], this.playerEvents = [\"screenshot\", \"thumbnails_show\", \"thumbnails_hide\", \"danmaku_show\", \"danmaku_hide\", \"danmaku_clear\", \"danmaku_loaded\", \"danmaku_send\", \"danmaku_opacity\", \"contextmenu_show\", \"contextmenu_hide\", \"notice_show\", \"notice_hide\", \"quality_start\", \"quality_end\", \"destroy\", \"resize\", \"fullscreen\", \"fullscreen_cancel\", \"webfullscreen\", \"webfullscreen_cancel\", \"subtitle_show\", \"subtitle_hide\", \"subtitle_change\"];\n      }var t, n, i;return t = e, (n = [{ key: \"on\", value: function (e, t) {\n          this.type(e) && \"function\" == typeof t && (this.events[e] || (this.events[e] = []), this.events[e].push(t));\n        } }, { key: \"trigger\", value: function (e, t) {\n          if (this.events[e] && this.events[e].length) for (var n = 0; n < this.events[e].length; n++) this.events[e][n](t);\n        } }, { key: \"type\", value: function (e) {\n          return -1 !== this.playerEvents.indexOf(e) ? \"player\" : -1 !== this.videoEvents.indexOf(e) ? \"video\" : (console.error(\"Unknown event name: \".concat(e)), null);\n        } }]) && Z(t.prototype, n), i && Z(t, i), e;\n    }();function te(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var ne = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.player = t, this.player.events.on(\"webfullscreen\", function () {\n          n.player.resize();\n        }), this.player.events.on(\"webfullscreen_cancel\", function () {\n          n.player.resize(), o.setScrollPosition(n.lastScrollPosition);\n        });var i = function () {\n          n.player.resize(), n.isFullScreen(\"browser\") ? n.player.events.trigger(\"fullscreen\") : (o.setScrollPosition(n.lastScrollPosition), n.player.events.trigger(\"fullscreen_cancel\"));\n        },\n            a = function () {\n          var e = document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;e && e !== n.player.container || (n.player.resize(), e ? n.player.events.trigger(\"fullscreen\") : (o.setScrollPosition(n.lastScrollPosition), n.player.events.trigger(\"fullscreen_cancel\")));\n        };/Firefox/.test(navigator.userAgent) ? (document.addEventListener(\"mozfullscreenchange\", a), document.addEventListener(\"fullscreenchange\", a)) : (this.player.container.addEventListener(\"fullscreenchange\", i), this.player.container.addEventListener(\"webkitfullscreenchange\", i), document.addEventListener(\"msfullscreenchange\", a), document.addEventListener(\"MSFullscreenChange\", a));\n      }var t, n, i;return t = e, (n = [{ key: \"isFullScreen\", value: function () {\n          switch (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : \"browser\") {case \"browser\":\n              return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement;case \"web\":\n              return this.player.container.classList.contains(\"dplayer-fulled\");}\n        } }, { key: \"request\", value: function () {\n          var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : \"browser\",\n              t = \"browser\" === e ? \"web\" : \"browser\",\n              n = this.isFullScreen(t);switch (n || (this.lastScrollPosition = o.getScrollPosition()), e) {case \"browser\":\n              this.player.container.requestFullscreen ? this.player.container.requestFullscreen() : this.player.container.mozRequestFullScreen ? this.player.container.mozRequestFullScreen() : this.player.container.webkitRequestFullscreen ? this.player.container.webkitRequestFullscreen() : this.player.video.webkitEnterFullscreen ? this.player.video.webkitEnterFullscreen() : this.player.video.webkitEnterFullScreen ? this.player.video.webkitEnterFullScreen() : this.player.container.msRequestFullscreen && this.player.container.msRequestFullscreen();break;case \"web\":\n              this.player.container.classList.add(\"dplayer-fulled\"), document.body.classList.add(\"dplayer-web-fullscreen-fix\"), this.player.events.trigger(\"webfullscreen\");}n && this.cancel(t);\n        } }, { key: \"cancel\", value: function () {\n          switch (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : \"browser\") {case \"browser\":\n              document.cancelFullScreen ? document.cancelFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.webkitCancelFullscreen ? document.webkitCancelFullscreen() : document.msCancelFullScreen ? document.msCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen();break;case \"web\":\n              this.player.container.classList.remove(\"dplayer-fulled\"), document.body.classList.remove(\"dplayer-web-fullscreen-fix\"), this.player.events.trigger(\"webfullscreen_cancel\");}\n        } }, { key: \"toggle\", value: function () {\n          var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : \"browser\";this.isFullScreen(e) ? this.cancel(e) : this.request(e);\n        } }]) && te(t.prototype, n), i && te(t, i), e;\n    }();function ie(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var ae = function () {\n      function e(t) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.storageName = { opacity: \"dplayer-danmaku-opacity\", volume: \"dplayer-volume\", unlimited: \"dplayer-danmaku-unlimited\", danmaku: \"dplayer-danmaku-show\", subtitle: \"dplayer-subtitle-show\" }, this.default = { opacity: .7, volume: t.options.hasOwnProperty(\"volume\") ? t.options.volume : .7, unlimited: (t.options.danmaku && t.options.danmaku.unlimited ? 1 : 0) || 0, danmaku: 1, subtitle: 1 }, this.data = {}, this.init();\n      }var t, n, i;return t = e, (n = [{ key: \"init\", value: function () {\n          for (var e in this.storageName) {\n            var t = this.storageName[e];this.data[e] = parseFloat(o.storage.get(t) || this.default[e]);\n          }\n        } }, { key: \"get\", value: function (e) {\n          return this.data[e];\n        } }, { key: \"set\", value: function (e, t) {\n          this.data[e] = t, o.storage.set(this.storageName[e], t);\n        } }]) && ie(t.prototype, n), i && ie(t, i), e;\n    }();function oe(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var re = function () {\n      function e(t, n, i, a) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.container = t, this.video = n, this.options = i, this.events = a, this.init();\n      }var t, n, i;return t = e, (n = [{ key: \"init\", value: function () {\n          var e = this;if (this.container.style.fontSize = this.options.fontSize, this.container.style.bottom = this.options.bottom, this.container.style.color = this.options.color, this.video.textTracks && this.video.textTracks[0]) {\n            var t = this.video.textTracks[0];t.oncuechange = function () {\n              var n = t.activeCues[0];if (e.container.innerHTML = \"\", n) {\n                var i = document.createElement(\"div\");i.appendChild(n.getCueAsHTML());var a = i.innerHTML.split(/\\r?\\n/).map(function (e) {\n                  return \"<p>\".concat(e, \"</p>\");\n                }).join(\"\");e.container.innerHTML = a;\n              }e.events.trigger(\"subtitle_change\");\n            };\n          }\n        } }, { key: \"show\", value: function () {\n          this.container.classList.remove(\"dplayer-subtitle-hide\"), this.events.trigger(\"subtitle_show\");\n        } }, { key: \"hide\", value: function () {\n          this.container.classList.add(\"dplayer-subtitle-hide\"), this.events.trigger(\"subtitle_hide\");\n        } }, { key: \"toggle\", value: function () {\n          this.container.classList.contains(\"dplayer-subtitle-hide\") ? this.show() : this.hide();\n        } }]) && oe(t.prototype, n), i && oe(t, i), e;\n    }();function se(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var le = function () {\n      function e(t) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.elements = {}, this.elements.volume = t.volumeBar, this.elements.played = t.playedBar, this.elements.loaded = t.loadedBar, this.elements.danmaku = t.danmakuOpacityBar;\n      }var t, n, i;return t = e, (n = [{ key: \"set\", value: function (e, t, n) {\n          t = Math.max(t, 0), t = Math.min(t, 1), this.elements[e].style[n] = 100 * t + \"%\";\n        } }, { key: \"get\", value: function (e) {\n          return parseFloat(this.elements[e].style.width) / 100;\n        } }]) && se(t.prototype, n), i && se(t, i), e;\n    }();function ce(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var ue = function () {\n      function e(t) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.player = t, window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) {\n          window.setTimeout(e, 1e3 / 60);\n        }, this.types = [\"loading\", \"info\", \"fps\"], this.init();\n      }var t, n, i;return t = e, (n = [{ key: \"init\", value: function () {\n          var e = this;this.types.map(function (t) {\n            return \"fps\" !== t && e[\"init\".concat(t, \"Checker\")](), t;\n          });\n        } }, { key: \"initloadingChecker\", value: function () {\n          var e = this,\n              t = 0,\n              n = 0,\n              i = !1;this.loadingChecker = setInterval(function () {\n            e.enableloadingChecker && (n = e.player.video.currentTime, i || n !== t || e.player.video.paused || (e.player.container.classList.add(\"dplayer-loading\"), i = !0), i && n > t && !e.player.video.paused && (e.player.container.classList.remove(\"dplayer-loading\"), i = !1), t = n);\n          }, 100);\n        } }, { key: \"initfpsChecker\", value: function () {\n          var e = this;window.requestAnimationFrame(function () {\n            if (e.enablefpsChecker) {\n              if (e.initfpsChecker(), e.fpsStart) {\n                e.fpsIndex++;var t = new Date();t - e.fpsStart > 1e3 && (e.player.infoPanel.fps(e.fpsIndex / (t - e.fpsStart) * 1e3), e.fpsStart = new Date(), e.fpsIndex = 0);\n              } else e.fpsStart = new Date(), e.fpsIndex = 0;\n            } else e.fpsStart = 0, e.fpsIndex = 0;\n          });\n        } }, { key: \"initinfoChecker\", value: function () {\n          var e = this;this.infoChecker = setInterval(function () {\n            e.enableinfoChecker && e.player.infoPanel.update();\n          }, 1e3);\n        } }, { key: \"enable\", value: function (e) {\n          this[\"enable\".concat(e, \"Checker\")] = !0, \"fps\" === e && this.initfpsChecker();\n        } }, { key: \"disable\", value: function (e) {\n          this[\"enable\".concat(e, \"Checker\")] = !1;\n        } }, { key: \"destroy\", value: function () {\n          var e = this;this.types.map(function (t) {\n            return e[\"enable\".concat(t, \"Checker\")] = !1, e[\"\".concat(t, \"Checker\")] && clearInterval(e[\"\".concat(t, \"Checker\")]), t;\n          });\n        } }]) && ce(t.prototype, n), i && ce(t, i), e;\n    }();function de(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var pe = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.container = t, this.container.addEventListener(\"animationend\", function () {\n          n.container.classList.remove(\"dplayer-bezel-transition\");\n        });\n      }var t, n, i;return t = e, (n = [{ key: \"switch\", value: function (e) {\n          this.container.innerHTML = e, this.container.classList.add(\"dplayer-bezel-transition\");\n        } }]) && de(t.prototype, n), i && de(t, i), e;\n    }();function he(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var me = function () {\n      function e(t) {\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.container = t.container, this.barWidth = t.barWidth, this.container.style.backgroundImage = \"url('\".concat(t.url, \"')\"), this.events = t.events;\n      }var t, n, i;return t = e, (n = [{ key: \"resize\", value: function (e, t, n) {\n          this.container.style.width = \"\".concat(e, \"px\"), this.container.style.height = \"\".concat(t, \"px\"), this.container.style.top = \"\".concat(2 - t, \"px\"), this.barWidth = n;\n        } }, { key: \"show\", value: function () {\n          this.container.style.display = \"block\", this.events && this.events.trigger(\"thumbnails_show\");\n        } }, { key: \"move\", value: function (e) {\n          this.container.style.backgroundPosition = \"-\".concat(160 * (Math.ceil(e / this.barWidth * 100) - 1), \"px 0\"), this.container.style.left = \"\".concat(Math.min(Math.max(e - this.container.offsetWidth / 2, -10), this.barWidth - 150), \"px\");\n        } }, { key: \"hide\", value: function () {\n          this.container.style.display = \"none\", this.events && this.events.trigger(\"thumbnails_hide\");\n        } }]) && he(t.prototype, n), i && he(t, i), e;\n    }();function ye(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var fe = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.player = t, this.autoHideTimer = 0, o.isMobile || (this.player.container.addEventListener(\"mousemove\", function () {\n          n.setAutoHide();\n        }), this.player.container.addEventListener(\"click\", function () {\n          n.setAutoHide();\n        }), this.player.on(\"play\", function () {\n          n.setAutoHide();\n        }), this.player.on(\"pause\", function () {\n          n.setAutoHide();\n        })), this.initPlayButton(), this.initThumbnails(), this.initPlayedBar(), this.initFullButton(), this.initQualityButton(), this.initScreenshotButton(), this.initSubtitleButton(), this.initHighlights(), o.isMobile || this.initVolumeButton();\n      }var t, n, i;return t = e, (n = [{ key: \"initPlayButton\", value: function () {\n          var e = this;this.player.template.playButton.addEventListener(\"click\", function () {\n            e.player.toggle();\n          }), o.isMobile ? (this.player.template.videoWrap.addEventListener(\"click\", function () {\n            e.toggle();\n          }), this.player.template.controllerMask.addEventListener(\"click\", function () {\n            e.toggle();\n          })) : (this.player.template.videoWrap.addEventListener(\"click\", function () {\n            e.player.toggle();\n          }), this.player.template.controllerMask.addEventListener(\"click\", function () {\n            e.player.toggle();\n          }));\n        } }, { key: \"initHighlights\", value: function () {\n          var e = this;this.player.on(\"durationchange\", function () {\n            if (1 !== e.player.video.duration && e.player.video.duration !== 1 / 0 && e.player.options.highlight) {\n              var t = document.querySelectorAll(\".dplayer-highlight\");[].slice.call(t, 0).forEach(function (t) {\n                e.player.template.playedBarWrap.removeChild(t);\n              });for (var n = 0; n < e.player.options.highlight.length; n++) if (e.player.options.highlight[n].text && e.player.options.highlight[n].time) {\n                var i = document.createElement(\"div\");i.classList.add(\"dplayer-highlight\"), i.style.left = e.player.options.highlight[n].time / e.player.video.duration * 100 + \"%\", i.innerHTML = '<span class=\"dplayer-highlight-text\">' + e.player.options.highlight[n].text + \"</span>\", e.player.template.playedBarWrap.insertBefore(i, e.player.template.playedBarTime);\n              }\n            }\n          });\n        } }, { key: \"initThumbnails\", value: function () {\n          var e = this;this.player.options.video.thumbnails && (this.thumbnails = new me({ container: this.player.template.barPreview, barWidth: this.player.template.barWrap.offsetWidth, url: this.player.options.video.thumbnails, events: this.player.events }), this.player.on(\"loadedmetadata\", function () {\n            e.thumbnails.resize(160, e.player.video.videoHeight / e.player.video.videoWidth * 160, e.player.template.barWrap.offsetWidth);\n          }));\n        } }, { key: \"initPlayedBar\", value: function () {\n          var e = this,\n              t = function (t) {\n            var n = ((t.clientX || t.changedTouches[0].clientX) - o.getBoundingClientRectViewLeft(e.player.template.playedBarWrap)) / e.player.template.playedBarWrap.clientWidth;n = Math.max(n, 0), n = Math.min(n, 1), e.player.bar.set(\"played\", n, \"width\"), e.player.template.ptime.innerHTML = o.secondToTime(n * e.player.video.duration);\n          },\n              n = function n(i) {\n            document.removeEventListener(o.nameMap.dragEnd, n), document.removeEventListener(o.nameMap.dragMove, t);var a = ((i.clientX || i.changedTouches[0].clientX) - o.getBoundingClientRectViewLeft(e.player.template.playedBarWrap)) / e.player.template.playedBarWrap.clientWidth;a = Math.max(a, 0), a = Math.min(a, 1), e.player.bar.set(\"played\", a, \"width\"), e.player.seek(e.player.bar.get(\"played\") * e.player.video.duration), e.player.timer.enable(\"progress\");\n          };this.player.template.playedBarWrap.addEventListener(o.nameMap.dragStart, function () {\n            e.player.timer.disable(\"progress\"), document.addEventListener(o.nameMap.dragMove, t), document.addEventListener(o.nameMap.dragEnd, n);\n          }), this.player.template.playedBarWrap.addEventListener(o.nameMap.dragMove, function (t) {\n            if (e.player.video.duration) {\n              var n = o.cumulativeOffset(e.player.template.playedBarWrap).left,\n                  i = (t.clientX || t.changedTouches[0].clientX) - n;if (i < 0 || i > e.player.template.playedBarWrap.offsetWidth) return;var a = e.player.video.duration * (i / e.player.template.playedBarWrap.offsetWidth);o.isMobile && e.thumbnails && e.thumbnails.show(), e.thumbnails && e.thumbnails.move(i), e.player.template.playedBarTime.style.left = \"\".concat(i - (a >= 3600 ? 25 : 20), \"px\"), e.player.template.playedBarTime.innerText = o.secondToTime(a), e.player.template.playedBarTime.classList.remove(\"hidden\");\n            }\n          }), this.player.template.playedBarWrap.addEventListener(o.nameMap.dragEnd, function () {\n            o.isMobile && e.thumbnails && e.thumbnails.hide();\n          }), o.isMobile || (this.player.template.playedBarWrap.addEventListener(\"mouseenter\", function () {\n            e.player.video.duration && (e.thumbnails && e.thumbnails.show(), e.player.template.playedBarTime.classList.remove(\"hidden\"));\n          }), this.player.template.playedBarWrap.addEventListener(\"mouseleave\", function () {\n            e.player.video.duration && (e.thumbnails && e.thumbnails.hide(), e.player.template.playedBarTime.classList.add(\"hidden\"));\n          }));\n        } }, { key: \"initFullButton\", value: function () {\n          var e = this;this.player.template.browserFullButton.addEventListener(\"click\", function () {\n            e.player.fullScreen.toggle(\"browser\");\n          }), this.player.template.webFullButton.addEventListener(\"click\", function () {\n            e.player.fullScreen.toggle(\"web\");\n          });\n        } }, { key: \"initVolumeButton\", value: function () {\n          var e = this,\n              t = function (t) {\n            var n = t || window.event,\n                i = ((n.clientX || n.changedTouches[0].clientX) - o.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap) - 5.5) / 35;e.player.volume(i);\n          },\n              n = function n() {\n            document.removeEventListener(o.nameMap.dragEnd, n), document.removeEventListener(o.nameMap.dragMove, t), e.player.template.volumeButton.classList.remove(\"dplayer-volume-active\");\n          };this.player.template.volumeBarWrapWrap.addEventListener(\"click\", function (t) {\n            var n = t || window.event,\n                i = ((n.clientX || n.changedTouches[0].clientX) - o.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap) - 5.5) / 35;e.player.volume(i);\n          }), this.player.template.volumeBarWrapWrap.addEventListener(o.nameMap.dragStart, function () {\n            document.addEventListener(o.nameMap.dragMove, t), document.addEventListener(o.nameMap.dragEnd, n), e.player.template.volumeButton.classList.add(\"dplayer-volume-active\");\n          }), this.player.template.volumeButtonIcon.addEventListener(\"click\", function () {\n            e.player.video.muted ? (e.player.video.muted = !1, e.player.switchVolumeIcon(), e.player.bar.set(\"volume\", e.player.volume(), \"width\")) : (e.player.video.muted = !0, e.player.template.volumeIcon.innerHTML = U.volumeOff, e.player.bar.set(\"volume\", 0, \"width\"));\n          });\n        } }, { key: \"initQualityButton\", value: function () {\n          var e = this;this.player.options.video.quality && this.player.template.qualityList.addEventListener(\"click\", function (t) {\n            t.target.classList.contains(\"dplayer-quality-item\") && e.player.switchQuality(t.target.dataset.index);\n          });\n        } }, { key: \"initScreenshotButton\", value: function () {\n          var e = this;this.player.options.screenshot && this.player.template.camareButton.addEventListener(\"click\", function () {\n            var t,\n                n = document.createElement(\"canvas\");n.width = e.player.video.videoWidth, n.height = e.player.video.videoHeight, n.getContext(\"2d\").drawImage(e.player.video, 0, 0, n.width, n.height), n.toBlob(function (e) {\n              t = URL.createObjectURL(e);var n = document.createElement(\"a\");n.href = t, n.download = \"DPlayer.png\", n.style.display = \"none\", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(t);\n            }), e.player.events.trigger(\"screenshot\", t);\n          });\n        } }, { key: \"initSubtitleButton\", value: function () {\n          var e = this;this.player.options.subtitle && (this.player.events.on(\"subtitle_show\", function () {\n            e.player.template.subtitleButton.dataset.balloon = e.player.tran(\"Hide subtitle\"), e.player.template.subtitleButtonInner.style.opacity = \"\", e.player.user.set(\"subtitle\", 1);\n          }), this.player.events.on(\"subtitle_hide\", function () {\n            e.player.template.subtitleButton.dataset.balloon = e.player.tran(\"Show subtitle\"), e.player.template.subtitleButtonInner.style.opacity = \"0.4\", e.player.user.set(\"subtitle\", 0);\n          }), this.player.template.subtitleButton.addEventListener(\"click\", function () {\n            e.player.subtitle.toggle();\n          }));\n        } }, { key: \"setAutoHide\", value: function () {\n          var e = this;this.show(), clearTimeout(this.autoHideTimer), this.autoHideTimer = setTimeout(function () {\n            !e.player.video.played.length || e.player.paused || e.disableAutoHide || e.hide();\n          }, 3e3);\n        } }, { key: \"show\", value: function () {\n          this.player.container.classList.remove(\"dplayer-hide-controller\");\n        } }, { key: \"hide\", value: function () {\n          this.player.container.classList.add(\"dplayer-hide-controller\"), this.player.setting.hide(), this.player.comment && this.player.comment.hide();\n        } }, { key: \"isShow\", value: function () {\n          return !this.player.container.classList.contains(\"dplayer-hide-controller\");\n        } }, { key: \"toggle\", value: function () {\n          this.isShow() ? this.hide() : this.show();\n        } }, { key: \"destroy\", value: function () {\n          clearTimeout(this.autoHideTimer);\n        } }]) && ye(t.prototype, n), i && ye(t, i), e;\n    }();function ve(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var ge = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.player = t, this.player.template.mask.addEventListener(\"click\", function () {\n          n.hide();\n        }), this.player.template.settingButton.addEventListener(\"click\", function () {\n          n.show();\n        }), this.loop = this.player.options.loop, this.player.template.loopToggle.checked = this.loop, this.player.template.loop.addEventListener(\"click\", function () {\n          n.player.template.loopToggle.checked = !n.player.template.loopToggle.checked, n.player.template.loopToggle.checked ? n.loop = !0 : n.loop = !1, n.hide();\n        }), this.showDanmaku = this.player.user.get(\"danmaku\"), this.showDanmaku || this.player.danmaku && this.player.danmaku.hide(), this.player.template.showDanmakuToggle.checked = this.showDanmaku, this.player.template.showDanmaku.addEventListener(\"click\", function () {\n          n.player.template.showDanmakuToggle.checked = !n.player.template.showDanmakuToggle.checked, n.player.template.showDanmakuToggle.checked ? (n.showDanmaku = !0, n.player.danmaku.show()) : (n.showDanmaku = !1, n.player.danmaku.hide()), n.player.user.set(\"danmaku\", n.showDanmaku ? 1 : 0), n.hide();\n        }), this.unlimitDanmaku = this.player.user.get(\"unlimited\"), this.player.template.unlimitDanmakuToggle.checked = this.unlimitDanmaku, this.player.template.unlimitDanmaku.addEventListener(\"click\", function () {\n          n.player.template.unlimitDanmakuToggle.checked = !n.player.template.unlimitDanmakuToggle.checked, n.player.template.unlimitDanmakuToggle.checked ? (n.unlimitDanmaku = !0, n.player.danmaku.unlimit(!0)) : (n.unlimitDanmaku = !1, n.player.danmaku.unlimit(!1)), n.player.user.set(\"unlimited\", n.unlimitDanmaku ? 1 : 0), n.hide();\n        }), this.player.template.speed.addEventListener(\"click\", function () {\n          n.player.template.settingBox.classList.add(\"dplayer-setting-box-narrow\"), n.player.template.settingBox.classList.add(\"dplayer-setting-box-speed\");\n        });for (var i = function (e) {\n          n.player.template.speedItem[e].addEventListener(\"click\", function () {\n            n.player.speed(n.player.template.speedItem[e].dataset.speed), n.hide();\n          });\n        }, a = 0; a < this.player.template.speedItem.length; a++) i(a);if (this.player.danmaku) {\n          this.player.on(\"danmaku_opacity\", function (e) {\n            n.player.bar.set(\"danmaku\", e, \"width\"), n.player.user.set(\"opacity\", e);\n          }), this.player.danmaku.opacity(this.player.user.get(\"opacity\"));var r = function (e) {\n            var t = e || window.event,\n                i = ((t.clientX || t.changedTouches[0].clientX) - o.getBoundingClientRectViewLeft(n.player.template.danmakuOpacityBarWrap)) / 130;i = Math.max(i, 0), i = Math.min(i, 1), n.player.danmaku.opacity(i);\n          },\n              s = function e() {\n            document.removeEventListener(o.nameMap.dragEnd, e), document.removeEventListener(o.nameMap.dragMove, r), n.player.template.danmakuOpacityBox.classList.remove(\"dplayer-setting-danmaku-active\");\n          };this.player.template.danmakuOpacityBarWrapWrap.addEventListener(\"click\", function (e) {\n            var t = e || window.event,\n                i = ((t.clientX || t.changedTouches[0].clientX) - o.getBoundingClientRectViewLeft(n.player.template.danmakuOpacityBarWrap)) / 130;i = Math.max(i, 0), i = Math.min(i, 1), n.player.danmaku.opacity(i);\n          }), this.player.template.danmakuOpacityBarWrapWrap.addEventListener(o.nameMap.dragStart, function () {\n            document.addEventListener(o.nameMap.dragMove, r), document.addEventListener(o.nameMap.dragEnd, s), n.player.template.danmakuOpacityBox.classList.add(\"dplayer-setting-danmaku-active\");\n          });\n        }\n      }var t, n, i;return t = e, (n = [{ key: \"hide\", value: function () {\n          var e = this;this.player.template.settingBox.classList.remove(\"dplayer-setting-box-open\"), this.player.template.mask.classList.remove(\"dplayer-mask-show\"), setTimeout(function () {\n            e.player.template.settingBox.classList.remove(\"dplayer-setting-box-narrow\"), e.player.template.settingBox.classList.remove(\"dplayer-setting-box-speed\");\n          }, 300), this.player.controller.disableAutoHide = !1;\n        } }, { key: \"show\", value: function () {\n          this.player.template.settingBox.classList.add(\"dplayer-setting-box-open\"), this.player.template.mask.classList.add(\"dplayer-mask-show\"), this.player.controller.disableAutoHide = !0;\n        } }]) && ve(t.prototype, n), i && ve(t, i), e;\n    }();function be(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var we = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.player = t, this.player.template.mask.addEventListener(\"click\", function () {\n          n.hide();\n        }), this.player.template.commentButton.addEventListener(\"click\", function () {\n          n.show();\n        }), this.player.template.commentSettingButton.addEventListener(\"click\", function () {\n          n.toggleSetting();\n        }), this.player.template.commentColorSettingBox.addEventListener(\"click\", function () {\n          if (n.player.template.commentColorSettingBox.querySelector(\"input:checked+span\")) {\n            var e = n.player.template.commentColorSettingBox.querySelector(\"input:checked\").value;n.player.template.commentSettingFill.style.fill = e, n.player.template.commentInput.style.color = e, n.player.template.commentSendFill.style.fill = e;\n          }\n        }), this.player.template.commentInput.addEventListener(\"click\", function () {\n          n.hideSetting();\n        }), this.player.template.commentInput.addEventListener(\"keydown\", function (e) {\n          13 === (e || window.event).keyCode && n.send();\n        }), this.player.template.commentSendButton.addEventListener(\"click\", function () {\n          n.send();\n        });\n      }var t, n, i;return t = e, (n = [{ key: \"show\", value: function () {\n          this.player.controller.disableAutoHide = !0, this.player.template.controller.classList.add(\"dplayer-controller-comment\"), this.player.template.mask.classList.add(\"dplayer-mask-show\"), this.player.container.classList.add(\"dplayer-show-controller\"), this.player.template.commentInput.focus();\n        } }, { key: \"hide\", value: function () {\n          this.player.template.controller.classList.remove(\"dplayer-controller-comment\"), this.player.template.mask.classList.remove(\"dplayer-mask-show\"), this.player.container.classList.remove(\"dplayer-show-controller\"), this.player.controller.disableAutoHide = !1, this.hideSetting();\n        } }, { key: \"showSetting\", value: function () {\n          this.player.template.commentSettingBox.classList.add(\"dplayer-comment-setting-open\");\n        } }, { key: \"hideSetting\", value: function () {\n          this.player.template.commentSettingBox.classList.remove(\"dplayer-comment-setting-open\");\n        } }, { key: \"toggleSetting\", value: function () {\n          this.player.template.commentSettingBox.classList.contains(\"dplayer-comment-setting-open\") ? this.hideSetting() : this.showSetting();\n        } }, { key: \"send\", value: function () {\n          var e = this;this.player.template.commentInput.blur(), this.player.template.commentInput.value.replace(/^\\s+|\\s+$/g, \"\") ? this.player.danmaku.send({ text: this.player.template.commentInput.value, color: o.color2Number(this.player.container.querySelector(\".dplayer-comment-setting-color input:checked\").value), type: parseInt(this.player.container.querySelector(\".dplayer-comment-setting-type input:checked\").value) }, function () {\n            e.player.template.commentInput.value = \"\", e.hide();\n          }) : this.player.notice(this.player.tran(\"Please input danmaku content!\"));\n        } }]) && be(t.prototype, n), i && be(t, i), e;\n    }();var ke = function e(t) {\n      !function (e, t) {\n        if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n      }(this, e), t.options.hotkey && document.addEventListener(\"keydown\", function (e) {\n        if (t.focus) {\n          var n = document.activeElement.tagName.toUpperCase(),\n              i = document.activeElement.getAttribute(\"contenteditable\");if (\"INPUT\" !== n && \"TEXTAREA\" !== n && \"\" !== i && \"true\" !== i) {\n            var a,\n                o = e || window.event;switch (o.keyCode) {case 32:\n                o.preventDefault(), t.toggle();break;case 37:\n                o.preventDefault(), t.seek(t.video.currentTime - 5), t.controller.setAutoHide();break;case 39:\n                o.preventDefault(), t.seek(t.video.currentTime + 5), t.controller.setAutoHide();break;case 38:\n                o.preventDefault(), a = t.volume() + .1, t.volume(a);break;case 40:\n                o.preventDefault(), a = t.volume() - .1, t.volume(a);}\n          }\n        }\n      }), document.addEventListener(\"keydown\", function (e) {\n        switch ((e || window.event).keyCode) {case 27:\n            t.fullScreen.isFullScreen(\"web\") && t.fullScreen.cancel(\"web\");}\n      });\n    };function xe(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var Se = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.player = t, this.shown = !1, Array.prototype.slice.call(this.player.template.menuItem).forEach(function (e, t) {\n          n.player.options.contextmenu[t].click && e.addEventListener(\"click\", function () {\n            n.player.options.contextmenu[t].click(n.player), n.hide();\n          });\n        }), this.player.container.addEventListener(\"contextmenu\", function (e) {\n          if (n.shown) n.hide();else {\n            var t = e || window.event;t.preventDefault();var i = n.player.container.getBoundingClientRect();n.show(t.clientX - i.left, t.clientY - i.top), n.player.template.mask.addEventListener(\"click\", function () {\n              n.hide();\n            });\n          }\n        });\n      }var t, n, i;return t = e, (n = [{ key: \"show\", value: function (e, t) {\n          this.player.template.menu.classList.add(\"dplayer-menu-show\");var n = this.player.container.getBoundingClientRect();e + this.player.template.menu.offsetWidth >= n.width ? (this.player.template.menu.style.right = n.width - e + \"px\", this.player.template.menu.style.left = \"initial\") : (this.player.template.menu.style.left = e + \"px\", this.player.template.menu.style.right = \"initial\"), t + this.player.template.menu.offsetHeight >= n.height ? (this.player.template.menu.style.bottom = n.height - t + \"px\", this.player.template.menu.style.top = \"initial\") : (this.player.template.menu.style.top = t + \"px\", this.player.template.menu.style.bottom = \"initial\"), this.player.template.mask.classList.add(\"dplayer-mask-show\"), this.shown = !0, this.player.events.trigger(\"contextmenu_show\");\n        } }, { key: \"hide\", value: function () {\n          this.player.template.mask.classList.remove(\"dplayer-mask-show\"), this.player.template.menu.classList.remove(\"dplayer-menu-show\"), this.shown = !1, this.player.events.trigger(\"contextmenu_hide\");\n        } }]) && xe(t.prototype, n), i && xe(t, i), e;\n    }();function Te(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var Le = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.container = t.template.infoPanel, this.template = t.template, this.video = t.video, this.player = t, this.template.infoPanelClose.addEventListener(\"click\", function () {\n          n.hide();\n        });\n      }var t, n, i;return t = e, (n = [{ key: \"show\", value: function () {\n          this.beginTime = Date.now(), this.update(), this.player.timer.enable(\"info\"), this.player.timer.enable(\"fps\"), this.container.classList.remove(\"dplayer-info-panel-hide\");\n        } }, { key: \"hide\", value: function () {\n          this.player.timer.disable(\"info\"), this.player.timer.disable(\"fps\"), this.container.classList.add(\"dplayer-info-panel-hide\");\n        } }, { key: \"triggle\", value: function () {\n          this.container.classList.contains(\"dplayer-info-panel-hide\") ? this.show() : this.hide();\n        } }, { key: \"update\", value: function () {\n          this.template.infoType.innerHTML = this.player.type, this.template.infoUrl.innerHTML = this.player.options.video.url, this.template.infoResolution.innerHTML = \"\".concat(this.player.video.videoWidth, \" x \").concat(this.player.video.videoHeight), this.template.infoDuration.innerHTML = this.player.video.duration, this.player.options.danmaku && (this.template.infoDanmakuId.innerHTML = this.player.options.danmaku.id, this.template.infoDanmakuApi.innerHTML = this.player.options.danmaku.api, this.template.infoDanmakuAmount.innerHTML = this.player.danmaku.dan.length);\n        } }, { key: \"fps\", value: function (e) {\n          this.template.infoFPS.innerHTML = \"\".concat(e.toFixed(1));\n        } }]) && Te(t.prototype, n), i && Te(t, i), e;\n    }(),\n        Ee = n(3),\n        qe = n.n(Ee);function Be(e, t) {\n      for (var n = 0; n < t.length; n++) {\n        var i = t[n];i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n      }\n    }var Me = 0,\n        Ce = [],\n        _e = function () {\n      function e(t) {\n        var n = this;!function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, e), this.options = u(t), this.options.video.quality && (this.qualityIndex = this.options.video.defaultQuality, this.quality = this.options.video.quality[this.options.video.defaultQuality]), this.tran = new p(this.options.lang).tran, this.events = new ee(), this.user = new ae(this), this.container = this.options.container, this.container.classList.add(\"dplayer\"), this.options.danmaku || this.container.classList.add(\"dplayer-no-danmaku\"), this.options.live && this.container.classList.add(\"dplayer-live\"), o.isMobile && this.container.classList.add(\"dplayer-mobile\"), this.arrow = this.container.offsetWidth <= 500, this.arrow && this.container.classList.add(\"dplayer-arrow\"), this.template = new J({ container: this.container, options: this.options, index: Me, tran: this.tran }), this.video = this.template.video, this.bar = new le(this.template), this.bezel = new pe(this.template.bezel), this.fullScreen = new ne(this), this.controller = new fe(this), this.options.danmaku && (this.danmaku = new K({ container: this.template.danmaku, opacity: this.user.get(\"opacity\"), callback: function () {\n            setTimeout(function () {\n              n.template.danmakuLoading.style.display = \"none\", n.options.autoplay && n.play();\n            }, 0);\n          }, error: function (e) {\n            n.notice(e);\n          }, apiBackend: this.options.apiBackend, borderColor: this.options.theme, height: this.arrow ? 24 : 30, time: function () {\n            return n.video.currentTime;\n          }, unlimited: this.user.get(\"unlimited\"), api: { is: this.options.danmaku.is, ep: this.options.danmaku.ep, av: this.options.danmaku.av, address: this.options.danmaku.api, token: this.options.danmaku.token, maximum: this.options.danmaku.maximum, addition: this.options.danmaku.addition, user: this.options.danmaku.user }, events: this.events, tran: function (e) {\n            return n.tran(e);\n          } }), this.comment = new we(this)), this.setting = new ge(this), document.addEventListener(\"click\", function () {\n          n.focus = !1;\n        }, !0), this.container.addEventListener(\"click\", function () {\n          n.focus = !0;\n        }, !0), this.paused = !0, this.timer = new ue(this), this.hotkey = new ke(this), this.contextmenu = new Se(this), this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type), this.infoPanel = new Le(this), !this.danmaku && this.options.autoplay && this.play(), Me++, Ce.push(this);\n      }var t, n, a;return t = e, (n = [{ key: \"seek\", value: function (e) {\n          e = Math.max(e, 0), this.video.duration && (e = Math.min(e, this.video.duration)), this.video.currentTime < e ? this.notice(\"\".concat(this.tran(\"FF\"), \" \").concat((e - this.video.currentTime).toFixed(0), \" \").concat(this.tran(\"s\"))) : this.video.currentTime > e && this.notice(\"\".concat(this.tran(\"REW\"), \" \").concat((this.video.currentTime - e).toFixed(0), \" \").concat(this.tran(\"s\"))), this.video.currentTime = e, this.danmaku && this.danmaku.seek(), this.bar.set(\"played\", e / this.video.duration, \"width\"), this.template.ptime.innerHTML = o.secondToTime(e);\n        } }, { key: \"play\", value: function () {\n          var e = this;if (this.paused = !1, this.video.paused && this.bezel.switch(U.play), this.template.playButton.innerHTML = U.pause, i.a.resolve(this.video.play()).catch(function () {\n            e.pause();\n          }).then(function () {}), this.timer.enable(\"loading\"), this.container.classList.remove(\"dplayer-paused\"), this.container.classList.add(\"dplayer-playing\"), this.danmaku && this.danmaku.play(), this.options.mutex) for (var t = 0; t < Ce.length; t++) this !== Ce[t] && Ce[t].pause();\n        } }, { key: \"pause\", value: function () {\n          this.paused = !0, this.container.classList.remove(\"dplayer-loading\"), this.video.paused || this.bezel.switch(U.pause), this.template.playButton.innerHTML = U.play, this.video.pause(), this.timer.disable(\"loading\"), this.container.classList.remove(\"dplayer-playing\"), this.container.classList.add(\"dplayer-paused\"), this.danmaku && this.danmaku.pause();\n        } }, { key: \"switchVolumeIcon\", value: function () {\n          this.volume() >= .95 ? this.template.volumeIcon.innerHTML = U.volumeUp : this.volume() > 0 ? this.template.volumeIcon.innerHTML = U.volumeDown : this.template.volumeIcon.innerHTML = U.volumeOff;\n        } }, { key: \"volume\", value: function (e, t, n) {\n          if (e = parseFloat(e), !isNaN(e)) {\n            e = Math.max(e, 0), e = Math.min(e, 1), this.bar.set(\"volume\", e, \"width\");var i = \"\".concat((100 * e).toFixed(0), \"%\");this.template.volumeBarWrapWrap.dataset.balloon = i, t || this.user.set(\"volume\", e), n || this.notice(\"\".concat(this.tran(\"Volume\"), \" \").concat((100 * e).toFixed(0), \"%\")), this.video.volume = e, this.video.muted && (this.video.muted = !1), this.switchVolumeIcon();\n          }return this.video.volume;\n        } }, { key: \"toggle\", value: function () {\n          this.video.paused ? this.play() : this.pause();\n        } }, { key: \"on\", value: function (e, t) {\n          this.events.on(e, t);\n        } }, { key: \"switchVideo\", value: function (e, t) {\n          this.pause(), this.video.poster = e.pic ? e.pic : \"\", this.video.src = e.url, this.initMSE(this.video, e.type || \"auto\"), t && (this.template.danmakuLoading.style.display = \"block\", this.bar.set(\"played\", 0, \"width\"), this.bar.set(\"loaded\", 0, \"width\"), this.template.ptime.innerHTML = \"00:00\", this.template.danmaku.innerHTML = \"\", this.danmaku && this.danmaku.reload({ id: t.id, address: t.api, token: t.token, maximum: t.maximum, addition: t.addition, user: t.user }));\n        } }, { key: \"initMSE\", value: function (e, t) {\n          var n = this;if (this.type = t, this.options.video.customType && this.options.video.customType[t]) \"[object Function]\" === Object.prototype.toString.call(this.options.video.customType[t]) ? this.options.video.customType[t](this.video, this) : console.error(\"Illegal customType: \".concat(t));else switch (\"auto\" === this.type && (/m3u8(#|\\?|$)/i.exec(e.src) ? this.type = \"hls\" : /.flv(#|\\?|$)/i.exec(e.src) ? this.type = \"flv\" : /.mpd(#|\\?|$)/i.exec(e.src) ? this.type = \"dash\" : this.type = \"normal\"), \"hls\" === this.type && (e.canPlayType(\"application/x-mpegURL\") || e.canPlayType(\"application/vnd.apple.mpegURL\")) && (this.type = \"normal\"), this.type) {case \"hls\":\n              if (Hls) {\n                if (Hls.isSupported()) {\n                  var i = new Hls();i.loadSource(e.src), i.attachMedia(e);\n                } else this.notice(\"Error: Hls is not supported.\");\n              } else this.notice(\"Error: Can't find Hls.\");break;case \"flv\":\n              if (flvjs && flvjs.isSupported()) {\n                if (flvjs.isSupported()) {\n                  var a = flvjs.createPlayer({ type: \"flv\", url: e.src });a.attachMediaElement(e), a.load();\n                } else this.notice(\"Error: flvjs is not supported.\");\n              } else this.notice(\"Error: Can't find flvjs.\");break;case \"dash\":\n              dashjs ? dashjs.MediaPlayer().create().initialize(e, e.src, !1) : this.notice(\"Error: Can't find dashjs.\");break;case \"webtorrent\":\n              if (WebTorrent) {\n                if (WebTorrent.WEBRTC_SUPPORT) {\n                  this.container.classList.add(\"dplayer-loading\");var o = new WebTorrent(),\n                      r = e.src;o.add(r, function (e) {\n                    e.files.find(function (e) {\n                      return e.name.endsWith(\".mp4\");\n                    }).renderTo(n.video, { autoplay: n.options.autoplay }, function () {\n                      n.container.classList.remove(\"dplayer-loading\");\n                    });\n                  });\n                } else this.notice(\"Error: Webtorrent is not supported.\");\n              } else this.notice(\"Error: Can't find Webtorrent.\");}\n        } }, { key: \"initVideo\", value: function (e, t) {\n          var n = this;this.initMSE(e, t), this.on(\"durationchange\", function () {\n            1 !== e.duration && e.duration !== 1 / 0 && (n.template.dtime.innerHTML = o.secondToTime(e.duration));\n          }), this.on(\"progress\", function () {\n            var t = e.buffered.length ? e.buffered.end(e.buffered.length - 1) / e.duration : 0;n.bar.set(\"loaded\", t, \"width\");\n          }), this.on(\"error\", function () {\n            n.video.error && n.tran && n.notice && (n.type, n.notice(n.tran(\"Video load failed\"), -1));\n          }), this.on(\"ended\", function () {\n            n.bar.set(\"played\", 1, \"width\"), n.setting.loop ? (n.seek(0), n.play()) : n.pause(), n.danmaku && (n.danmaku.danIndex = 0);\n          }), this.on(\"play\", function () {\n            n.paused && n.play();\n          }), this.on(\"pause\", function () {\n            n.paused || n.pause();\n          }), this.on(\"timeupdate\", function () {\n            n.bar.set(\"played\", n.video.currentTime / n.video.duration, \"width\");var e = o.secondToTime(n.video.currentTime);n.template.ptime.innerHTML !== e && (n.template.ptime.innerHTML = e);\n          });for (var i = function (t) {\n            e.addEventListener(n.events.videoEvents[t], function () {\n              n.events.trigger(n.events.videoEvents[t]);\n            });\n          }, a = 0; a < this.events.videoEvents.length; a++) i(a);this.volume(this.user.get(\"volume\"), !0, !0), this.options.subtitle && (this.subtitle = new re(this.template.subtitle, this.video, this.options.subtitle, this.events), this.user.get(\"subtitle\") || this.subtitle.hide());\n        } }, { key: \"switchQuality\", value: function (e) {\n          var t = this;if (e = \"string\" == typeof e ? parseInt(e) : e, this.qualityIndex !== e && !this.switchingQuality) {\n            this.qualityIndex = e, this.switchingQuality = !0, this.quality = this.options.video.quality[e], this.template.qualityButton.innerHTML = this.quality.name;var n = this.video.paused;this.video.pause();var i = qe()({ current: !1, pic: null, screenshot: this.options.screenshot, preload: \"auto\", url: this.quality.url, subtitle: this.options.subtitle }),\n                a = new DOMParser().parseFromString(i, \"text/html\").body.firstChild;this.template.videoWrap.insertBefore(a, this.template.videoWrap.getElementsByTagName(\"div\")[0]), this.prevVideo = this.video, this.video = a, this.initVideo(this.video, this.quality.type || this.options.video.type), this.seek(this.prevVideo.currentTime), this.notice(\"\".concat(this.tran(\"Switching to\"), \" \").concat(this.quality.name, \" \").concat(this.tran(\"quality\")), -1), this.events.trigger(\"quality_start\", this.quality), this.on(\"canplay\", function () {\n              if (t.prevVideo) {\n                if (t.video.currentTime !== t.prevVideo.currentTime) return void t.seek(t.prevVideo.currentTime);t.template.videoWrap.removeChild(t.prevVideo), t.video.classList.add(\"dplayer-video-current\"), n || t.video.play(), t.prevVideo = null, t.notice(\"\".concat(t.tran(\"Switched to\"), \" \").concat(t.quality.name, \" \").concat(t.tran(\"quality\"))), t.switchingQuality = !1, t.events.trigger(\"quality_end\");\n              }\n            });\n          }\n        } }, { key: \"notice\", value: function (e) {\n          var t = this,\n              n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2e3,\n              i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .8;this.template.notice.innerHTML = e, this.template.notice.style.opacity = i, this.noticeTime && clearTimeout(this.noticeTime), this.events.trigger(\"notice_show\", e), n > 0 && (this.noticeTime = setTimeout(function () {\n            t.template.notice.style.opacity = 0, t.events.trigger(\"notice_hide\");\n          }, n));\n        } }, { key: \"resize\", value: function () {\n          this.danmaku && this.danmaku.resize(), this.controller.thumbnails && this.controller.thumbnails.resize(160, this.video.videoHeight / this.video.videoWidth * 160, this.template.barWrap.offsetWidth), this.events.trigger(\"resize\");\n        } }, { key: \"speed\", value: function (e) {\n          this.video.playbackRate = e;\n        } }, { key: \"destroy\", value: function () {\n          Ce.splice(Ce.indexOf(this), 1), this.pause(), this.controller.destroy(), this.timer.destroy(), this.video.src = \"\", this.container.innerHTML = \"\", this.events.trigger(\"destroy\");\n        } }]) && Be(t.prototype, n), a && Be(t, a), e;\n    }();t.default = _e;\n  }]).default;\n});\n//# sourceMappingURL=DPlayer.min.js.map\n\n//# sourceURL=webpack:///./src/lib/DPlayer.min.js?");

/***/ }),

/***/ "electron":
/*!**************************************!*\
  !*** external "require('electron')" ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = require('electron');\n\n//# sourceURL=webpack:///external_%22require('electron')%22?");

/***/ })

/******/ });