-
Notifications
You must be signed in to change notification settings - Fork 19
/
downstream-electron-be.js
2 lines (2 loc) · 961 KB
/
downstream-electron-be.js
1
2
/*! For license information please see downstream-electron-be.js.LICENSE.txt */
!function(Q,U){if("object"==typeof exports&&"object"==typeof module)module.exports=U(require("@xmldom/xmldom"),require("base64-js"),require("biguint-format"),require("electron"),require("flake-idgen"),require("get-folder-size"),require("jsonfile"),require("mkdirp"),require("moment/moment"),require("underscore"),require("url-parse"));else if("function"==typeof define&&define.amd)define(["@xmldom/xmldom","base64-js","biguint-format","electron","flake-idgen","get-folder-size","jsonfile","mkdirp","moment/moment","underscore","url-parse"],U);else{var F="object"==typeof exports?U(require("@xmldom/xmldom"),require("base64-js"),require("biguint-format"),require("electron"),require("flake-idgen"),require("get-folder-size"),require("jsonfile"),require("mkdirp"),require("moment/moment"),require("underscore"),require("url-parse")):U(Q["@xmldom/xmldom"],Q["base64-js"],Q["biguint-format"],Q.electron,Q["flake-idgen"],Q["get-folder-size"],Q.jsonfile,Q.mkdirp,Q["moment/moment"],Q.underscore,Q["url-parse"]);for(var B in F)("object"==typeof exports?exports:Q)[B]=F[B]}}(global,((__WEBPACK_EXTERNAL_MODULE__2008__,__WEBPACK_EXTERNAL_MODULE__7769__,__WEBPACK_EXTERNAL_MODULE__1637__,__WEBPACK_EXTERNAL_MODULE__7194__,__WEBPACK_EXTERNAL_MODULE__1759__,__WEBPACK_EXTERNAL_MODULE__6838__,__WEBPACK_EXTERNAL_MODULE__3480__,__WEBPACK_EXTERNAL_MODULE__9526__,__WEBPACK_EXTERNAL_MODULE__1908__,__WEBPACK_EXTERNAL_MODULE__4952__,__WEBPACK_EXTERNAL_MODULE__3720__)=>(()=>{var __webpack_modules__={2081:Q=>{"use strict";Q.exports=require("child_process")},3639:Q=>{"use strict";Q.exports=require("domain")},2361:Q=>{"use strict";Q.exports=require("events")},7147:Q=>{"use strict";Q.exports=require("fs")},1808:Q=>{"use strict";Q.exports=require("net")},1017:Q=>{"use strict";Q.exports=require("path")},3837:Q=>{"use strict";Q.exports=require("util")},2008:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__2008__},7769:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__7769__},1637:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__1637__},7194:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__7194__},1759:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__1759__},6838:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__6838__},3480:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__3480__},9526:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__9526__},1908:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__1908__},4952:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__4952__},3720:Q=>{"use strict";Q.exports=__WEBPACK_EXTERNAL_MODULE__3720__},8557:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval('\n\n/**\n * @typedef Configuration\n * @property {string=} appDir main directory path, can be any valid path, default is electronApp.getPath(\'userData\')\n * @property {string=} settingsName - name of the folder in main directory path where to store settings\n * @property {string=} publicName - name of the folder in main directory path which will be served over http\n * @property {string=} downloadsName - name of the folder in main directory path and publicName where to store assets\n * @property {string=} offlineDomain - on which domain the content should be served, default is 127.0.0.1\n * @property {number=} offlineContentPortStart - on which port offline content should be served, default is 3010\n * @property {number=} maxOfflineContentPortRange - max range for offline port to on which content can be served\n * It will try from {offlineContentPortStart} and if taken it will try next until it finds a free one\n * @property {number=} numberOfManifestsInParallel - max number of manifest that can be downloaded at the same time,\n * the rest will go into queue.\n * Be reasonable here, as it might slow down your computer, default value is 2. With 10 and very larges manifests\n * it might go to hundreds of chunks (50 files can be downloaded at the same time per manifest). Also the highger number\n * doesn\'t mean it will downloads all movies faster. You should find here some balance.\n * Seems like 2-3 manifests gives the best results, 1 manifest limitation might work better for slower computers.\n * @property {regex | string=} customManifestIdFolderRegex - regex to use to validate custom manifest id - bear in mind that this\n * need to be also a valid folder name.<br>\n * By default it matches any letter or number or unicode characters (regional characters) or "-" or "_" as a first character<br>\n * Then it may have any letter or number or unicode characters (regional characters) or space or any of the following characters:\n * ,.;\'[]{}!@#$%&*()-_=+\n *\n * @property {string=} openingTagForInvalidCustomManifestIdCharacter - when customManifestId is being invalidated\n * against customManifestIdFolderRegex it will raise the error and include the customManifestId with marked invalid characters\n * this is the opening tag to be added before invalid character\n *\n * @property {string=} closingTagForInvalidCustomManifestIdCharacter - when customManifestId is being invalidated\n * against customManifestIdFolderRegex it will raise the error and include the customManifestId with marked invalid characters\n * this is the closing tag to be added after invalid character\n *\n * @namespace DownstreamElectronBE.configuration\n * @description\n * During initialization you can configure your app\n * @example\n * //somewhere in the main process\n * const downstreamElectron = require(\'downstream-electron\');\n * const userSettings = {\n * appDir: "/Users/admin/myApp",\n * settingsName: "settings",\n * publicName: "public",\n * downloadsName: "movies"\n * numberOfManifestsInParallel: 3\n * };\n * function createWindow() {\n * downstreamElectron.init(userSettings);\n * const win = new BrowserWindow({\n * width: 1200,\n * height: 700,\n * resizable: true,\n * webPreferences: {\n * plugins: true\n * }\n * });\n * win.loadURL(\'file://index.html\');\n * win.webContents.openDevTools();\n * }\n * app.on(\'ready\', createWindow);\n */\nvar electronApp = (__webpack_require__(7194).app);\nvar path = __webpack_require__(1017);\nvar settings = {\n downloadingThreadsRules: {\n items: [{\n max: 10,\n files: 5\n }, {\n max: 100,\n files: 10\n }, {\n max: 1000,\n files: 30\n }, {\n max: 100000,\n files: 50\n }],\n threads: [{\n size: 10,\n number: 1\n }, {\n size: 100,\n number: 3\n }, {\n size: 1000,\n number: 4\n }, {\n size: 100000,\n number: 5\n }]\n },\n MAX_ERRORS_DOWNLOAD_RETRY: 5,\n MAX_INTERNET_ERRORS_DOWNLOAD_CHUNK_RETRY: 100,\n MAX_ERRORS_DOWNLOAD_CHUNK_RETRY: 5,\n offlineDomain: "http://127.0.0.1",\n offlineContentPortStart: 3010,\n maxOfflineContentPortRange: 3030,\n numberOfManifestsInParallel: 2,\n stopOnError: false,\n stores: {\n DOWNLOADS: {\n "LEFT": "left",\n "DOWNLOADING": "downloading",\n "DOWNLOADED": "downloaded",\n "ERRORS": "errors"\n },\n STATUS: "status",\n PARAMS: "params",\n MANIFEST: "manifest",\n PERSISTENT: "persistent",\n DATA: "data"\n },\n saveToDisk: true,\n times: {\n DOWNLOAD_TIMEOUT: 5000,\n RETRY_TIMEOUT: 5000\n },\n useChunkedEncoding: false,\n useHeadRequests: true,\n noCache: false,\n defaultManifestRequestOptions: {\n headers: {\n "Accept": "*/*",\n // \'Accept-Encoding\': \'gzip, deflate, br\', // gzip doesn\'t work\n // \'Accept-Language\': \'en-US,en;q=0.8,pl;q=0.6\',\n // \'Cache-Control\': \'no-cache\',\n // \'Connection\': \'keep-alive\', // @TODO investigate it\n // \'Pragma\': \'no-cache\',\n "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Electron/1.8.6 Safari/537.36"\n },\n timeout: 5000\n },\n // matches any letter or number or unicode characters (regional characters) or "-" or "_" as a start\n // then it may have any letter or number or unicode characters (regional characters) or space or any of the following characters\n // ,.;\'[]{}!@#$%&*()-_=+\n // and is all case insensitive\n customManifestIdFolderRegex: /^([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|\\-|\\_){1,1}([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|\\ |\\,|\\.|\\;|\\\'|\\[|\\]|\\{|\\}|\\!|\\@|\\#|\\$|\\%|\\&|\\*|\\(|\\)|\\-|\\_|\\=|\\+?){0,49}$/i,\n openingTagForInvalidCustomManifestIdCharacter: \'<span style=\\\'background-color:blue;\\\'>\',\n closingTagForInvalidCustomManifestIdCharacter: \'</span>\'\n};\nfunction loadUserSettings(jsonSettings) {\n var appDir = electronApp.getPath("userData");\n var settingsName = "settings";\n var publicName = "public";\n var downloadsName = "movies";\n if (jsonSettings) {\n if (jsonSettings.appDir) {\n appDir = jsonSettings.appDir;\n }\n if (jsonSettings.settingsName) {\n settingsName = jsonSettings.settingsName;\n }\n if (jsonSettings.publicName) {\n publicName = jsonSettings.publicName;\n }\n if (jsonSettings.downloadsName) {\n downloadsName = jsonSettings.downloadsName;\n }\n if (jsonSettings.offlineDomain) {\n settings.offlineDomain = jsonSettings.offlineDomain;\n }\n if (jsonSettings.offlineContentPortStart) {\n settings.offlineContentPortStart = jsonSettings.offlineContentPortStart;\n }\n if (jsonSettings.maxOfflineContentPortRange) {\n settings.maxOfflineContentPortRange = jsonSettings.maxOfflineContentPortRange;\n }\n if (jsonSettings.numberOfManifestsInParallel) {\n settings.numberOfManifestsInParallel = jsonSettings.numberOfManifestsInParallel;\n }\n if (jsonSettings.stopOnError !== undefined) {\n settings.stopOnError = jsonSettings.stopOnError;\n }\n if (jsonSettings.customManifestIdFolderRegex) {\n settings.customManifestIdFolderRegex = jsonSettings.customManifestIdFolderRegex;\n }\n if (jsonSettings.openingTagForInvalidCustomManifestIdCharacter) {\n settings.openingTagForInvalidCustomManifestIdCharacter = jsonSettings.openingTagForInvalidCustomManifestIdCharacter;\n }\n if (jsonSettings.closingTagForInvalidCustomManifestIdCharacter) {\n settings.closingTagForInvalidCustomManifestIdCharacter = jsonSettings.closingTagForInvalidCustomManifestIdCharacter;\n }\n if (jsonSettings.useHeadRequests !== undefined) {\n settings.useHeadRequests = jsonSettings.useHeadRequests;\n }\n if (jsonSettings.times && jsonSettings.times.RETRY_TIMEOUT) {\n settings.times.RETRY_TIMEOUT = jsonSettings.times.RETRY_TIMEOUT;\n }\n if (jsonSettings.MAX_ERRORS_DOWNLOAD_RETRY) {\n settings.MAX_ERRORS_DOWNLOAD_RETRY = jsonSettings.MAX_ERRORS_DOWNLOAD_RETRY;\n }\n if (jsonSettings.MAX_INTERNET_ERRORS_DOWNLOAD_CHUNK_RETRY) {\n settings.MAX_INTERNET_ERRORS_DOWNLOAD_CHUNK_RETRY = jsonSettings.MAX_INTERNET_ERRORS_DOWNLOAD_CHUNK_RETRY;\n }\n if (jsonSettings.MAX_ERRORS_DOWNLOAD_CHUNK_RETRY) {\n settings.MAX_ERRORS_DOWNLOAD_CHUNK_RETRY = jsonSettings.MAX_ERRORS_DOWNLOAD_CHUNK_RETRY;\n }\n if (jsonSettings.noCache) {\n settings.noCache = jsonSettings.noCache;\n }\n }\n appDir = path.join(path.resolve(appDir), "/");\n var settingsFolder = path.join(path.resolve(appDir + settingsName) + "/", "/");\n var publicFolderPath = path.join(path.resolve(appDir + publicName) + "/", "/");\n var downloadsFolderPath = path.join(path.resolve(publicFolderPath + downloadsName) + "/", "/");\n settings.appDir = appDir;\n settings.downloadsFolderPath = downloadsFolderPath;\n settings.downloadsName = downloadsName;\n settings.publicFolderPath = publicFolderPath;\n settings.settingsFolder = settingsFolder;\n\n // console.log(\'appDir:\', appDir);\n}\nfunction getSettings() {\n return settings;\n}\nexports.load = loadUserSettings;\nexports.getSettings = getSettings;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODU1Ny5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ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F9DSFVOS19SRVRSWSIsIk1BWF9FUlJPUlNfRE9XTkxPQURfQ0hVTktfUkVUUlkiLCJvZmZsaW5lRG9tYWluIiwib2ZmbGluZUNvbnRlbnRQb3J0U3RhcnQiLCJtYXhPZmZsaW5lQ29udGVudFBvcnRSYW5nZSIsIm51bWJlck9mTWFuaWZlc3RzSW5QYXJhbGxlbCIsInN0b3BPbkVycm9yIiwic3RvcmVzIiwiRE9XTkxPQURTIiwiU1RBVFVTIiwiUEFSQU1TIiwiTUFOSUZFU1QiLCJQRVJTSVNURU5UIiwiREFUQSIsInNhdmVUb0Rpc2siLCJ0aW1lcyIsIkRPV05MT0FEX1RJTUVPVVQiLCJSRVRSWV9USU1FT1VUIiwidXNlQ2h1bmtlZEVuY29kaW5nIiwidXNlSGVhZFJlcXVlc3RzIiwibm9DYWNoZSIsImRlZmF1bHRNYW5pZmVzdFJlcXVlc3RPcHRpb25zIiwiaGVhZGVycyIsInRpbWVvdXQiLCJjdXN0b21NYW5pZmVzdElkRm9sZGVyUmVnZXgiLCJvcGVuaW5nVGFnRm9ySW52YWxpZEN1c3RvbU1hbmlmZXN0SWRDaGFyYWN0ZXIiLCJjbG9zaW5nVGFnRm9ySW52YWxpZEN1c3RvbU1hbmlmZXN0SWRDaGFyYWN0ZXIiLCJsb2FkVXNlclNldHRpbmdzIiwianNvblNldHRpbmdzIiwiYXBwRGlyIiwiZ2V0UGF0aCIsInNldHRpbmdzTmFtZSIsInB1YmxpY05hbWUiLCJkb3dubG9hZHNOYW1lIiwidW5kZWZpbmVkIiwiam9pbiIsInJlc29sdmUiLCJzZXR0aW5nc0ZvbGRlciIsInB1YmxpY0ZvbGRlclBhdGgiLCJkb3dubG9hZHNGb2xkZXJQYXRoIiwiZ2V0U2V0dGluZ3MiLCJleHBvcnRzIiwibG9hZCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8557\n')},3274:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\n/**\n * @typedef manifestObject\n * @property {Object} video - video representations\n * @property {Object} audio - audio representations\n * @property {Object} text - text representations\n * @property {String} id - manifest id\n */\n\n/**\n * @memberOf DownstreamElectronFE\n * @namespace DownstreamElectronFE.downloads\n */\nvar downloads = {};\n\n/**\n * create a new download, if success the result will contain "id" which should be used for other calls\n * @method create\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestUrl - manifest url\n * @param {string} customManifestId - custom manifest id, if empty, null or \'\'\n * the id will be generated automatically.<br>\n * The manifestId is used to also store information about movie under the same folder so if you overwrite it,\n * it will be also used as a name for folder where movie content will be stored\n * customManifestId will be validated against default regex\n * {@link DownstreamElectronBE.configuration|customManifestIdFolderRegex}\n * @example\n * var url = "http://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd";\n * DownstreamElectronFE.downloads.create(url)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * DownstreamElectronFE.downloads.create(url, \'<myCustomId>\')\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.create = __webpack_require__(1539);\n\n/**\n * create a persistent session\n * @method createPersistent\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @param {PersistentConfig} config - persistent configuration\n * @param {boolean} [forced=false] - replace existing persistent session, if true\n * @example\n * var config = {\n * licenseUrl: \'https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/\',\n * serverCertificate: new Uint8Array(<server_certificate>),\n * customData: {\n * userId: \'<user_id>\',\n * sessionId: \'<session_id>\',\n * merchant: \'<merchant>\'\n * }\n * };\n * DownstreamElectronFE.downloads.createPersistent(manifestId, config)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.createPersistent = __webpack_require__(3761);\n\n/**\n * Get info about manifest folder\n * @method getFolderInfo\n * @memberOf DownstreamElectronFE.downloads\n * @example\n * DownstreamElectronFE.downloads.getFolderInfo()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.getFolderInfo = __webpack_require__(9500);\n\n/**\n * get ids of all downloads\n * @method getList\n * @memberOf DownstreamElectronFE.downloads\n * @example\n * DownstreamElectronFE.downloads.getList()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.getList = __webpack_require__(8831);\n\n/**\n * get list of all downloads with additional info {@link manifestObject}\n * @method getListWithInfo\n * @memberOf DownstreamElectronFE.downloads\n * @example\n * DownstreamElectronFE.downloads.getListWithInfo()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.getListWithInfo = __webpack_require__(2893);\n\n/**\n * get offline link for download which can be used by any player to play movie\n * @method getOfflineLink\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @example\n * DownstreamElectronFE.downloads.getOfflineLink(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.getOfflineLink = __webpack_require__(1536);\n\n/**\n * get info for download\n * @method info\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @example\n * DownstreamElectronFE.downloads.info(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.info = __webpack_require__(4134);\n\n/**\n * removes download\n * @method remove\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @example\n * DownstreamElectronFE.downloads.remove(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.remove = __webpack_require__(9858);\n\n/**\n * removes all downloads\n * @method removeAll\n * @memberOf DownstreamElectronFE.downloads\n * @example\n * DownstreamElectronFE.downloads.removeAll()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.removeAll = __webpack_require__(1853);\n\n/**\n * removes all unfinished downloads\n * @method removeAllUnfinished\n * @memberOf DownstreamElectronFE.downloads\n * @example\n * DownstreamElectronFE.downloads.removeAllUnfinished()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.removeAllUnfinished = __webpack_require__(8663);\n\n/**\n * removes persistent information previously stored\n * @method removePersistent\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @example\n * DownstreamElectronFE.downloads.removePersistent(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.removePersistent = __webpack_require__(5585);\n\n/**\n * resumes download which could be previously stopped or is broken\n * @method resume\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @example\n * DownstreamElectronFE.downloads.resume(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.resume = __webpack_require__(179);\n\n/**\n * Saves some user data this might be a string or json object.\n * This data will be available as "data" property for info of download\n * @method saveData\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @param {string|json} data - user data\n * @example\n * DownstreamElectronFE.downloads.saveData(manifestId, data)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.saveData = __webpack_require__(6162);\n\n/**\n * saves persistent session identifier\n * @method savePersistent\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @param {string} persistentSessionId - persistent session identifier\n * @example\n * DownstreamElectronFE.downloads.savePersistent(manifestId, persistentSessionId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.savePersistent = __webpack_require__(3831);\n\n/**\n * starts download\n * @method start\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @param {object} representations - representations to be downloaded, available options: \'video\', \'audio\', \'text\'.\n * For each option please provide an array of representations id to be downloaded\n * @example\n * DownstreamElectronFE.downloads.start(manifestId, {video: [\'video=400000\', \'video=795000\'], audio: [\'audio=128000\']})\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.start = __webpack_require__(1714);\n\n/**\n * stops download\n * @method stop\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @example\n * DownstreamElectronFE.downloads.stop(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.stop = __webpack_require__(4573);\n\n/**\n * stops all downloads\n * @method stopAll\n * @memberOf DownstreamElectronFE.downloads\n * @example\n * DownstreamElectronFE.downloads.stopAll()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.stopAll = __webpack_require__(5984);\n\n/**\n * subscribe to download progress\n * @method subscribe\n * @memberOf DownstreamElectronFE.downloads\n * @param {string|array} manifestId - manifest identifier, or the array of the manifests identifier.\n * @param {number} interval - in milliseconds - how often callback onProgress should be invoked\n * @param {function} onProgress - callback to be invoked as often as defined by interval with [stats information]{@link DownloadStats}\n * @param {function} onFinish - callback to be invoked when download is finished\n * @example\n * function onProgress (err, stats) {\n * if (err) {\n * console.logs(stats);\n * }\n * };\n * function onFinish (err, info) {\n * if (err) {\n * console.log("error", err);\n * } else {\n * console.log("success", info);\n * }\n * };\n * DownstreamElectronFE.downloads.subscribe(manifestId, 1000, onProgress, onFinish)\n * .then(\n * function onSuccess() {console.log("subscribed successfully");},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.subscribe = __webpack_require__(8973);\n\n/**\n * removes callbacks from subscribe process\n * @method unsubscribe\n * @memberOf DownstreamElectronFE.downloads\n * @param {string|array} manifestId - manifest identifier, or the array of the manifests identifier.\n * @example\n * DownstreamElectronFE.downloads.unsubscribe(manifestId)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.unsubscribe = __webpack_require__(5934);\n\n/**\n * update download folder info for manifest id\n * this can be usefule when user has copied download folder\n * @method updateDownloadFolder\n * @memberOf DownstreamElectronFE.downloads\n * @param {string} manifestId - manifest identifier\n * @param {string} downloadFolder - new download folder path\n * @example\n * DownstreamElectronFE.downloads.updateDownloadFolder(manifestId, downloadFolder)\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\ndownloads.updateDownloadFolder = __webpack_require__(15);\n\n/**\n * remove all subscribers\n * @private\n * @method removeSubscribers\n * @memberOf DownstreamElectronFE\n * @example\n * DownstreamElectronFE.removeSubscribers()\n * .then(\n * function onSuccess(result) {console.log("success", result);},\n * function onError(err) {console.log("error", err);\n * })\n * @returns {Promise} - promise\n */\nvar removeSubscribers = __webpack_require__(3781);\nmodule.exports = {\n downloads: downloads,\n removeSubscribers: removeSubscribers\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI3NC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFHQ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1vdmUtc3Vic2NyaWJlcnMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGRvd25sb2FkczogZG93bmxvYWRzLFxuICByZW1vdmVTdWJzY3JpYmVyczogcmVtb3ZlU3Vic2NyaWJlcnNcbn07XG4iXSwibmFtZXMiOlsiZG93bmxvYWRzIiwiY3JlYXRlIiwicmVxdWlyZSIsImNyZWF0ZVBlcnNpc3RlbnQiLCJnZXRGb2xkZXJJbmZvIiwiZ2V0TGlzdCIsImdldExpc3RXaXRoSW5mbyIsImdldE9mZmxpbmVMaW5rIiwiaW5mbyIsInJlbW92ZSIsInJlbW92ZUFsbCIsInJlbW92ZUFsbFVuZmluaXNoZWQiLCJyZW1vdmVQZXJzaXN0ZW50IiwicmVzdW1lIiwic2F2ZURhdGEiLCJzYXZlUGVyc2lzdGVudCIsInN0YXJ0Iiwic3RvcCIsInN0b3BBbGwiLCJzdWJzY3JpYmUiLCJ1bnN1YnNjcmliZSIsInVwZGF0ZURvd25sb2FkRm9sZGVyIiwicmVtb3ZlU3Vic2NyaWJlcnMiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3274\n')},1539:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar Manifest = (__webpack_require__(7151)/* .Manifest */ .G);\nvar translation = __webpack_require__(5847);\nvar canCreateManifest = __webpack_require__(1958);\nvar getInvalidDiff = __webpack_require__(7868);\nvar appSettings = __webpack_require__(8557);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestUrl, customManifestId, manifestStr) {\n var useCustomId = true;\n if (typeof customManifestId === "undefined" || customManifestId === "" || customManifestId === null) {\n useCustomId = false;\n }\n if (useCustomId) {\n if (typeof customManifestId !== "undefined" && typeof customManifestId !== "number" && typeof customManifestId !== "string") {\n onFailure(translation.getError(translation.e.manifests.INVALID_ID, customManifestId));\n return;\n }\n var customManifestIdFolderRegex = appSettings.getSettings().customManifestIdFolderRegex;\n if (!customManifestId.match(customManifestIdFolderRegex)) {\n var invalid = getInvalidDiff(customManifestId, customManifestIdFolderRegex, appSettings.getSettings().openingTagForInvalidCustomManifestIdCharacter, appSettings.getSettings().closingTagForInvalidCustomManifestIdCharacter);\n onFailure(translation.getError(translation.e.manifests.INVALID_ID, invalid));\n return;\n }\n }\n var manifest = new Manifest(customManifestId);\n var promise;\n if (manifestStr) {\n promise = manifest.loadWithManifest(manifestUrl, manifestStr);\n } else {\n promise = manifest.load(manifestUrl);\n }\n promise.then(function () {\n if (useCustomId) {\n canCreateManifest(customManifestId).then(function () {\n api.manifestController.cacheManifest(manifest);\n onSuccess(manifest.getJsonInfo());\n }, function (err) {\n onFailure(translation.getError(translation.e.manifests.FOLDER_ALREADY_EXISTS, customManifestId), err);\n });\n } else {\n api.manifestController.cacheManifest(manifest);\n onSuccess(manifest.getJsonInfo());\n }\n }, function (err) {\n onFailure(translation.getError(translation.e.manifests.LOADING_FAILED, manifestUrl), err);\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUzOS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxRQUFRLEdBQUdDLDZDQUFrRDtBQUNuRSxJQUFNQyxXQUFXLEdBQUdELG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN0RCxJQUFNRSxpQkFBaUIsR0FBR0YsbUJBQU8sQ0FBQyxJQUFnQyxDQUFDO0FBQ25FLElBQU1HLGNBQWMsR0FBR0gsbUJBQU8sQ0FBQyxJQUE2QixDQUFDO0FBQzdELElBQU1JLFdBQVcsR0FBR0osbUJBQU8sQ0FBQyxJQUFvQixDQUFDO0FBRWpESyxNQUFNLENBQUNDLE9BQU8sR0FBRyxVQUFVQyxHQUFHLEVBQUVDLFNBQVMsRUFBRUMsU0FBUyxFQUFFQyxNQUFNLEVBQUVDLFdBQVcsRUFBRUMsZ0JBQWdCLEVB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uICAgIG9uRmFpbHVyZSh0cmFuc2xhdGlvbi5nZXRFcnJvcih0cmFuc2xhdGlvbi5lLm1hbmlmZXN0cy5MT0FESU5HX0ZBSUxFRCwgbWFuaWZlc3RVcmwpLCBlcnIpO1xuICB9KTtcbn07XG4iXSwibmFtZXMiOlsiTWFuaWZlc3QiLCJyZXF1aXJlIiwidHJhbnNsYXRpb24iLCJjYW5DcmVhdGVNYW5pZmVzdCIsImdldEludmFsaWREaWZmIiwiYXBwU2V0dGluZ3MiLCJtb2R1bGUiLCJleHBvcnRzIiwiYXBpIiwib25TdWNjZXNzIiwib25GYWlsdXJlIiwidGFyZ2V0IiwibWFuaWZlc3RVcmwiLCJjdXN0b21NYW5pZmVzdElkIiwibWFuaWZlc3RTdHIiLCJ1c2VDdXN0b21JZCIsImdldEVycm9yIiwiZSIsIm1hbmlmZXN0cyIsIklOVkFMSURfSUQiLCJjdXN0b21NYW5pZmVzdElkRm9sZGVyUmVnZXgiLCJnZXRTZXR0aW5ncyIsIm1hdGNoIiwiaW52YWxpZCIsIm9wZW5pbmdUYWdGb3JJbnZhbGlkQ3VzdG9tTWFuaWZlc3RJZENoYXJhY3RlciIsImNsb3NpbmdUYWdGb3JJbnZhbGlkQ3VzdG9tTWFuaWZlc3RJZENoYXJhY3RlciIsIm1hbmlmZXN0IiwicHJvbWlzZSIsImxvYWRXaXRoTWFuaWZlc3QiLCJsb2FkIiwidGhlbiIsIm1hbmlmZXN0Q29udHJvbGxlciIsImNhY2hlTWFuaWZlc3QiLCJnZXRKc29uSW5mbyIsImVyciIsIkZPTERFUl9BTFJFQURZX0VYSVNUUyIsIkxPQURJTkdfRkFJTEVEIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1539\n')},3761:module=>{"use strict";eval("\n\nmodule.exports = function (api, onSuccess /*, onFailure, target, manifestId */) {\n onSuccess();\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc2MS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYkEsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLENBQUMsc0NBQXNDO0VBQzlFQSxTQUFTLENBQUMsQ0FBQztBQUNiLENBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9kb3duc3RyZWFtLWVsZWN0cm9uLy4vYXBpL2JlLW1ldGhvZHMvZG93bmxvYWRzL2NyZWF0ZVBlcnNpc3RlbnQuanM/ZWFkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYXBpLCBvblN1Y2Nlc3MgLyosIG9uRmFpbHVyZSwgdGFyZ2V0LCBtYW5pZmVzdElkICovKSB7XG4gIG9uU3VjY2VzcygpO1xufTtcbiJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiYXBpIiwib25TdWNjZXNzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3761\n")},9500:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId) {\n api.offlineController.getManifestFolderInfo(manifestId, function (err, info) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.INFO_FAILED, manifestId), err);\n } else {\n onSuccess(info);\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTUwMC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUV0REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRU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nlc3MoaW5mbyk7XG4gICAgfVxuICB9KTtcbn07XG4iXSwibmFtZXMiOlsidHJhbnNsYXRpb24iLCJyZXF1aXJlIiwibW9kdWxlIiwiZXhwb3J0cyIsImFwaSIsIm9uU3VjY2VzcyIsIm9uRmFpbHVyZSIsInRhcmdldCIsIm1hbmlmZXN0SWQiLCJvZmZsaW5lQ29udHJvbGxlciIsImdldE1hbmlmZXN0Rm9sZGVySW5mbyIsImVyciIsImluZm8iLCJnZXRFcnJvciIsImUiLCJtYW5pZmVzdHMiLCJJTkZPX0ZBSUxFRCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///9500\n")},2893:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure, target, full) {\n api.offlineController.getManifestsListWithInfo(function (err, list) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.LIST_LOADING_FAILED), err);\n } else {\n onSuccess(list);\n }\n }, full);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg5My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUV0REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxJQUFJLEVBQUU7RUFDbEVKLEdBQUcsQ0FBQ0ssaUJBQWlCLENBQUNDLHdCQUF3QixDQUFDLFVBQVVDLEdBQUcsRUFBRUMsSUFBSSxFQUFFO0lBQ2xFLElBQUlELEdBQUcsRUFBRTtNQUNQTCxTQUFTLENBQUNOLFdBQVcsQ0FBQ2EsUUFBUSxDQUFDYixXQUFXLENBQUNjLENBQUMsQ0FBQ0MsU0FBUyxDQUFDQyxtQ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HMiLCJMSVNUX0xPQURJTkdfRkFJTEVEIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2893\n")},8831:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure) {\n api.offlineController.getManifestsList(function (err, list) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.LIST_LOADING_FAILED), err);\n } else {\n onSuccess(list);\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODgzMS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUV0REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRTtFQUNwREYsR0FBRyxDQUFDRyxpQkFBaUIsQ0FBQ0MsZ0JBQWdCLENBQUMsVUFBVUMsR0FBRyxFQUFFQyxJQUFJLEVBQUU7SUFDMUQsSUFBSUQsR0FBRyxFQUFFO01BQ1BILFNBQVMsQ0FBQ04sV0FBVyxDQUFDVyxRQUFRLENBQUNYLFdBQVcsQ0FBQ1ksQ0FBQyxDQUFDQyxTQUFTLENBQUNDLG1CQUFtQixDQUFDLEVBQUVMLEdBQUcsQ0FBQztJQUNuRixDQUFDLE1BQU07TUFDTEosU0FBUyxDQUFDSyxJQUFJLENBQUM7SUFDakI7RUFDRixDQUFDLENBQUM7QUFDSixDQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vZG93bnN0cmVhbS1lbGVjdHJvbi8uL2FwaS9iZS1tZXRob2RzL2Rvd25sb2Fkcy9nZXQtbGlzdC5qcz8zZmI1Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5jb25zdCB0cmFuc2xhdGlvbiA9IHJlcXVpcmUoJy4uLy4uL3RyYW5zbGF0aW9uL2luZGV4Jyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGFwaSwgb25TdWNjZXNzLCBvbkZhaWx1cmUpIHtcbiAgYXBpLm9mZmxpbmVDb250cm9sbGVyLmdldE1hbmlmZXN0c0xpc3QoZnVuY3Rpb24gKGVyciwgbGlzdCkge1xuICAgIGlmIChlcnIpIHtcbiAgICAgIG9uRmFpbHVyZSh0cmFuc2xhdGlvbi5nZXRFcnJvcih0cmFuc2xhdGlvbi5lLm1hbmlmZXN0cy5MSVNUX0xPQURJTkdfRkFJTEVEKSwgZXJyKTtcbiAgICB9IGVsc2Uge1xuICAgICAgb25TdWNjZXNzKGxpc3QpO1xuICAgIH1cbiAgfSk7XG59O1xuIl0sIm5hbWVzIjpbInRyYW5zbGF0aW9uIiwicmVxdWlyZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJvZmZsaW5lQ29udHJvbGxlciIsImdldE1hbmlmZXN0c0xpc3QiLCJlcnIiLCJsaXN0IiwiZ2V0RXJyb3IiLCJlIiwibWFuaWZlc3RzIiwiTElTVF9MT0FESU5HX0ZBSUxFRCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8831\n")},1536:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId) {\n api.offlineController.getManifestInfo(manifestId, function (err, info) {\n if (err) {\n onFailure(translation.getError(translation.e.downloads._GENERAL), err);\n } else {\n onSuccess({\n offlineLink: api.getOfflinePath(manifestId) + info.manifest.name,\n persistent: info.persistent\n });\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUzNi5qcyIsIm1hcHBp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RhcmdldCwgbWFuaWZlc3RJZCkge1xuICBhcGkub2ZmbGluZUNvbnRyb2xsZXIuZ2V0TWFuaWZlc3RJbmZvKG1hbmlmZXN0SWQsIGZ1bmN0aW9uIChlcnIsIGluZm8pIHtcbiAgICBpZiAoZXJyKSB7XG4gICAgICBvbkZhaWx1cmUodHJhbnNsYXRpb24uZ2V0RXJyb3IodHJhbnNsYXRpb24uZS5kb3dubG9hZHMuX0dFTkVSQUwpLCBlcnIpO1xuICAgIH0gZWxzZSB7XG4gICAgICBvblN1Y2Nlc3Moe1xuICAgICAgICBvZmZsaW5lTGluazogYXBpLmdldE9mZmxpbmVQYXRoKG1hbmlmZXN0SWQpICsgaW5mby5tYW5pZmVzdC5uYW1lLFxuICAgICAgICBwZXJzaXN0ZW50OiBpbmZvLnBlcnNpc3RlbnRcbiAgICAgIH0pO1xuICAgIH1cbiAgfSk7XG59O1xuIl0sIm5hbWVzIjpbInRyYW5zbGF0aW9uIiwicmVxdWlyZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJtYW5pZmVzdElkIiwib2ZmbGluZUNvbnRyb2xsZXIiLCJnZXRNYW5pZmVzdEluZm8iLCJlcnIiLCJpbmZvIiwiZ2V0RXJyb3IiLCJlIiwiZG93bmxvYWRzIiwiX0dFTkVSQUwiLCJvZmZsaW5lTGluayIsImdldE9mZmxpbmVQYXRoIiwibWFuaWZlc3QiLCJuYW1lIiwicGVyc2lzdGVudCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1536\n")},4134:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId, full) {\n api.offlineController.getManifestInfo(manifestId, function (err, info) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.INFO_FAILED, manifestId), err);\n } else {\n onSuccess(info);\n }\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cbiAgYXBpLm9mZmxpbmVDb250cm9sbGVyLmdldE1hbmlmZXN0SW5mbyhtYW5pZmVzdElkLCBmdW5jdGlvbiAoZXJyLCBpbmZvKSB7XG4gICAgaWYgKGVycikge1xuICAgICAgb25GYWlsdXJlKHRyYW5zbGF0aW9uLmdldEVycm9yKHRyYW5zbGF0aW9uLmUubWFuaWZlc3RzLklORk9fRkFJTEVELCBtYW5pZmVzdElkKSwgZXJyKTtcbiAgICB9IGVsc2Uge1xuICAgICAgb25TdWNjZXNzKGluZm8pO1xuICAgIH1cbiAgfSwgZnVsbCk7XG59O1xuIl0sIm5hbWVzIjpbInRyYW5zbGF0aW9uIiwicmVxdWlyZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJtYW5pZmVzdElkIiwiZnVsbCIsIm9mZmxpbmVDb250cm9sbGVyIiwiZ2V0TWFuaWZlc3RJbmZvIiwiZXJyIiwiaW5mbyIsImdldEVycm9yIiwiZSIsIm1hbmlmZXN0cyIsIklORk9fRkFJTEVEIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4134\n")},8663:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nvar STATUSES = __webpack_require__(9773);\nmodule.exports = function (api, onSuccess, onFailure) {\n api.offlineController.getManifestsListWithInfo(function (err, results) {\n if (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_ALL_UNFINISHED_FAILED), err);\n } else {\n var promises = [];\n var manifestIds = [];\n if (!results.length) {\n onFailure(translation.getError(translation.e.downloads.ALREADY_REMOVED_ALL_UNFINISHED));\n return;\n }\n for (var i = 0, j = results.length; i < j; i++) {\n var status = results[i].status;\n var manifestId = results[i].manifestInfo.id;\n if (status !== STATUSES.FINISHED) {\n manifestIds.push(manifestId);\n promises.push(api.downloadsController.removePromise(manifestId));\n }\n }\n Promise.all(promises).then(function () {\n var promises = [];\n for (var _i = 0, _j = manifestIds.length; _i < _j; _i++) {\n promises.push(api.offlineController.removePromise(manifestIds[_i]));\n }\n Promise.all(promises).then(function () {\n api.subscribersController.unsubscribe(manifestIds);\n api.manifestController.removeFromCache(manifestIds);\n onSuccess(manifestIds);\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_ALL_UNFINISHED_FAILED), err);\n });\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_ALL_UNFINISHED_FAILED), err);\n });\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODY2My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN0RCxJQUFNQyxRQUFRLEdBQUdELG1CQUFPLENBQUMsSUFBMEIsQ0FBQztBQUVwREUsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRTtFQUNwREYsR0FBRyxDQUFDRyxpQkFBaUIsQ0FBQ0Msd0JBQXdCLENBQUMsVUFBVUMsR0FBRyxFQUFFQyxPQUFPLEVBQUU7SUFDckUsSUFBSUQsR0FBRyxFQUFFO01BQ1BILFNBQVMsQ0FBQ1AsV0FBVyxDQUFDWSxRQUFRLENBQUNaLFdBQVcsQ0FBQ2EsQ0FBQyxDQUFDQyxTQUFTLENBQUNDLDhCQUE4QixDQUFDLEVBQUVMLEdBQUcsQ0FBQztJQUM5RixDQUFDLE1BQU07TUFDTCxJQUFJTSxRQUFRLEdBQUcsRUFBRTtNQUNqQixJQUFJQyxXQUFXLEdBQUcsRUFBRTtNQUNwQixJQUFJLENBQUNOLE9BQU8sQ0FBQ08sTUFBTSxFQUFFO1FBQ25CWCxTQUFTLENBQUNQLFdBQVcsQ0FBQ1ksUU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hwb3J0cyIsImFwaSIsIm9uU3VjY2VzcyIsIm9uRmFpbHVyZSIsIm9mZmxpbmVDb250cm9sbGVyIiwiZ2V0TWFuaWZlc3RzTGlzdFdpdGhJbmZvIiwiZXJyIiwicmVzdWx0cyIsImdldEVycm9yIiwiZSIsImRvd25sb2FkcyIsIlJFTU9WSU5HX0FMTF9VTkZJTklTSEVEX0ZBSUxFRCIsInByb21pc2VzIiwibWFuaWZlc3RJZHMiLCJsZW5ndGgiLCJBTFJFQURZX1JFTU9WRURfQUxMX1VORklOSVNIRUQiLCJpIiwiaiIsInN0YXR1cyIsIm1hbmlmZXN0SWQiLCJtYW5pZmVzdEluZm8iLCJpZCIsIkZJTklTSEVEIiwicHVzaCIsImRvd25sb2Fkc0NvbnRyb2xsZXIiLCJyZW1vdmVQcm9taXNlIiwiUHJvbWlzZSIsImFsbCIsInRoZW4iLCJzdWJzY3JpYmVyc0NvbnRyb2xsZXIiLCJ1bnN1YnNjcmliZSIsIm1hbmlmZXN0Q29udHJvbGxlciIsInJlbW92ZUZyb21DYWNoZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8663\n")},1853:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure) {\n api.offlineController.getManifestsListWithInfo(function (err, manifests) {\n if (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_ALL_FAILED), err);\n } else {\n var manifestIds = manifests.map(function (manifest) {\n return manifest.manifestInfo.id;\n });\n var promises = [];\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n promises.push(api.downloadsController.removePromise(manifestIds[i]));\n }\n Promise.all(promises).then(function () {\n api.offlineController.removeAllPromise().then(function () {\n api.subscribersController.unsubscribeAll();\n api.manifestController.removeFromCacheAll();\n onSuccess(manifests);\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_ALL_FAILED), err);\n });\n }, function (err) {\n onFailure(translation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J9\n//# sourceURL=webpack-internal:///1853\n")},5585:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar appSettings = __webpack_require__(8557);\nvar translation = __webpack_require__(5847);\nvar removeDir = __webpack_require__(943);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId) {\n api.offlineController.getManifestInfo(manifestId, function (err, info) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId), err);\n } else {\n var file = appSettings.getSettings().settingsFolder + manifestId + "/" + appSettings.getSettings().stores.PERSISTENT + ".json";\n removeDir(file, function (err) {\n if (err && err.code !== "ENOENT") {\n onFailure(translation.getError(translation.e.downloads.REMOVING_PERSISTENT_FAILED, manifestId), err);\n } else {\n onSuccess(info);\n }\n });\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTU4NS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBb0IsQ0FBQztBQUNqRCxJQUFNQyxXQUFXLEdBQUdELG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN0RCxJQUFNRSxTQUFTLEdBQUdGLG1CQUFPLENBQUMsR0FBdUIsQ0FBQztBQUVsREcsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxVQUFVLEVBQUU7RUFDeEVKLEdBQUcsQ0FBQ0ssaUJBQWlCLENBQUNDLGVBQWUsQ0FBQ0YsVUFBVSxFQUFFLFVBQVVHLEdBQUcsRUFBRUMsSUFBSSxFQUFFO0lBQ3JFLElBQUlELEdBQUcsRUFBRTtNQUNQTCxTQUFTLENBQUNOLFdBQVcsQ0FBQ2EsUUFBUSxDQUFDYixXQUFXLENBQUNjLENBQUMsQ0FBQ0MsU0FBUyxDQU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cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJtYW5pZmVzdElkIiwib2ZmbGluZUNvbnRyb2xsZXIiLCJnZXRNYW5pZmVzdEluZm8iLCJlcnIiLCJpbmZvIiwiZ2V0RXJyb3IiLCJlIiwibWFuaWZlc3RzIiwiTk9UX0ZPVU5EIiwiZmlsZSIsImdldFNldHRpbmdzIiwic2V0dGluZ3NGb2xkZXIiLCJzdG9yZXMiLCJQRVJTSVNURU5UIiwiY29kZSIsImRvd25sb2FkcyIsIlJFTU9WSU5HX1BFUlNJU1RFTlRfRkFJTEVEIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5585\n')},9858:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId) {\n api.offlineController.getManifestInfo(manifestId, function (err, info) {\n api.downloadsController.removePromise(manifestId).then(function () {\n api.offlineController.removePromise(manifestId).then(function () {\n api.subscribersController.unsubscribe(manifestId);\n api.manifestController.removeFromCache(manifestId);\n onSuccess(info);\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_FAILED, manifestId), err);\n });\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.REMOVING_FAILED, manifestId), err);\n });\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTg1OC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUV0REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxVQUFVLEVBQUU7RUFDeEVKLEdBQUcsQ0FBQ0ssaUJBQWlC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XRpb24uZS5kb3dubG9hZHMuUkVNT1ZJTkdfRkFJTEVELCBtYW5pZmVzdElkKSwgZXJyKTtcbiAgICAgICAgfSk7XG4gIH0pO1xufTtcbiJdLCJuYW1lcyI6WyJ0cmFuc2xhdGlvbiIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiYXBpIiwib25TdWNjZXNzIiwib25GYWlsdXJlIiwidGFyZ2V0IiwibWFuaWZlc3RJZCIsIm9mZmxpbmVDb250cm9sbGVyIiwiZ2V0TWFuaWZlc3RJbmZvIiwiZXJyIiwiaW5mbyIsImRvd25sb2Fkc0NvbnRyb2xsZXIiLCJyZW1vdmVQcm9taXNlIiwidGhlbiIsInN1YnNjcmliZXJzQ29udHJvbGxlciIsInVuc3Vic2NyaWJlIiwibWFuaWZlc3RDb250cm9sbGVyIiwicmVtb3ZlRnJvbUNhY2hlIiwiZ2V0RXJyb3IiLCJlIiwiZG93bmxvYWRzIiwiUkVNT1ZJTkdfRkFJTEVEIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9858\n")},179:module=>{"use strict";eval("\n\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId, representations) {\n api.downloadsController.resume(manifestId, representations, onSuccess, onFailure);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTc5LmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViQSxNQUFNLENBQUNDLE9BQU8sR0FBRyxVQUFVQyxHQUFHLEVBQUVDLFNBQVMsRUFBRUMsU0FBUyxFQUFFQyxNQUFNLEVBQUVDLFVBQVUsRUFBRUMsZUFBZSxFQUFFO0VBQ3pGTCxHQUFHLENBQUNNLG1CQUFtQixDQUFDQyxNQUFNLENBQUNILFVBQVUsRUFBRUMsZUFBZSxFQUFFSixTQUFTLEVBQUVDLFNBQVMsQ0FBQztBQUNuRixDQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vZG93bnN0cmVhbS1lbGVjdHJvbi8uL2FwaS9iZS1tZXRob2RzL2Rvd25sb2Fkcy9yZXN1bWUuanM/ODM4OSJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYXBpLCBvblN1Y2Nlc3MsIG9uRmFpbHVyZSwgdGFyZ2V0LCBtYW5pZmVzdElkLCByZXByZXNlbnRhdGlvbnMpIHtcbiAgYXBpLmRvd25sb2Fkc0NvbnRyb2xsZXIucmVzdW1lKG1hbmlmZXN0SWQsIHJlcHJlc2VudGF0aW9ucywgb25TdWNjZXNzLCBvbkZhaWx1cmUpO1xufTtcbiJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiYXBpIiwib25TdWNjZXNzIiwib25GYWlsdXJlIiwidGFyZ2V0IiwibWFuaWZlc3RJZCIsInJlcHJlc2VudGF0aW9ucyIsImRvd25sb2Fkc0NvbnRyb2xsZXIiLCJyZXN1bWUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///179\n")},6162:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar appSettings = __webpack_require__(8557);\nvar translation = __webpack_require__(5847);\nvar FlushItem = __webpack_require__(8381);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId, data) {\n api.offlineController.getManifestInfo(manifestId, function (err) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId), err);\n } else {\n var flushItem = new FlushItem(manifestId, appSettings.getSettings().stores.DATA, data);\n flushItem.save().then(function () {\n onSuccess();\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.SAVING_DATA_FAILED, manifestId), err);\n });\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjE2Mi5qcyIsIm1hcHBpbmdzIjoiQUFBY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gICAgICAgfSwgZnVuY3Rpb24gKGVycikge1xuICAgICAgICAgIG9uRmFpbHVyZSh0cmFuc2xhdGlvbi5nZXRFcnJvcih0cmFuc2xhdGlvbi5lLmRvd25sb2Fkcy5TQVZJTkdfREFUQV9GQUlMRUQsIG1hbmlmZXN0SWQpLCBlcnIpO1xuICAgICAgICB9KTtcbiAgICB9XG4gIH0pO1xuXG59O1xuIl0sIm5hbWVzIjpbImFwcFNldHRpbmdzIiwicmVxdWlyZSIsInRyYW5zbGF0aW9uIiwiRmx1c2hJdGVtIiwibW9kdWxlIiwiZXhwb3J0cyIsImFwaSIsIm9uU3VjY2VzcyIsIm9uRmFpbHVyZSIsInRhcmdldCIsIm1hbmlmZXN0SWQiLCJkYXRhIiwib2ZmbGluZUNvbnRyb2xsZXIiLCJnZXRNYW5pZmVzdEluZm8iLCJlcnIiLCJnZXRFcnJvciIsImUiLCJtYW5pZmVzdHMiLCJOT1RfRk9VTkQiLCJmbHVzaEl0ZW0iLCJnZXRTZXR0aW5ncyIsInN0b3JlcyIsIkRBVEEiLCJzYXZlIiwidGhlbiIsImRvd25sb2FkcyIsIlNBVklOR19EQVRBX0ZBSUxFRCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///6162\n")},3831:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar appSettings = __webpack_require__(8557);\nvar translation = __webpack_require__(5847);\nvar FlushItem = __webpack_require__(8381);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId, persistent) {\n api.offlineController.getManifestInfo(manifestId, function (err) {\n if (err) {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId), err);\n } else {\n var flushItem = new FlushItem(manifestId, appSettings.getSettings().stores.PERSISTENT, persistent);\n flushItem.save().then(function () {\n onSuccess();\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.SAVING_PERSISTENT_FAILED, manifestId), err);\n });\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application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c2lzdGVudCk7XG4gICAgICBmbHVzaEl0ZW0uc2F2ZSgpXG4gICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgb25TdWNjZXNzKCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24gKGVycikge1xuICAgICAgICAgICAgb25GYWlsdXJlKHRyYW5zbGF0aW9uLmdldEVycm9yKHRyYW5zbGF0aW9uLmUuZG93bmxvYWRzLlNBVklOR19QRVJTSVNURU5UX0ZBSUxFRCwgbWFuaWZlc3RJZCksIGVycik7XG4gICAgICAgICAgfSk7XG4gICAgfVxuICB9KTtcblxufTtcbiJdLCJuYW1lcyI6WyJhcHBTZXR0aW5ncyIsInJlcXVpcmUiLCJ0cmFuc2xhdGlvbiIsIkZsdXNoSXRlbSIsIm1vZHVsZSIsImV4cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJtYW5pZmVzdElkIiwicGVyc2lzdGVudCIsIm9mZmxpbmVDb250cm9sbGVyIiwiZ2V0TWFuaWZlc3RJbmZvIiwiZXJyIiwiZ2V0RXJyb3IiLCJlIiwibWFuaWZlc3RzIiwiTk9UX0ZPVU5EIiwiZmx1c2hJdGVtIiwiZ2V0U2V0dGluZ3MiLCJzdG9yZXMiLCJQRVJTSVNURU5UIiwic2F2ZSIsInRoZW4iLCJkb3dubG9hZHMiLCJTQVZJTkdfUEVSU0lTVEVOVF9GQUlMRUQiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///3831\n")},1714:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nvar canCreateManifest = __webpack_require__(1958);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId, representations, downloadFolder) {\n var manifest = api.manifestController.getManifestById(manifestId);\n if (!manifest) {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n return;\n }\n function start() {\n api.downloadsController.storage.getItem(manifestId).then(function (result) {\n if (result) {\n onFailure(translation.getError(translation.e.downloads.ALREADY_STARTED, manifestId));\n } else {\n api.downloadsController.start(manifestId, representations, downloadFolder, onSuccess, function (err) {\n onFailure(translation.getError(translation.e.downloads._GENERAL), err);\n });\n }\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads._GENERAL), err);\n });\n }\n canCreateManifest(manifestId, downloadFolder).then(function () {\n start();\n }, function (errors) {\n errors = errors || [];\n var movieFolderError = errors[1];\n if (errors.length) {\n if (movieFolderError) {\n // if movie folder has been already created the we can't start as it might be either different folder\n // or simply the resume should be used\n onFailure(translation.getError(translation.e.manifests.FOLDER_ALREADY_EXISTS, manifestId));\n return;\n }\n }\n // if manifest exists physically on drive that means something is wrong and can't start the manifest\n // the manifest is saved in method start so this cannot be overwritten here\n api.offlineController.getManifestDataFile(manifestId, function (data) {\n if (data) {\n onFailure(translation.getError(translation.e.manifests.FOLDER_ALREADY_EXISTS, manifestId));\n } else {\n start();\n }\n });\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcxNC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN0RCxJQUFNQyxpQkFBaUIsR0FBR0QsbUJBQU8sQ0FBQyxJQUFnQyxDQUFDO0FBRW5FRSxNQUFNLENBQUNDLE9BQU8sR0FBRyxVQUFVQyxHQUFHLEVBQUVDLFNBQVMsRUFBRUMsU0FBUyxFQUFFQyxNQUFNLEVBQUVDLFVBQVUsRUFBRUMsZUFBZSxFQUFFQyxjQUFjLEVBQUU7RUFDekcsSUFBTUMsUUFBUSxHQUFHUCxHQUFHLENBQUNRLGtCQUFrQixDQUFDQyxlQUFlLENBQUNMLFVBQVUsQ0FBQztFQUNuRSxJQUFJLENBQUNHLFFBQVEsRUFBRTtJQUNiTCxTQU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jZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1714\n")},5984:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nvar STATUSES = __webpack_require__(9773);\nmodule.exports = function (api, onSuccess, onFailure) {\n api.offlineController.getManifestsListWithInfo(function (err, results) {\n if (err) {\n onFailure(translation.getError(translation.e.downloads.STOPPING_ALL_FAILED), err);\n } else {\n var promises = [];\n var manifestIds = [];\n for (var i = 0, j = results.length; i < j; i++) {\n var status = results[i].status;\n var manifestId = results[i].manifestInfo.id;\n if (status !== STATUSES.FINISHED) {\n manifestIds.push(manifestId);\n promises.push(api.downloadsController.stopPromise(manifestId, true));\n }\n }\n if (manifestIds.length > 0) {\n Promise.all(promises).then(function () {\n onSuccess(manifestIds);\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.STOPPING_ALL_FAILED), err);\n });\n } else {\n onFailure(translation.getError(translation.e.downloads.ALREADY_STOPPED_ALL));\n }\n }\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTk4NC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN0RCxJQUFNQyxRQUFRLEdBQUdELG1CQUFPLENBQUMsSUFBMEIsQ0FBQztBQUVwREUsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRTtFQUNwREYsR0FBRyxDQUFDRyxpQkFBaUIsQ0FBQ0Msd0JBQXdCLENBQUMsVUFBVUMsR0FBRyxFQUFFQyxPQUFPLEVBQUU7SUFDckUsSUFBSUQsR0FBRyxFQUFFO01BQ1BILFNBQVMsQ0FBQ1AsV0FBVyxDQUFDWSxRQUFRLENBQUNaLFdBQVcsQ0FBQ2EsQ0FBQyxD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JyIiwicmVzdWx0cyIsImdldEVycm9yIiwiZSIsImRvd25sb2FkcyIsIlNUT1BQSU5HX0FMTF9GQUlMRUQiLCJwcm9taXNlcyIsIm1hbmlmZXN0SWRzIiwiaSIsImoiLCJsZW5ndGgiLCJzdGF0dXMiLCJtYW5pZmVzdElkIiwibWFuaWZlc3RJbmZvIiwiaWQiLCJGSU5JU0hFRCIsInB1c2giLCJkb3dubG9hZHNDb250cm9sbGVyIiwic3RvcFByb21pc2UiLCJQcm9taXNlIiwiYWxsIiwidGhlbiIsIkFMUkVBRFlfU1RPUFBFRF9BTEwiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///5984\n")},4573:module=>{"use strict";eval("\n\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId) {\n api.downloadsController.stop(manifestId, onSuccess, onFailure);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU3My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYkEsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxVQUFVLEVBQUU7RUFDeEVKLEdBQUcsQ0FBQ0ssbUJBQW1CLENBQUNDLElBQUksQ0FBQ0YsVUFBVSxFQUFFSCxTQUFTLEVBQUVDLFNBQVMsQ0FBQztBQUNoRSxDQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vZG93bnN0cmVhbS1lbGVjdHJvbi8uL2FwaS9iZS1tZXRob2RzL2Rvd25sb2Fkcy9zdG9wLmpzPzM0NjQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGFwaSwgb25TdWNjZXNzLCBvbkZhaWx1cmUsIHRhcmdldCwgbWFuaWZlc3RJZCkge1xuICBhcGkuZG93bmxvYWRzQ29udHJvbGxlci5zdG9wKG1hbmlmZXN0SWQsIG9uU3VjY2Vzcywgb25GYWlsdXJlKTtcbn07XG4iXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsImFwaSIsIm9uU3VjY2VzcyIsIm9uRmFpbHVyZSIsInRhcmdldCIsIm1hbmlmZXN0SWQiLCJkb3dubG9hZHNDb250cm9sbGVyIiwic3RvcCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///4573\n")},8973:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nvar Subscriber = __webpack_require__(2595);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestIds, timeout) {\n if (typeof manifestIds === 'string') {\n subscribeSingle(api, onSuccess, onFailure, target, manifestIds, timeout);\n } else {\n subscribeMany(api, onSuccess, onFailure, target, manifestIds, timeout);\n }\n};\nfunction subscribeMany(api, onSuccess, onFailure, target, manifestIds, timeout) {\n var subscriber1, subscriber2, subscribersId;\n var manifestId = manifestIds.sort().join(',');\n subscribersId = [];\n // callbackOnProgress\n subscriber1 = new Subscriber(function () {\n return api.downloadsController.downloadStats.getStats(manifestIds);\n }, api.processSubscriber, target, manifestId, timeout);\n subscribersId.push(api.subscribersController.addSubscriber(subscriber1));\n\n // callbackOnFinish\n subscriber2 = new Subscriber(function () {\n var result = true;\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n result = result && api.downloadsController.isDownloadFinishedAndSynced(manifestIds[i]);\n }\n return result;\n }, api.processSubscriber, target, manifestId, timeout, true);\n subscriber2.onFinish(function (callback) {\n subscriber1.remove();\n var items = [];\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n items.push(api.offlineController.getManifestInfoPromise(manifestIds[i]));\n }\n Promise.all(items).then(function (results) {\n callback(null, results);\n }, function (err) {\n callback(err);\n });\n });\n subscribersId.push(api.subscribersController.addSubscriber(subscriber2));\n onSuccess(null, subscribersId);\n}\nfunction subscribeSingle(api, onSuccess, onFailure, target, manifestId, timeout) {\n var manifest = api.manifestController.getManifestById(manifestId);\n var subscriber1, subscriber2, subscribersId;\n if (manifest) {\n subscribersId = [];\n\n // callbackOnProgress\n subscriber1 = new Subscriber(function () {\n return api.downloadsController.downloadStats.getStats(manifestId);\n }, api.processSubscriber, target, manifestId, timeout);\n subscribersId.push(api.subscribersController.addSubscriber(subscriber1));\n\n // callbackOnFinish\n subscriber2 = new Subscriber(function () {\n return api.downloadsController.isDownloadFinishedAndSynced(manifestId);\n }, api.processSubscriber, target, manifestId, timeout, true);\n subscriber2.onFinish(function (callback) {\n subscriber1.remove();\n api.offlineController.getManifestInfo(manifestId, function (err, result) {\n callback(err, result);\n });\n });\n subscribersId.push(api.subscribersController.addSubscriber(subscriber2));\n onSuccess(manifest.getJsonInfo(), subscribersId);\n } else {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODk3My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN0RCxJQUFNQyxVQUFVLEdBQUdELG1CQUFPLENBQUMsSUFBdUIsQ0FBQztBQUVuREUsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxXQUFXLEVBQUVDLE9BQU8sRUFBRTtFQUNsRixJQUFJLE9BQU9ELFdBQVcsS0FBSyxRQUFRLEVBQUU7SUFDbkNFLGVBQWUsQ0FBQ04sR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxXQUFXLEVBQUVDLE9BQU8sQ0FBQztFQUMxRSxDQUFDLE1BQU07SUFD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IiwiY2FsbGJhY2siLCJyZW1vdmUiLCJpdGVtcyIsIm9mZmxpbmVDb250cm9sbGVyIiwiZ2V0TWFuaWZlc3RJbmZvUHJvbWlzZSIsIlByb21pc2UiLCJhbGwiLCJ0aGVuIiwicmVzdWx0cyIsImVyciIsIm1hbmlmZXN0IiwibWFuaWZlc3RDb250cm9sbGVyIiwiZ2V0TWFuaWZlc3RCeUlkIiwiZ2V0TWFuaWZlc3RJbmZvIiwiZ2V0SnNvbkluZm8iLCJnZXRFcnJvciIsImUiLCJtYW5pZmVzdHMiLCJOT1RfRk9VTkQiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///8973\n")},5934:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar translation = __webpack_require__(5847);\nmodule.exports = function (api, onSuccess, onFailure, target, manifestIds) {\n if (typeof manifestIds === 'string') {\n unsubscribeSingle(api, onSuccess, onFailure, target, manifestIds);\n } else {\n api.subscribersController.unsubscribe(manifestIds);\n api.subscribersController.unsubscribe(manifestIds.sort().join(','));\n }\n};\nfunction unsubscribeSingle(api, onSuccess, onFailure, target, manifestId) {\n var manifest = api.manifestController.getManifestById(manifestId);\n if (manifest) {\n api.subscribersController.unsubscribe(manifestId);\n onSuccess();\n } else {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTkzNC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxXQUFXLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUV0REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxXQUFXLEVBQUU7RUFDekUsSUFBSSxPQUFPQSxXQUFXLEtBQUssUUFBUSxFQUF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nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJtYW5pZmVzdElkcyIsInVuc3Vic2NyaWJlU2luZ2xlIiwic3Vic2NyaWJlcnNDb250cm9sbGVyIiwidW5zdWJzY3JpYmUiLCJzb3J0Iiwiam9pbiIsIm1hbmlmZXN0SWQiLCJtYW5pZmVzdCIsIm1hbmlmZXN0Q29udHJvbGxlciIsImdldE1hbmlmZXN0QnlJZCIsImdldEVycm9yIiwiZSIsIm1hbmlmZXN0cyIsIk5PVF9GT1VORCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5934\n")},15:module=>{"use strict";eval("\n\nmodule.exports = function (api, onSuccess, onFailure, target, manifestId, downloadFolder) {\n api.downloadsController.updateDownloadFolder(manifestId, downloadFolder, onSuccess, onFailure);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWJBLE1BQU0sQ0FBQ0MsT0FBTyxHQUFHLFVBQVVDLEdBQUcsRUFBRUMsU0FBUyxFQUFFQyxTQUFTLEVBQUVDLE1BQU0sRUFBRUMsVUFBVSxFQUFFQyxjQUFjLEVBQUU7RUFDeEZMLEdBQUcsQ0FBQ00sbUJBQW1CLENBQUNDLG9CQUFvQixDQUFDSCxVQUFVLEVBQUVDLGNBQWMsRUFBRUosU0FBUyxFQUFFQyxTQUFTLENBQUM7QUFDaEcsQ0FBQyIsInNvdXJjZXMiOlsid2VicGFjazovL2Rvd25zdHJlYW0tZWxlY3Ryb24vLi9hcGkvYmUtbWV0aG9kcy9kb3dubG9hZHMvdXBkYXRlLWRvd25sb2FkLWZvbGRlci5qcz8zMjNmIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChhcGksIG9uU3VjY2Vzcywgb25GYWlsdXJlLCB0YXJnZXQsIG1hbmlmZXN0SWQsIGRvd25sb2FkRm9sZGVyKSB7XG4gIGFwaS5kb3dubG9hZHNDb250cm9sbGVyLnVwZGF0ZURvd25sb2FkRm9sZGVyKG1hbmlmZXN0SWQsIGRvd25sb2FkRm9sZGVyLCBvblN1Y2Nlc3MsIG9uRmFpbHVyZSk7XG59O1xuIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJtYW5pZmVzdElkIiwiZG93bmxvYWRGb2xkZXIiLCJkb3dubG9hZHNDb250cm9sbGVyIiwidXBkYXRlRG93bmxvYWRGb2xkZXIiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///15\n")},3781:module=>{"use strict";eval("\n\nmodule.exports = function (api, onSuccess, onFailure, target, subscribers) {\n api.subscribersController.removeSubscribersById(subscribers);\n onSuccess();\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc4MS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYkEsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLFNBQVMsRUFBRUMsTUFBTSxFQUFFQyxXQUFXLEVBQUU7RUFDekVKLEdBQUcsQ0FBQ0sscUJBQXFCLENBQUNDLHFCQUFxQixDQUFDRixXQUFXLENBQUM7RUFDNURILFNBQVMsQ0FBQyxDQUFDO0FBQ2IsQ0FBQyIsInNvdXJjZXMiOlsid2VicGFjazovL2Rvd25zdHJlYW0tZWxlY3Ryb24vLi9hcGkvYmUtbWV0aG9kcy9yZW1vdmUtc3Vic2NyaWJlcnMuanM/NTMzYiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYXBpLCBvblN1Y2Nlc3MsIG9uRmFpbHVyZSwgdGFyZ2V0LCBzdWJzY3JpYmVycykge1xuICBhcGkuc3Vic2NyaWJlcnNDb250cm9sbGVyLnJlbW92ZVN1YnNjcmliZXJzQnlJZChzdWJzY3JpYmVycyk7XG4gIG9uU3VjY2VzcygpO1xufTtcblxuIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJhcGkiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJ0YXJnZXQiLCJzdWJzY3JpYmVycyIsInN1YnNjcmliZXJzQ29udHJvbGxlciIsInJlbW92ZVN1YnNjcmliZXJzQnlJZCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3781\n")},6557:module=>{"use strict";eval("\n\nmodule.exports = {\n regexpProtocolRemove: /^https{0,1}\\:\\/\\//i\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjU1Ny5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYkEsTUFBTSxDQUFDQyxPQUFPLEdBQUc7RUFDZkMsb0JBQW9CLEVBQUU7QUFDeEIsQ0FBQyIsInNvdXJjZXMiOlsid2VicGFjazovL2Rvd25zdHJlYW0tZWxlY3Ryb24vLi9hcGkvY29uc3RhbnRzLmpzP2Q5OWEiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICByZWdleHBQcm90b2NvbFJlbW92ZTogL15odHRwc3swLDF9XFw6XFwvXFwvL2lcbn07XG4iXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsInJlZ2V4cFByb3RvY29sUmVtb3ZlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///6557\n")},785:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('/*eslint no-console: ["error", { allow: ["warn", "error", "info"] }] */\n\n\nvar _ = __webpack_require__(4952);\nvar _require = __webpack_require__(9526),\n mkdirp = _require.mkdirp;\nvar appSettings = __webpack_require__(8557);\nvar translation = __webpack_require__(5847);\nvar Download = __webpack_require__(8298);\nvar DownloadsStorageController = __webpack_require__(8910);\nvar downloadUtil = __webpack_require__(5237);\nvar DownloadStats = __webpack_require__(534);\nvar STATUSES = __webpack_require__(9773);\nvar CODES = __webpack_require__(3740);\nvar constants = __webpack_require__(6557);\nvar utilUrl = __webpack_require__(8167);\nvar path = __webpack_require__(1017);\nvar ReadItem = __webpack_require__(2144);\nvar FlushItem = __webpack_require__(8381);\nvar downloadFileUtil = __webpack_require__(6003);\n\n/**\n *\n * @param {ManifestController} manifestController - existing manifest controller\n * @param {OfflineController} offlineController - existing offline controller\n * @constructor\n */\nfunction DownloadsController(manifestController, offlineController) {\n this._manifestsDownloadOrder = [];\n this._manifestsDownloadOrderObj = {};\n this._manifestController = manifestController;\n this._offlineController = offlineController;\n this.storage = new DownloadsStorageController();\n this._offlineController.setDownloadStorage(this.storage);\n this._names = {\n downloadInProgress: "downloadInProgress",\n options: "options",\n maxDownloadInProgress: "maxDownloadInProgress"\n };\n this._STATS_TIME_GENERATION = 1000;\n this.downloadStats = new DownloadStats(this.storage);\n _.bindAll(this, "_onDownloadEnd", "_onDownloadError", "isDownloadFinished");\n}\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Array} videoLinks - video links to be downloaded\n * @param {Array} audioLinks - audio links to be downloaded\n * @param {Array} textLinks - text links to be downloaded\n * @returns {void}\n * @private\n */\nDownloadsController.prototype._addDownloads = function (manifestId, videoLinks, audioLinks, textLinks) {\n var working = true;\n this._prepareStartOptions(manifestId, videoLinks, audioLinks, textLinks);\n while (working) {\n var ratioAudioVideo = videoLinks.length ? Math.round(audioLinks.length / videoLinks.length) : 1;\n var ratioTextVideo = videoLinks.length ? Math.round(textLinks.length / videoLinks.length) : 1;\n this._addNextItemToQueue(manifestId, textLinks, ratioTextVideo);\n this._addNextItemToQueue(manifestId, audioLinks, ratioAudioVideo);\n this._addNextItemToQueue(manifestId, videoLinks);\n working = !!(textLinks.length || videoLinks.length || audioLinks.length);\n }\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Array} links - array of links to be downloaded\n * @param {number} nbItems - the rnumber of items to add to the queue\n * @private\n * @returns {void}\n */\nDownloadsController.prototype._addNextItemToQueue = function (manifestId, links, nbItems) {\n var link;\n if (!nbItems) {\n nbItems = 1;\n }\n if (links.length) {\n while (nbItems > 0) {\n link = links.shift();\n link.manifestId = manifestId;\n this.storage.left.push(manifestId, link);\n nbItems--;\n }\n }\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {boolean} asFirst - to force to download manifest without wiating in queue\n * @returns {boolean} - status if operation was successfully\n * @private\n */\nDownloadsController.prototype._downloadOrderAddManifest = function (manifestId, asFirst) {\n if (!this._downloadOrderManifestExists(manifestId)) {\n this._manifestsDownloadOrderObj[manifestId] = true;\n if (asFirst) {\n this._manifestsDownloadOrder.unshift(manifestId);\n } else {\n this._manifestsDownloadOrder.push(manifestId);\n }\n return true;\n } else {\n return false;\n }\n};\n\n/**\n *\n * @param {number} nextManifestPositionInArray - index number from array _manifestsDownloadOrder\n * @returns {manifestId} - manifest identifier\n * @private\n */\nDownloadsController.prototype._downloadOrderGetManifestId = function (nextManifestPositionInArray) {\n return this._manifestsDownloadOrder[nextManifestPositionInArray];\n};\n\n/**\n *\n * @param {manifestId} manifestId - manifest identifier\n * @returns {number} index number from array _manifestsDownloadOrder\n * @private\n */\nDownloadsController.prototype._indexOfManifest = function (manifestId) {\n return this._manifestsDownloadOrder.indexOf(manifestId);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {*} - if manifest has been already added to the queue\n * @private\n */\nDownloadsController.prototype._downloadOrderManifestExists = function (manifestId) {\n return this._manifestsDownloadOrderObj[manifestId];\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {boolean} - status if manifest has been removed from queue\n * @private\n */\nDownloadsController.prototype._downloadOrderRemoveManifest = function (manifestId) {\n var found = false,\n i,\n j;\n delete this._manifestsDownloadOrderObj[manifestId];\n for (i = 0, j = this._manifestsDownloadOrder.length; i < j; i++) {\n if (this._manifestsDownloadOrder[i] === manifestId) {\n this._manifestsDownloadOrder.splice(i, 1);\n found = true;\n break;\n }\n }\n return found;\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {function} onSuccess - callback to be invoked when download finishes with success\n * @param {function} onFailure - callback to be invoked when download failed\n * @private\n * @returns {void}\n */\nDownloadsController.prototype._finish = function (manifestId, onSuccess, onFailure) {\n this.downloadStats.refresh();\n this._downloadOrderRemoveManifest(manifestId);\n if (!this._manifestsDownloadOrder.length) {\n this.downloadStats.stop();\n }\n this.storage.removeItem(manifestId).then(onSuccess, onFailure);\n};\n\n/**\n *\n * @param {object} link - link object which consist remote and local url\n * @private\n * @returns {string} - unique hash for download file based on local and remote url\n */\nDownloadsController.prototype._getDownloadHash = function (link) {\n return link.remoteUrl + "-" + link.localUrl;\n};\n\n/**\n *\n * @param {Download} download - download class to be marked either with success or with error\n * @private\n * @returns {void}\n */\nDownloadsController.prototype._markDownloadItem = function (download) {\n var self = this;\n var manifestId = download.manifestId;\n var downloadHash = self._getDownloadHash(download);\n var syncStorageKeys = [];\n var lastItem;\n download.events.removeListener("end", self._onDownloadEnd);\n download.events.removeListener("error", self._onDownloadError);\n\n //refreshing stats for last time - to have correct stats for subscribers progress before it is removed\n if (self.storage.downloading.count(manifestId) === 1 && self.storage.left.count(manifestId) === 0) {\n this.downloadStats.refresh();\n lastItem = true;\n }\n if (download.status === STATUSES.FINISHED) {\n self.storage.downloaded.push(manifestId, download);\n syncStorageKeys.push(this.storage.stores.DOWNLOADS.DOWNLOADED);\n } else {\n self.storage.errors.push(manifestId, download);\n }\n self.storage.downloading.removeItem(manifestId, downloadHash);\n if (self.isDownloadFinished(manifestId)) {\n if (self.storage.errors.count(manifestId) === 0) {\n self.storage.status.setItem(manifestId, "status", STATUSES.FINISHED);\n } else {\n self.storage.status.setItem(manifestId, "status", STATUSES.ERROR);\n }\n syncStorageKeys.push(this.storage.stores.STATUS);\n }\n self.storage.sync(manifestId, syncStorageKeys).then(function () {\n self.storage.params.decrease(manifestId, self._names.downloadInProgress);\n if (lastItem) {\n self._finish(manifestId, function () {\n self.startQueue();\n console.info("FINISHED", manifestId);\n }, function () {\n self.startQueue();\n });\n } else {\n self.startQueue();\n }\n }, function (err) {\n console.error("ERROR", err);\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {function} onSuccess - callback to be invoked when stop has been successfully\n * @param {function} onFailure - callback to be invoked when stop failed\n * @param {string} status - the status\n * @param {string} statusDetails - adds details about status (on errors for example)\n * @returns {void}\n */\nDownloadsController.prototype._stopWithStatus = function (manifestId, onSuccess, onFailure, status, statusDetails) {\n var self = this;\n self._downloadOrderRemoveManifest(manifestId);\n self.storage.getItem(manifestId).then(function (result) {\n if (!result) {\n onFailure(translation.getError(translation.e.downloads.ALREADY_STOPPED, manifestId));\n return;\n }\n var itemsToStop = self.storage.downloading.getKeys(manifestId);\n var itemToStop;\n console.info("STOPPING", manifestId, itemsToStop.length);\n var promises = [];\n for (var i = 0, j = itemsToStop.length; i < j; i++) {\n itemToStop = self.storage.downloading.getItem(manifestId, itemsToStop[i]);\n itemToStop.events.removeListener("end", self._onDownloadEnd);\n itemToStop.events.removeListener("error", self._onDownloadError);\n promises.push(itemToStop.stopPromise());\n }\n self.storage.status.setItem(manifestId, "status", status);\n if (statusDetails) {\n self.storage.status.setItem(manifestId, "details", statusDetails);\n }\n promises.push(self.storage.sync(manifestId, [self.storage.stores.DOWNLOADS.DOWNLOADED, self.storage.stores.STATUS]));\n Promise.all(promises).then(function () {\n self._finish(manifestId, onSuccess, onFailure);\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.STOPPING_FAILED, manifestId), err);\n });\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.STOPPING_FAILED, manifestId), err);\n });\n};\n/**\n * @param {Download} download - Download Class\n * @param {object} err - error object\n * @returns {void}\n * @private\n */\nDownloadsController.prototype._onDownloadError = function (download, err) {\n console.error("ERROR", download.remoteUrl, err);\n this._markDownloadItem(download);\n if (err === downloadFileUtil.errors.NO_SPACE_LEFT_ERROR || appSettings.getSettings().stopOnError) {\n // stop downloading => cannot write\n this._stopWithStatus(download.manifestId, function () {\n console.info(\'stopped\');\n }, function (failure) {\n console.info(failure);\n }, STATUSES.ERROR, err);\n }\n};\n\n/**\n *\n * @param {Download} download - Download Class\n * @returns {void}\n * @private\n */\nDownloadsController.prototype._onDownloadEnd = function (download) {\n // console.log("FINISHED", download.remoteUrl, download.localUrl);\n this._markDownloadItem(download);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Array} videoLinks - video links to be downloaded\n * @param {Array} audioLinks - audio links to be downloaded\n * @param {Array} textLinks - text links to be downloaded\n * @returns {void}\n * @private\n */\nDownloadsController.prototype._prepareStartOptions = function (manifestId, videoLinks, audioLinks, textLinks) {\n var count = videoLinks.length + audioLinks.length + textLinks.length;\n console.info("ADDING ->>> ", manifestId + ",", count, "fragments");\n var options = {};\n this.storage.params.setItem(manifestId, this._names.downloadInProgress, 0);\n var maxDownloadInProgress;\n var threadRules = appSettings.getSettings().downloadingThreadsRules;\n for (var i = 0, j = threadRules.items.length; i < j; i++) {\n if (count <= threadRules.items[i].max) {\n options[threadRules.threadName] = threadRules.items[i].threads;\n maxDownloadInProgress = threadRules.items[i].files;\n break;\n }\n }\n this.storage.params.setItem(manifestId, this._names.options, options);\n this.storage.params.setItem(manifestId, this._names.maxDownloadInProgress, maxDownloadInProgress);\n\n //download order can help to stop download one manifest and download another or download them in parallel\n this._downloadOrderAddManifest(manifestId);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {boolean} - if download is finished\n */\nDownloadsController.prototype.isDownloadFinished = function (manifestId) {\n return !this.storage.left.count(manifestId) && !this.storage.downloading.count(manifestId);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {boolean} - if download is finished and synced (info written on disk)\n */\nDownloadsController.prototype.isDownloadFinishedAndSynced = function (manifestId) {\n return !this.storage.left.count(manifestId) && !this.storage.downloading.count(manifestId) && !this.storage.keyExists(manifestId);\n};\nDownloadsController.prototype.getDownloading = function (manifestId, localFile) {\n var items = this.storage.downloading.getItems(manifestId);\n if (!items) {\n return null;\n }\n for (var link in items) {\n if (items.hasOwnProperty(link)) {\n var download = items[link];\n var downloadPath = path.normalize(download.localUrl);\n var local = path.normalize(localFile);\n if (downloadPath === local) {\n return download;\n }\n }\n }\n return null;\n};\nDownloadsController.prototype.waitForDownload = function (download, callback) {\n var _onDownloadEnd;\n var _onDownloadError;\n var removeListener = function removeListener(download) {\n download.events.removeListener("end", _onDownloadEnd);\n download.events.removeListener("error", _onDownloadError);\n };\n _onDownloadEnd = function _onDownloadEnd(download) {\n removeListener(download);\n callback();\n };\n _onDownloadError = function _onDownloadError(download, err) {\n removeListener(download);\n callback(err);\n };\n download.events.on("end", _onDownloadEnd);\n download.events.on("error", _onDownloadError);\n};\n\n/**\n* Perform a seek - this changes order of fragment download for a manifest\n* @param {string} manifestId - manifest identifier\n* @param {string} localFile - local file\n* @param {function} callback - callback to get result\n* @returns {void}\n*/\nDownloadsController.prototype.performSeek = function (manifestId, localFile, callback) {\n var self = this;\n var download;\n download = self.getDownloading(manifestId, localFile);\n if (download) {\n self.waitForDownload(download, callback);\n return;\n }\n var items = self.storage.left.getItems(manifestId);\n if (!items) {\n callback(\'No download found\');\n return;\n }\n var index = items.findIndex(function (download) {\n var downloadPath = path.normalize(download.localUrl);\n var local = path.normalize(localFile);\n return downloadPath === local;\n });\n if (index > -1) {\n var part1 = items.slice(0, index);\n var part2 = items.slice(index);\n self.storage.left.clear(manifestId);\n self.storage.left.concat(manifestId, part2);\n self.storage.left.concat(manifestId, part1);\n items = self.storage.left.getItems(manifestId);\n self.startQueue(self._indexOfManifest(manifestId), true);\n download = self.getDownloading(manifestId, localFile);\n if (download) {\n self.waitForDownload(download, callback);\n } else {\n // if not queued, return an error\n callback(\'No download found\');\n }\n } else {\n callback(\'No download found\');\n }\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {object} representations - object containing video, audio and text representations ids\n * @param {string} downloadFolder - download folder for video. If undefined, then default download folder is used\n * @param {function} onSuccess - callback to be invoked when start has been successfully\n * @param {function} onFailure - callback to be invoked when start failed\n * @param {boolean} fromResumed - if start has been called from resume api method\n * @param {string} oldstatus - if from resumed, then indicates the old status of download\n * @returns {void}\n */\nDownloadsController.prototype.start = function (manifestId, representations, downloadFolder, onSuccess, onFailure, fromResumed, oldstatus) {\n var self = this;\n this.downloadStats.start();\n var manifest = this._manifestController.getManifestById(manifestId);\n if (!manifest) {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n return;\n }\n representations = representations || {};\n var video = representations.video || [];\n if (!Array.isArray(video)) {\n video = [video];\n }\n var audio = representations.audio || [];\n if (!Array.isArray(audio)) {\n audio = [audio];\n }\n var text = representations.text || [];\n if (!Array.isArray(text)) {\n text = [text];\n }\n var videoR = manifest.getVideoRepresentations();\n var audioR = manifest.getAudioRepresentations();\n var textR = manifest.getTextRepresentations();\n var localDownloadFolder = path.resolve(appSettings.getSettings().downloadsFolderPath);\n if (downloadFolder) {\n localDownloadFolder = path.resolve(downloadFolder);\n }\n var localPath = path.resolve(localDownloadFolder + "/" + manifestId + "/");\n var manifestUrl = manifest.getManifestUrl();\n var manifestName = manifest.getManifestName();\n function getManifestBaseUrl(xml, manifestUrlDomain) {\n var manifestBaseUrl;\n var MPD = xml.getElementsByTagName("MPD")[0];\n if (MPD) {\n for (var i = 0, j = MPD.childNodes.length; i < j; i++) {\n if (MPD.childNodes[i].nodeName === "BaseURL") {\n manifestBaseUrl = MPD.childNodes[i].textContent;\n if (!manifestBaseUrl.match(constants.regexpProtocolRemove)) {\n manifestBaseUrl = utilUrl.joinPath(manifestUrlDomain, manifestBaseUrl);\n }\n break;\n }\n }\n }\n if (!manifestBaseUrl) {\n manifestBaseUrl = manifestUrlDomain;\n }\n return manifestBaseUrl;\n }\n Promise.all([this._offlineController.getManifestInfoPromise(manifestId, true), this.storage.getItem(manifestId), mkdirp(localPath)]).then(function (results) {\n var info = results[0];\n var storageItem = results[1];\n if (storageItem && !self.isDownloadFinished(manifestId)) {\n if (fromResumed) {\n onFailure(translation.getError(translation.e.downloads.ALREADY_RESUMED, manifestId));\n } else {\n onFailure(translation.getError(translation.e.downloads.ALREADY_STARTED, manifestId));\n }\n return;\n }\n\n //collect Links - start\n if (info.manifest.video) {\n video = _.union(video, info.manifest.video);\n }\n if (info.manifest.audio) {\n audio = _.union(audio, info.manifest.audio);\n }\n if (info.manifest.text) {\n text = _.union(text, info.manifest.text);\n }\n var downloaded = info.downloadedFiles || [];\n var downloadedHash = {};\n for (var i = 0, j = downloaded.length; i < j; i++) {\n downloadedHash[downloaded[i].localUrl] = downloaded[i];\n }\n var remotePath = getManifestBaseUrl(manifest.manifestXML.xml, manifest.url_domain);\n var videoLinks = downloadUtil.getDownloadLinks(manifestId, localPath, remotePath, video, videoR, downloadedHash);\n var audioLinks = downloadUtil.getDownloadLinks(manifestId, localPath, remotePath, audio, audioR, downloadedHash);\n var textLinks = downloadUtil.getDownloadLinks(manifestId, localPath, remotePath, text, textR, downloadedHash);\n var allvideoLinks = downloadUtil.getAllLinks(manifestId, localPath, remotePath, video, videoR);\n var allaudioLinks = downloadUtil.getAllLinks(manifestId, localPath, remotePath, audio, audioR);\n var alltextLinks = downloadUtil.getAllLinks(manifestId, localPath, remotePath, text, textR);\n var allFiles = allvideoLinks.concat(allaudioLinks, alltextLinks);\n\n //collect Links - end\n\n self.storage.createIfNotExists(manifestId).then(function () {\n self.storage.manifest.setItem(manifestId, "ts", new Date().getTime());\n self.storage.manifest.setItem(manifestId, "url", manifestUrl);\n self.storage.manifest.setItem(manifestId, "name", manifestName);\n self.storage.manifest.setItem(manifestId, "video", video);\n self.storage.manifest.setItem(manifestId, "audio", audio);\n self.storage.manifest.setItem(manifestId, "text", text);\n self.storage.manifest.setItem(manifestId, "files", allFiles);\n self.storage.manifest.setItem(manifestId, "folder", localDownloadFolder);\n self.storage.downloaded.clear(manifestId);\n self.storage.downloaded.concat(manifestId, downloaded);\n self.storage.errors.clear(manifestId);\n if (!fromResumed) {\n // do not initialise state of manifest is start is from resume\n // state must stay the last one\n self.storage.status.setItem(manifestId, "status", STATUSES.CREATED);\n } else {\n // init status with last status\n self.storage.status.setItem(manifestId, "status", oldstatus);\n }\n Promise.all([self.storage.sync(manifestId, [self.storage.stores.MANIFEST, self.storage.stores.STATUS]), self._manifestController.saveOriginalManifestOnceOnly(manifestId), self._manifestController.saveManifestWithChosenRepresentations(manifestId, {\n video: video,\n audio: audio,\n text: text\n }, localPath)]).then(function () {\n self._addDownloads(manifestId, videoLinks, audioLinks, textLinks);\n if (self._indexOfManifest(manifestId) > appSettings.getSettings().numberOfManifestsInParallel - 1) {\n self.storage.status.setItem(manifestId, "status", STATUSES.QUEUED);\n } else {\n self.storage.status.setItem(manifestId, "status", STATUSES.STARTED);\n }\n self.storage.status.setItem(manifestId, "left", self.storage.left.count(manifestId));\n self.storage.sync(manifestId, [self.storage.stores.DOWNLOADS.DOWNLOADED, self.storage.stores.STATUS]).then(function () {\n self.downloadStats.refresh();\n if (self.isDownloadFinished(manifestId)) {\n self.storage.status.setItem(manifestId, "status", STATUSES.FINISHED);\n self.storage.sync(manifestId, self.storage.stores.STATUS).then(function () {\n self._finish(manifestId, onSuccess, onFailure);\n }, onFailure);\n } else {\n self.downloadStats.start();\n self.startQueue();\n onSuccess();\n }\n }, onFailure);\n }, onFailure);\n }, onFailure);\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {object} representations - object containing video, audio and text representations ids\n * @param {function} onSuccess - callback to be invoked when start has been successfully\n * @param {function} onFailure - callback to be invoked when start failed\n * @returns {void}\n */\nDownloadsController.prototype.resume = function (manifestId, representations, onSuccess, onFailure) {\n var self = this;\n this._offlineController.getManifestInfo(manifestId, function (err, info) {\n if (err) {\n onFailure(translation.getError(translation.e.downloads.RESUMING_FAILED, manifestId), err);\n } else {\n var folder = info.manifest.folder;\n if (!folder) {\n // use default download folder path\n folder = path.resolve(appSettings.getSettings().downloadsFolderPath);\n }\n self.start(manifestId, representations, folder, onSuccess, onFailure, true, info.status);\n }\n });\n};\n\n/**\n * Update download folder path\n * @param {string} manifestId - manifest identifier\n * @param {string} downloadFolder - new download folder\n * @param {function} onSuccess - callback to be invoked when start has been successfully\n * @param {function} onFailure - callback to be invoked when start failed\n * @returns {void}\n */\nDownloadsController.prototype.updateDownloadFolder = function (manifestId, downloadFolder, onSuccess, onFailure) {\n Promise.all([new ReadItem(manifestId, appSettings.getSettings().stores.MANIFEST)]).then(function (results) {\n var manifestSettings = results[0];\n if (!manifestSettings) {\n onFailure(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n return;\n }\n manifestSettings.folder = downloadFolder;\n var flushItem = new FlushItem(manifestId, appSettings.getSettings().stores.MANIFEST, manifestSettings);\n flushItem.save().then(function () {\n onSuccess();\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.SAVING_DATA_FAILED, manifestId), err);\n });\n }, function (err) {\n onFailure(translation.getError(translation.e.downloads.UPDATE_DOWNLOAD_FOLDER_FAILED, manifestId), err);\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {function} onSuccess - callback to be invoked when stop has been successfully\n * @param {function} onFailure - callback to be invoked when stop failed\n * @returns {void}\n */\nDownloadsController.prototype.stop = function (manifestId, onSuccess, onFailure) {\n this._stopWithStatus(manifestId, onSuccess, onFailure, STATUSES.STOPPED);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {boolean} ignoreStopped - don\'t fail if download has been already stopped\n * @returns {Promise} - promise\n */\nDownloadsController.prototype.stopPromise = function (manifestId, ignoreStopped) {\n var self = this;\n return new Promise(function (resolve, reject) {\n self.stop(manifestId, resolve, function (err) {\n if (err) {\n if (ignoreStopped && err.code === CODES.ERRORS.STOPPED) {\n resolve();\n return;\n }\n reject(err);\n } else {\n resolve();\n }\n });\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} - promise\n */\nDownloadsController.prototype.removePromise = function (manifestId) {\n var self = this;\n return new Promise(function (resolve, reject) {\n self.stopPromise(manifestId).then(function () {\n self.storage.removeItem(manifestId).then(resolve, reject);\n }, function (err) {\n //already stopped, continue\n if (err && err.code === CODES.ERRORS.STOPPED) {\n self.storage.removeItem(manifestId).then(resolve, reject);\n } else {\n reject(err);\n }\n });\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {object} link - object link to be downloaded\n * @private\n * @returns {void}\n */\nDownloadsController.prototype._addLinkToDownload = function (manifestId, link) {\n var self = this;\n var params = Object.assign({}, link);\n var download = new Download(params, self.storage.params.getItem(manifestId, self._names.options));\n var downloadHash = self._getDownloadHash(link);\n self.storage.downloading.setItem(manifestId, downloadHash, download);\n self.storage.status.setItem(manifestId, "left", self.storage.left.count(manifestId) + self.storage.errors.count(manifestId));\n self.storage.sync(manifestId, self.storage.stores.STATUS);\n download.events.on("end", self._onDownloadEnd);\n download.events.on("error", self._onDownloadError);\n download.start();\n return download;\n};\n\n/**\n *\n * @param {number} [nextManifestPositionInArray] - index from array to decide which manifest should be downloaded next\n * (queue)\n * @param {boolean} forceDownload true to force next download to be queued\n * @returns {void}\n */\nDownloadsController.prototype.startQueue = function (nextManifestPositionInArray, forceDownload) {\n var count, downloadsInProgress, link, manifestId, maxDownloads;\n if (typeof nextManifestPositionInArray === "undefined") {\n nextManifestPositionInArray = 0;\n }\n manifestId = this._downloadOrderGetManifestId(nextManifestPositionInArray);\n if (manifestId && this.isDownloadFinished(manifestId)) {\n // the manifest id will be removed from queue, wait next time. Thus, do not change status\n return;\n }\n if (nextManifestPositionInArray >= appSettings.getSettings().numberOfManifestsInParallel) {\n if (manifestId) {\n this.storage.status.setItem(manifestId, "status", STATUSES.QUEUED);\n }\n return;\n } else {\n this.storage.status.setItem(manifestId, "status", STATUSES.STARTED);\n }\n if (!manifestId) {\n count = 0;\n var i, j, items;\n items = this.storage.getKeys();\n for (i = 0, j = items.length; i < j; i++) {\n count += this.storage.params.count(items[i], this._names.downloadInProgress);\n }\n if (count === 0) {\n this.downloadStats.stop();\n }\n return;\n }\n downloadsInProgress = this.storage.params.getItem(manifestId, this._names.downloadInProgress);\n maxDownloads = this.storage.params.getItem(manifestId, this._names.maxDownloadInProgress);\n if (downloadsInProgress < maxDownloads - 1 || forceDownload) {\n link = this.storage.left.shift(manifestId);\n if (link) {\n this.storage.params.increase(manifestId, this._names.downloadInProgress);\n this._addLinkToDownload(manifestId, link);\n } else {\n //check next manifest\n nextManifestPositionInArray++;\n }\n this.startQueue(nextManifestPositionInArray);\n } else if (appSettings.getSettings().numberOfManifestsInParallel > 1 && nextManifestPositionInArray < appSettings.getSettings().numberOfManifestsInParallel) {\n nextManifestPositionInArray++;\n this.startQueue(nextManifestPositionInArray);\n }\n};\nmodule.exports = DownloadsController;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzg1LmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ2E7O0FBQ2IsSUFBTUEsQ0FBQyxHQUFHQyxtQkFBTyxDQUFDLElBQVksQ0FBQztBQUMvQixJQUFBQyxRQUFBLEdBQWlCRCxtQkFBTyxDQUFDLElBQVEsQ0FBQztFQUEzQkUsTUFBTSxHQUFBRCxRQUFBLENBQU5DLE1BQU07QUFFYixJQUFNQyxXQUFXLEdBQUdILG1CQUFPLENBQUMsSUFBaUIsQ0FBQztBQUM5QyxJQUFNSSxXQUFXLEdBQUdKLG1CQUFPLENBQUMsSUFBc0IsQ0FBQztBQUNuRCxJQUFNSyxRQUFRLEdBQUdMLG1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gICAgICAgICBQcm9taXNlLmFsbChbXG4gICAgICAgICAgICBzZWxmLnN0b3JhZ2Uuc3luYyhtYW5pZmVzdElkLCBbXG4gICAgICAgICAgICAgIHNlbGYuc3RvcmFnZS5zdG9yZXMuTUFOSUZFU1QsXG4gICAgICAgICAgICAgIHNlbGYuc3RvcmFnZS5zdG9yZXMuU1RBVFVTXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIHNlbGYuX21hbmlmZXN0Q29udHJvbGxlci5zYXZlT3JpZ2luYWxNYW5pZmVzdE9uY2VPbmx5KG1hbmlmZXN0SWQpLFxuICAgICAgICAgICAgc2VsZi5fbWFuaWZlc3RDb250cm9sbGVyLnNhdmVNYW5pZmVzdFdpdGhDaG9zZW5SZXByZXNlbnRhdGlvbnMobWFuaWZlc3RJZCwge1xuICAgICAgICAgICAgICB2aWRlbzogdmlkZW8sXG4gICAgICAgICAgICAgIGF1ZGlvOiBhdWRpbyxcbiAgICAgICAgICAgICAgdGV4dDogdGV4dCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGxvY2FsUGF0aClcbiAgICAgICAgICBdKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICBzZWxmLl9hZGREb3dubG9hZHMobWFuaWZlc3RJZCwgdmlkZW9MaW5rcywgYXVkaW9MaW5rcywgdGV4dExpbmtzKTtcbiAgICAgICAgICAgICAgaWYgKHNlbGYuX2luZGV4T2ZNYW5pZmVzdChtYW5pZmVzdElkKSA+IGFwcFNldHRpbmdzLmdldFNldHRpbmdzKCkubnVtYmVyT2ZNYW5pZmVzdHNJblBhcmFsbGVsIC0gMSkge1xuICAgICAgICAgICAgICAgIHNlbGYuc3RvcmFnZS5zdGF0dXMuc2V0SXRlbShtYW5pZmVzdElkLCBcInN0YXR1c1wiLCBTVEFUVVNFUy5RVUVVRUQpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHNlbGYuc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SUxFRCIsImZvbGRlciIsInVwZGF0ZURvd25sb2FkRm9sZGVyIiwibWFuaWZlc3RTZXR0aW5ncyIsImZsdXNoSXRlbSIsInNhdmUiLCJTQVZJTkdfREFUQV9GQUlMRUQiLCJVUERBVEVfRE9XTkxPQURfRk9MREVSX0ZBSUxFRCIsIlNUT1BQRUQiLCJpZ25vcmVTdG9wcGVkIiwicmVqZWN0IiwiY29kZSIsIkVSUk9SUyIsInJlbW92ZVByb21pc2UiLCJfYWRkTGlua1RvRG93bmxvYWQiLCJPYmplY3QiLCJhc3NpZ24iLCJmb3JjZURvd25sb2FkIiwiZG93bmxvYWRzSW5Qcm9ncmVzcyIsIm1heERvd25sb2FkcyIsImluY3JlYXNlIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///785\n')},8910:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('/*eslint no-console: ["error", { allow: ["warn", "error", "info"] }] */\n\n\nvar _ = __webpack_require__(4952);\nvar appSettings = __webpack_require__(8557);\nvar ArrayStorage = __webpack_require__(1730);\nvar ArrayStorageBridge = __webpack_require__(4692);\nvar FlushItem = __webpack_require__(8381);\nvar Storage = __webpack_require__(6351);\nvar StorageBridge = __webpack_require__(3575);\nvar SyncItem = __webpack_require__(1587);\n\n/**\n *\n * @constructor\n */\nfunction DownloadsStorageController() {\n this.stores = appSettings.getSettings().stores;\n this._items = {};\n this._syncItems = [];\n this._FLUSH_TIME = 50; //in miliseconds\n this._flushThrottled = _.throttle(this._flush, this._FLUSH_TIME, {\n leading: false\n });\n this._createDummyStorageBridge();\n}\n\n/**\n *\n * @private\n * @param {string} manifestId - manifest identifier\n * @param {string} key - key identifier\n * @returns {void}\n */\nDownloadsStorageController.prototype._createArrayStorage = function (manifestId, key) {\n if (!this[key]) {\n this._createArrayStorageBridge(key);\n }\n this._items[manifestId][key] = new ArrayStorage();\n};\n\n/**\n *\n * @private\n * @param {string} key - key identifier\n * @returns {void}\n */\nDownloadsStorageController.prototype._createArrayStorageBridge = function (key) {\n this[key] = new ArrayStorageBridge(this, key);\n};\nDownloadsStorageController.prototype._createDummyStorageBridge = function () {\n this._createArrayStorageBridge(this.stores.DOWNLOADS.LEFT);\n this._createArrayStorageBridge(this.stores.DOWNLOADS.DOWNLOADED);\n this._createStorageBridge(this.stores.DOWNLOADS.DOWNLOADING);\n this._createArrayStorageBridge(this.stores.DOWNLOADS.ERRORS);\n this._createStorageBridge(this.stores.PARAMS);\n this._createStorageBridge(this.stores.MANIFEST);\n this._createStorageBridge(this.stores.STATUS);\n};\n\n/**\n *\n * @private\n * @param {string} manifestId - manifest identifier\n * @param {string} key - key identifier\n * @returns {void}\n */\nDownloadsStorageController.prototype._createStorage = function (manifestId, key) {\n if (!this[key]) {\n this._createStorageBridge(key);\n }\n this._items[manifestId][key] = new Storage();\n};\n\n/**\n *\n * @private\n * @param {string} key - key identifier\n * @returns {void}\n */\nDownloadsStorageController.prototype._createStorageBridge = function (key) {\n this[key] = new StorageBridge(this, key);\n};\n\n/**\n *\n * @private\n * @returns {void}\n */\nDownloadsStorageController.prototype._flush = function () {\n var self = this;\n var items = this._syncItems.splice(0, this._syncItems.length);\n var flushItem, flushItems, i, item, j, k, l, manifestId, storageKey, storageKeys, storagesToFlush;\n storagesToFlush = {};\n function getItems(manifestId, storageKey) {\n if (self._items[manifestId] && self._items[manifestId][storageKey]) {\n return self._items[manifestId][storageKey].getItems();\n } else {\n return [];\n }\n }\n\n //collect information which storages needs to be saved\n for (i = 0, j = items.length; i < j; i++) {\n item = items[i];\n storagesToFlush[item.manifestId] = storagesToFlush[item.manifestId] || {};\n for (k = 0, l = item.storageKeys.length; k < l; k++) {\n storagesToFlush[item.manifestId][item.storageKeys[k]] = true;\n }\n }\n flushItems = [];\n\n //create flush items - promises that needs to be resolved together in parallel\n for (manifestId in storagesToFlush) {\n storageKeys = storagesToFlush[manifestId];\n for (storageKey in storageKeys) {\n try {\n flushItem = new FlushItem(manifestId, storageKey, getItems(manifestId, storageKey));\n flushItems.push(flushItem.save());\n } catch (e) {\n console.error("ERROR", storageKey);\n }\n }\n }\n Promise.all(flushItems).then(function () {\n var i, j;\n for (i = 0, j = items.length; i < j; i++) {\n items[i].resolve();\n }\n }, function () {\n var i, j;\n for (i = 0, j = items.length; i < j; i++) {\n items[i].reject();\n }\n });\n};\n\n/**\n *\n * @private\n * @param {Array} [storageKey] storage key\n * @returns {Array} keys for all storages\n */\nDownloadsStorageController.prototype._getAllStorageKeys = function (storageKey) {\n var keys = [];\n storageKey = storageKey || this.stores;\n for (var key in storageKey) {\n if (storageKey.hasOwnProperty(key)) {\n if (typeof storageKey[key] === "string") {\n //params don\'t need to be stored to disk\n if (key !== this.stores.PARAMS) {\n keys.push(storageKey[key]);\n }\n } else {\n keys = keys.concat(this._getAllStorageKeys(storageKey[key]));\n }\n }\n }\n return keys;\n};\n\n/**\n *\n * @private\n * @param {string} storageKey storage key identifier\n * @param {string} bridgeMethodName method name to be called\n * @param {string} manifestId - manifest identifier\n * @returns {*} items\n */\nDownloadsStorageController.prototype._itemAction = function (storageKey, bridgeMethodName, manifestId) {\n var args = [],\n i,\n j;\n\n //collect all other parameters except those already listed\n for (i = 3, j = arguments.length; i < j; i++) {\n args.push(arguments[i]);\n }\n if (this._items[manifestId] && this._items[manifestId][storageKey] && this._items[manifestId][storageKey][bridgeMethodName]) {\n return this._items[manifestId][storageKey][bridgeMethodName].apply(this._items[manifestId][storageKey], args);\n } else {\n //if manifest still exists\n if (this._items[manifestId]) {\n console.error("ERROR", manifestId, storageKey, bridgeMethodName, args);\n }\n return undefined;\n }\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Array} [storageKeys] storage keys that will be cleared\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.clear = function (manifestId, storageKeys) {\n var self = this;\n return new Promise(function (resolve, reject) {\n storageKeys = storageKeys || self._getAllStorageKeys();\n if (self._items[manifestId]) {\n for (var i = 0, j = storageKeys.length; i < j; i++) {\n var storage = self._items[manifestId][storageKeys[i]];\n if (storage) {\n storage.clear();\n }\n }\n }\n delete self._items[manifestId];\n self.sync(manifestId, storageKeys).then(resolve, reject);\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.create = function (manifestId) {\n var self = this;\n return new Promise(function (resolve, reject) {\n self._items[manifestId] = {};\n self._createArrayStorage(manifestId, self.stores.DOWNLOADS.LEFT);\n self._createArrayStorage(manifestId, self.stores.DOWNLOADS.DOWNLOADED);\n self._createStorage(manifestId, self.stores.DOWNLOADS.DOWNLOADING);\n self._createArrayStorage(manifestId, self.stores.DOWNLOADS.ERRORS);\n self._createStorage(manifestId, self.stores.PARAMS);\n self._createStorage(manifestId, self.stores.MANIFEST);\n self._createStorage(manifestId, self.stores.STATUS);\n self.sync(manifestId, [self.stores.DOWNLOADS.DOWNLOADED, self.stores.MANIFEST, self.stores.STATUS]).then(resolve, reject);\n });\n};\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.createIfNotExists = function (manifestId) {\n var self = this;\n return new Promise(function (resolve, reject) {\n self.getItem(manifestId).then(function (result) {\n if (result) {\n resolve();\n } else {\n self.create(manifestId).then(resolve, reject);\n }\n }, reject);\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.getItem = function (manifestId) {\n var self = this;\n return new Promise(function (resolve) {\n resolve(self._items[manifestId]);\n });\n};\n\n/**\n *\n * @returns {string[]} keys of all items\n */\nDownloadsStorageController.prototype.getKeys = function () {\n return Object.keys(this._items);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {boolean} if certain manifest id exists\n */\nDownloadsStorageController.prototype.keyExists = function (manifestId) {\n return !!this._items[manifestId];\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.removeItem = function (manifestId) {\n var self = this;\n return new Promise(function (resolve) {\n delete self._items[manifestId];\n resolve();\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Array} [storageKeys] storage keys that will be synced\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.sync = function (manifestId, storageKeys) {\n var self = this;\n return new Promise(function (resolve, reject) {\n if (typeof storageKeys === "undefined") {\n reject("Storage key is missing");\n return;\n }\n if (typeof storageKeys === "string") {\n storageKeys = [storageKeys];\n }\n if (appSettings.getSettings().saveToDisk) {\n self._syncItems.push(new SyncItem(resolve, reject, manifestId, storageKeys));\n self._flushThrottled();\n } else {\n resolve();\n }\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} promise\n */\nDownloadsStorageController.prototype.syncAll = function (manifestId) {\n var self = this;\n return new Promise(function (resolve, reject) {\n if (appSettings.getSettings().saveToDisk) {\n var storageKeys = self._getAllStorageKeys();\n self._syncItems.push(new SyncItem(resolve, reject, manifestId, storageKeys));\n self._flushThrottled();\n } else {\n resolve();\n }\n });\n};\nmodule.exports = DownloadsStorageController;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODkxMC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNhOztBQUNiLElBQU1BLENBQUMsR0FBR0MsbUJBQU8sQ0FBQyxJQUFZLENBQUM7QUFFL0IsSUFBTUMsV0FBVyxHQUFHRCxtQkFBTyxDQUFDLElBQWlCLENBQUM7QUFDOUMsSUFBTUUsWUFBWSxHQUFHRixtQkFBTyxDQUFDLElBQXlCLENBQUM7QUFDdkQsSUFBTUcsa0JBQWtCLEdBQUdILG1CQUFPLENBQUMsSUFBZ0MsQ0FBQztBQUNwRSxJQUFNSSxTQUFTLEdBQUdKLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUNwRCxJQUFNSyxPQUFPLEdBQUdMLG1CQUFPL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IsIlByb21pc2UiLCJhbGwiLCJ0aGVuIiwicmVzb2x2ZSIsInJlamVjdCIsIl9nZXRBbGxTdG9yYWdlS2V5cyIsImtleXMiLCJoYXNPd25Qcm9wZXJ0eSIsImNvbmNhdCIsIl9pdGVtQWN0aW9uIiwiYnJpZGdlTWV0aG9kTmFtZSIsImFyZ3MiLCJhcmd1bWVudHMiLCJhcHBseSIsInVuZGVmaW5lZCIsImNsZWFyIiwic3RvcmFnZSIsInN5bmMiLCJjcmVhdGUiLCJjcmVhdGVJZk5vdEV4aXN0cyIsImdldEl0ZW0iLCJyZXN1bHQiLCJnZXRLZXlzIiwiT2JqZWN0Iiwia2V5RXhpc3RzIiwicmVtb3ZlSXRlbSIsInNhdmVUb0Rpc2siLCJzeW5jQWxsIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8910\n')},8948:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar XMLSerializer = (__webpack_require__(2008).XMLSerializer);\nvar appSettings = __webpack_require__(8557);\nvar parseManifestWithChoosenRepresentations = __webpack_require__(3064);\nvar downloadFileUtil = __webpack_require__(6003);\nvar saveFile = __webpack_require__(6744);\nvar translation = __webpack_require__(5847);\n\n/**\n *\n * @constructor\n */\nfunction ManifestController() {\n this._manifests = {};\n}\n\n/**\n *\n * @param {object} manifest manifest object\n * @returns {void}\n */\nManifestController.prototype.cacheManifest = function (manifest) {\n this._manifests[manifest.id] = manifest;\n};\n\n/**\n *\n * @param {Array|number|string} [manifestIds] manifests identifiers\n * @returns {*} manifests\n */\nManifestController.prototype.getManifests = function (manifestIds) {\n var selectedManifests;\n if (typeof manifestIds === "undefined") {\n selectedManifests = this._manifests;\n } else if (typeof manifestIds === "number" || typeof manifestIds === "string") {\n selectedManifests = [this._manifests[String(manifestIds)]];\n } else {\n selectedManifests = [];\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n if (this._manifests[manifestIds[i]]) {\n selectedManifests.push(this._manifests[manifestIds[i]]);\n }\n }\n }\n return selectedManifests;\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {*} manifest\n */\nManifestController.prototype.getManifestById = function (manifestId) {\n if (typeof manifestId === "number" || typeof manifestId === "string") {\n return this._manifests[String(manifestId)];\n }\n};\n\n/**\n *\n * @param {Array|number|string} [manifestIds] manifests identifiers\n * @returns {Array} manifests infomrations\n */\nManifestController.prototype.getManifestsInfo = function (manifestIds) {\n var manifests = [];\n var selectedManifests = this.getManifests(manifestIds);\n for (var i = 0, j = selectedManifests.length; i < j; i++) {\n manifests.push(selectedManifests[i].getJsonInfo());\n }\n return manifests;\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {string} local path for manifest files\n */\nManifestController.prototype.getOriginalManifestLocalPath = function (manifestId) {\n return appSettings.getSettings().settingsFolder + manifestId + "/";\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {*} manifest info\n */\nManifestController.prototype.getManifestInfoById = function (manifestId) {\n var manifest = this.getManifestById(manifestId);\n if (manifest) {\n return manifest.getJsonInfo();\n }\n};\n\n/**\n *\n * @param {Array|number|string} [manifestIds] manifests identifiers\n * @returns {void}\n */\nManifestController.prototype.removeFromCache = function (manifestIds) {\n if (typeof manifestIds === "number" || typeof manifestIds === "string") {\n manifestIds = [String(manifestIds)];\n }\n manifestIds = manifestIds || [];\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n delete this._manifests[manifestIds[i]];\n }\n};\nManifestController.prototype.removeFromCacheAll = function () {\n this._manifests = [];\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} promise\n */\nManifestController.prototype.saveOriginalManifestOnceOnly = function (manifestId) {\n var localPath = this.getOriginalManifestLocalPath(manifestId);\n var self = this;\n return new Promise(function (resolve, reject) {\n var manifest = self.getManifestById(manifestId);\n if (!manifest) {\n reject(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n return;\n }\n downloadFileUtil.checkForLocalFile(localPath + manifest.getManifestName(), function (exists) {\n if (exists) {\n resolve();\n } else {\n var xmlSerializer = new XMLSerializer();\n var manifestString;\n try {\n manifestString = xmlSerializer.serializeToString(manifest.getManifestXML());\n } catch (err) {\n reject(err);\n return;\n }\n saveFile(localPath, manifest.getManifestName(), manifestString, function (err) {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n });\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {object} representations representations to be saved\n * @param {string} downloadFolder - folder where all fragments are downloaded\n * @returns {Promise} promise\n */\nManifestController.prototype.saveManifestWithChosenRepresentations = function (manifestId, representations, downloadFolder) {\n var localPath = downloadFolder;\n var self = this;\n return new Promise(function (resolve, reject) {\n var manifest = self.getManifestById(manifestId);\n if (!manifest) {\n reject(translation.getError(translation.e.manifests.NOT_FOUND, manifestId));\n return;\n }\n var manifestString;\n try {\n manifestString = parseManifestWithChoosenRepresentations(manifest, representations);\n } catch (err) {\n reject(err);\n return;\n }\n saveFile(localPath, manifest.getManifestName(), manifestString, function (err) {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n};\nmodule.exports = ManifestController;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODk0OC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFNQSxhQUFhLEdBQUdDLHlDQUF1QztBQUM3RCxJQUFNQyxXQUFXLEdBQUdELG1CQUFPLENBQUMsSUFBaUIsQ0FBQztBQUM5QyxJQUFNRSx1Q0FBdUMsR0FBR0YsbUJBQU8sQ0FBQyxJQUFxRCxDQUFDO0FBQzlHLElBQU1HLGdCQUFnQixHQUFHSCxtQkFBTyxDQUFDLElBQWlDLENBQUM7QUFDbkUsSUFBTUksUUFBUSxHQUFHSixtQkFBTyxDQUFDLElBQW1CLENBQUM7QUFDN0MsSUFBTUssV0FBVyxHQUFHTCxtQkFB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G9jYWxQYXRoIiwiZ2V0U2V0dGluZ3MiLCJzZXR0aW5nc0ZvbGRlciIsImdldE1hbmlmZXN0SW5mb0J5SWQiLCJyZW1vdmVGcm9tQ2FjaGUiLCJyZW1vdmVGcm9tQ2FjaGVBbGwiLCJzYXZlT3JpZ2luYWxNYW5pZmVzdE9uY2VPbmx5IiwibG9jYWxQYXRoIiwic2VsZiIsIlByb21pc2UiLCJyZXNvbHZlIiwicmVqZWN0IiwiZ2V0RXJyb3IiLCJlIiwiTk9UX0ZPVU5EIiwiY2hlY2tGb3JMb2NhbEZpbGUiLCJnZXRNYW5pZmVzdE5hbWUiLCJleGlzdHMiLCJ4bWxTZXJpYWxpemVyIiwibWFuaWZlc3RTdHJpbmciLCJzZXJpYWxpemVUb1N0cmluZyIsImdldE1hbmlmZXN0WE1MIiwiZXJyIiwic2F2ZU1hbmlmZXN0V2l0aENob3NlblJlcHJlc2VudGF0aW9ucyIsInJlcHJlc2VudGF0aW9ucyIsImRvd25sb2FkRm9sZGVyIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8948\n')},3656:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar path = __webpack_require__(1017);\nvar getSize = __webpack_require__(6838);\nvar rmdir = __webpack_require__(943);\nvar appSettings = __webpack_require__(8557);\nvar ReadItem = __webpack_require__(2144);\nvar dirList = __webpack_require__(7182);\nvar Manifest = (__webpack_require__(7151)/* .Manifest */ .G);\nvar STATUSES = __webpack_require__(9773);\n\n/**\n *\n * @param {ManifestController} manifestController - reference to existing manifest controller\n * @constructor\n */\nfunction OfflineController(manifestController) {\n this._manifestController = manifestController;\n}\n\n/**\n *\n * @param {Function} callback - function to be called when list is ready\n * @returns {void}\n */\nOfflineController.prototype.getManifestsList = function (callback) {\n dirList(appSettings.getSettings().settingsFolder, true, false).then(function (settingsFolderList) {\n var manifestList = [];\n for (var i = 0, j = settingsFolderList.length; i < j; i++) {\n manifestList.push(settingsFolderList[i]);\n }\n callback(null, manifestList);\n }, function (err) {\n callback(err);\n });\n};\n\n/**\n *\n * @param {Function} callback - function to be called when list with info is ready\n * @param {Boolean} full - if downloaded info should contain all items or only the length\n * @returns {void}\n */\nOfflineController.prototype.getManifestsListWithInfo = function (callback, full) {\n var self = this;\n this.getManifestsList(function (err, list) {\n if (err) {\n callback(err);\n } else {\n var infoP = [];\n for (var i = 0, j = list.length; i < j; i++) {\n infoP.push(self.getManifestInfoPromise(list[i], full));\n }\n Promise.all(infoP).then(function (results) {\n var newResults = [];\n for (var _i = 0, _j = results.length; _i < _j; _i++) {\n if (results[_i]) {\n newResults.push(results[_i]);\n }\n }\n callback(null, newResults);\n }, function (promisesError) {\n callback(promisesError);\n });\n }\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Function} callback - function to be called when info for manifest is ready\n * @param {Boolean} full - if downloaded info should contain all items or only the length\n * @returns {void}\n */\nOfflineController.prototype.getManifestInfo = function (manifestId, callback, full) {\n var self = this;\n function addManifestInfoAndContinue(info) {\n var manifestName = info.manifest.name;\n var manifestUrl = info.manifest.url;\n var manifestLocalUrl = path.resolve(appSettings.getSettings().settingsFolder + "/" + manifestId + "/" + manifestName);\n var manifest = self._manifestController.getManifestById(manifestId);\n if (manifest) {\n info.manifestInfo = manifest.getJsonInfo();\n callback(null, info);\n } else {\n manifest = new Manifest(manifestId);\n manifest.loadFromLocal(manifestLocalUrl, manifestUrl).then(function () {\n self._manifestController.cacheManifest(manifest);\n info.manifestInfo = manifest.getJsonInfo();\n callback(null, info);\n }, function (err) {\n if (err && err.code === "ENOENT") {\n callback();\n } else {\n callback(err);\n }\n });\n }\n }\n Promise.all([new ReadItem(manifestId, appSettings.getSettings().stores.MANIFEST), new ReadItem(manifestId, appSettings.getSettings().stores.DOWNLOADS.DOWNLOADED), new ReadItem(manifestId, appSettings.getSettings().stores.STATUS), new ReadItem(manifestId, appSettings.getSettings().stores.PERSISTENT), new ReadItem(manifestId, appSettings.getSettings().stores.DATA)]).then(function (results) {\n var info = {};\n var manifestSettings = results[0] || {};\n var downloaded = results[1] || [];\n var status = results[2] || {};\n var persistent = results[3] || \'\';\n var data = results[4] || \'\';\n info.status = status.status || STATUSES.BROKEN;\n info.details = status.details || undefined;\n if (!self.downloadStorage.keyExists(manifestId) && info.status === STATUSES.STARTED) {\n info.status = STATUSES.BROKEN;\n }\n info.manifest = manifestSettings;\n if (info.manifest.files) {\n info.manifest.totalFiles = info.manifest.files.length;\n if (full === false) {\n delete info.manifest.files;\n }\n }\n info.left = status.left || 0;\n info.persistent = persistent;\n info.downloaded = downloaded.length;\n if (full) {\n info.downloadedFiles = downloaded;\n }\n info.data = data;\n addManifestInfoAndContinue(info);\n }, callback);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Function} callback - function to be called when info for manifest is ready\n * @returns {void}\n */\nOfflineController.prototype.getManifestFolderInfo = function (manifestId, callback) {\n Promise.all([new ReadItem(manifestId, appSettings.getSettings().stores.MANIFEST)]).then(function (results) {\n var info = {};\n var manifestSettings = results[0] || {};\n var downloadFolder = manifestSettings.folder;\n if (!downloadFolder) {\n // try to serve from default download folder\n downloadFolder = appSettings.getSettings().downloadsFolderPath;\n }\n var videoFolder = path.join(downloadFolder, manifestId);\n info.folder = videoFolder;\n\n // get size of folder\n getSize(videoFolder, function (err, size) {\n if (err) {\n info.size = 0;\n } else {\n info.size = size;\n }\n callback(null, info);\n });\n }, callback);\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Boolean} full - if downloaded info should contain all items or only the length\n * @returns {Promise} - promise\n */\nOfflineController.prototype.getManifestInfoPromise = function (manifestId, full) {\n var self = this;\n return new Promise(function (resolve, reject) {\n self.getManifestInfo(manifestId, function (err, result) {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n }, full);\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Function} callback - callback with resolved info data about manifest - if such exists\n * @returns {void}\n */\nOfflineController.prototype.getManifestDataFile = function (manifestId, callback) {\n new ReadItem(manifestId, appSettings.getSettings().stores.MANIFEST).then(function (data) {\n callback(data);\n }, function () {\n callback();\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Function} onSuccess - callback to be invoked when remove has been successfully\n * @param {Function} onFailure - callback to be invoked when remove failed\n * @returns {void}\n */\nOfflineController.prototype.remove = function (manifestId, onSuccess, onFailure) {\n var settingsFolder = appSettings.getSettings().settingsFolder + manifestId;\n this.getManifestDataFile(manifestId, function (info) {\n if (!info) {\n // no manifest data found for manifest, the download has not been started => just remove settings\n rmdir(settingsFolder, function (err) {\n if (err && err.code !== "ENOENT") {\n onFailure(err);\n } else {\n onSuccess();\n }\n });\n } else {\n var folder = info.folder;\n if (!folder) {\n // use default download folder path\n folder = path.resolve(appSettings.getSettings().downloadsFolderPath);\n }\n var downloadsFolder = folder + \'/\' + manifestId;\n rmdir(downloadsFolder, function (err) {\n if (err && err.code !== "ENOENT") {\n onFailure(err);\n } else {\n rmdir(settingsFolder, function (err) {\n if (err && err.code !== "ENOENT") {\n onFailure(err);\n } else {\n onSuccess();\n }\n });\n }\n });\n }\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {Promise} - promise\n */\nOfflineController.prototype.removePromise = function (manifestId) {\n var self = this;\n return new Promise(function (resolve, reject) {\n self.remove(manifestId, resolve, reject);\n });\n};\n\n/**\n *\n * @returns {Promise} - promise\n */\nOfflineController.prototype.removeAllPromise = function () {\n var self = this;\n return new Promise(function (resolve, reject) {\n var settingsFolder = appSettings.getSettings().settingsFolder;\n self.getManifestsList(function (err, list) {\n if (err) {\n reject(err);\n } else {\n var removeP = [];\n for (var i = 0, j = list.length; i < j; i++) {\n removeP.push(self.removePromise(list[i]));\n }\n Promise.all(removeP).then(function () {\n rmdir(settingsFolder, function (err) {\n if (err && err.code !== "ENOENT") {\n reject(err);\n } else {\n resolve();\n }\n });\n }, function (err) {\n reject(err);\n });\n }\n });\n });\n};\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {Function} onSuccess - callback to be invoked when restore has been successfully\n * @param {Function} onFailure - callback to be invoked when restore failed\n * @returns {void}\n */\nOfflineController.prototype.restoreLocalManifest = function (manifestId, onSuccess, onFailure) {\n var self = this;\n this.getManifestInfo(manifestId, function (err, info) {\n var representations = {};\n representations.video = info.manifest.video;\n representations.audio = info.manifest.audio;\n representations.text = info.manifest.text;\n self._manifestController.saveManifestWithChosenRepresentations(manifestId, representations).then(onSuccess, onFailure);\n });\n};\n\n/**\n *\n * @param {DownloadsStorageController} storage - downloads storage controller\n * @returns {void}\n */\nOfflineController.prototype.setDownloadStorage = function (storage) {\n this.downloadStorage = storage;\n};\nmodule.exports = OfflineController;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzY1Ni5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxJQUFJLEdBQUdDLG1CQUFPLENBQUMsSUFBTSxDQUFDO0FBQzVCLElBQU1DLE9BQU8sR0FBR0QsbUJBQU8sQ0FBQyxJQUFpQixDQUFDO0FBQzFDLElBQU1FLEtBQUssR0FBR0YsbUJBQU8sQ0FBQyxHQUFvQixDQUFDO0FBRTNDLElBQU1HLFdBQVcsR0FBR0gsbUJBQU8sQ0FBQyxJQUFpQixDQUFDO0FBQzlDLElBQU1JLFFBQVEsR0FBR0osbUJBQU8sQ0FBQyxJQUF3QixDQUFDO0FBQ2xELElBQU1LLE9BQU8sR0FBR0wsbUJBQU8sQ0FBQyxJQUFrQixDQUFDO0FBQzNDLElBQU1NLFFBQVEsR0FBR04sNkNBQStDO0FBQ2hFLElBQU1PLFFBQVEsR0FBR1AsbUJBQU8sQ0FBQyxJQUF1QixDQUFDOztBQUVqRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBU1EsaUJBQWlCQSxDQUFFQyxr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bmlmZXN0QnlJZCIsIm1hbmlmZXN0SW5mbyIsImdldEpzb25JbmZvIiwibG9hZEZyb21Mb2NhbCIsImNhY2hlTWFuaWZlc3QiLCJjb2RlIiwic3RvcmVzIiwiTUFOSUZFU1QiLCJET1dOTE9BRFMiLCJET1dOTE9BREVEIiwiU1RBVFVTIiwiUEVSU0lTVEVOVCIsIkRBVEEiLCJtYW5pZmVzdFNldHRpbmdzIiwiZG93bmxvYWRlZCIsInN0YXR1cyIsInBlcnNpc3RlbnQiLCJkYXRhIiwiQlJPS0VOIiwiZGV0YWlscyIsInVuZGVmaW5lZCIsImRvd25sb2FkU3RvcmFnZSIsImtleUV4aXN0cyIsIlNUQVJURUQiLCJmaWxlcyIsInRvdGFsRmlsZXMiLCJsZWZ0IiwiZG93bmxvYWRlZEZpbGVzIiwiZ2V0TWFuaWZlc3RGb2xkZXJJbmZvIiwiZG93bmxvYWRGb2xkZXIiLCJmb2xkZXIiLCJkb3dubG9hZHNGb2xkZXJQYXRoIiwidmlkZW9Gb2xkZXIiLCJqb2luIiwic2l6ZSIsInJlamVjdCIsInJlc3VsdCIsImdldE1hbmlmZXN0RGF0YUZpbGUiLCJyZW1vdmUiLCJvblN1Y2Nlc3MiLCJvbkZhaWx1cmUiLCJkb3dubG9hZHNGb2xkZXIiLCJyZW1vdmVQcm9taXNlIiwicmVtb3ZlQWxsUHJvbWlzZSIsInJlbW92ZVAiLCJyZXN0b3JlTG9jYWxNYW5pZmVzdCIsInJlcHJlc2VudGF0aW9ucyIsInZpZGVvIiwiYXVkaW8iLCJ0ZXh0Iiwic2F2ZU1hbmlmZXN0V2l0aENob3NlblJlcHJlc2VudGF0aW9ucyIsInNldERvd25sb2FkU3RvcmFnZSIsInN0b3JhZ2UiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3656\n')},8834:module=>{"use strict";eval('\n\n/**\n *\n * @constructor\n */\nfunction SubscribersController() {\n this._subscribers = {};\n}\n\n/**\n *\n * @param {Subscriber} subscriber - subscriber\n * @returns {void}\n */\nSubscribersController.prototype.addSubscriber = function (subscriber) {\n var id = subscriber.getId();\n this._subscribers[id] = subscriber;\n return id;\n};\n\n/**\n *\n * @param {Array|String} subscribersId - subscriber identifier\n * @returns {void}\n */\nSubscribersController.prototype.removeSubscribersById = function (subscribersId) {\n if (typeof subscribersId === "string") {\n subscribersId = [subscribersId];\n }\n for (var i = 0, j = subscribersId.length; i < j; i++) {\n if (this._subscribers[subscribersId[i]]) {\n this._subscribers[subscribersId[i]].remove();\n delete this._subscribers[subscribersId[i]];\n }\n }\n};\n\n/**\n *\n * Remove all subscribers for certain manifest based on any subscriberId that belongs to this manifest\n * @param {Array|String} subscriberId - subscriber identifier\n * @returns {void}\n */\nSubscribersController.prototype.removeAllManifestSubscribersById = function (subscriberId) {\n var subscriber = subscriberId && this._subscribers[subscriberId];\n if (subscriber) {\n this.unsubscribe(subscriber.getManifestId());\n }\n};\n\n/**\n *\n * @param {Array|String} manifestIds - manifest or manifests identifier\n * @returns {void}\n */\nSubscribersController.prototype.unsubscribe = function (manifestIds) {\n var subscribersId = [];\n var manifestIdsHash = {};\n if (typeof manifestIds === "string") {\n manifestIds = [manifestIds];\n }\n manifestIds = manifestIds || [];\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n manifestIdsHash[manifestIds[i]] = true;\n }\n for (var key in this._subscribers) {\n if (this._subscribers.hasOwnProperty(key)) {\n if (manifestIdsHash[this._subscribers[key].getManifestId()]) {\n subscribersId.push(key);\n }\n }\n }\n this.removeSubscribersById(subscribersId);\n};\n\n/**\n * @returns {void}\n */\nSubscribersController.prototype.unsubscribeAll = function () {\n for (var key in this._subscribers) {\n if (this._subscribers.hasOwnProperty(key)) {\n this._subscribers[key].remove();\n }\n }\n this._subscribers = {};\n};\nmodule.exports = SubscribersController;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWx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N0U3Vic2NyaWJlcnNCeUlkIiwic3Vic2NyaWJlcklkIiwidW5zdWJzY3JpYmUiLCJnZXRNYW5pZmVzdElkIiwibWFuaWZlc3RJZHMiLCJtYW5pZmVzdElkc0hhc2giLCJrZXkiLCJoYXNPd25Qcm9wZXJ0eSIsInB1c2giLCJ1bnN1YnNjcmliZUFsbCIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///8834\n')},3740:module=>{"use strict";eval("\n\nvar codes = {\n GENERAL: -1,\n ERRORS: {\n INTERNAL_ERROR: 1,\n BROKEN: 11,\n FINISHED: 12,\n UNFINISHED: 13,\n STOPPED: 14,\n CREATED: 15,\n MISSING: 16,\n RESUMED: 17,\n STARTED: 18,\n LOADING: 19,\n REMOVED: 20,\n INFO: 21,\n EXISTS: 22,\n NOT_FOUND: 100\n }\n};\nmodule.exports = codes;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzc0MC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxLQUFLLEdBQUc7RUFDWkMsT0FBTyxFQUFFLENBQUMsQ0FBQztFQUNYQyxNQUFNLEVBQUU7SUFDTkMsY0FBYyxFQUFFLENBQUM7SUFDakJDLE1BQU0sRUFBRSxFQUFFO0lBQ1ZDLFFBQVEsRUFBRSxFQUFFO0lBQ1pDLFVBQVUsRUFBRSxFQUFFO0lBQ2RDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLE9BQU8sRUFBRSxFQUFFO0lBQ1hDLElBQUksRUFBRSxFQUFFO0lBQ1JDLE1BQU0sRUFBRSxFQUFFO0lBQ1ZDLFNBQVMsRUFBRTtFQUNiO0FBQ0YsQ0FBQztBQUNEQyxNQUFNLENBQUNDLE9BQU8sR0FBR2xCLEtBQUsiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9kb3duc3RyZWFtLWVsZWN0cm9uLy4vYXBpL2Rvd25sb2Fkcy9jb2Rlcy5qcz84ZWMwIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuY29uc3QgY29kZXMgPSB7XG4gIEdFTkVSQUw6IC0xLFxuICBFUlJPUlM6IHtcbiAgICBJTlRFUk5BTF9FUlJPUjogMSxcbiAgICBCUk9LRU46IDExLFxuICAgIEZJTklTSEVEOiAxMixcbiAgICBVTkZJTklTSEVEOiAxMyxcbiAgICBTVE9QUEVEOiAxNCxcbiAgICBDUkVBVEVEOiAxNSxcbiAgICBNSVNTSU5HOiAxNixcbiAgICBSRVNVTUVEOiAxNyxcbiAgICBTVEFSVEVEOiAxOCxcbiAgICBMT0FESU5HOiAxOSxcbiAgICBSRU1PVkVEOiAyMCxcbiAgICBJTkZPOiAyMSxcbiAgICBFWElTVFM6IDIyLFxuICAgIE5PVF9GT1VORDogMTAwLFxuICB9XG59O1xubW9kdWxlLmV4cG9ydHMgPSBjb2RlcztcblxuIl0sIm5hbWVzIjpbImNvZGVzIiwiR0VORVJBTCIsIkVSUk9SUyIsIklOVEVSTkFMX0VSUk9SIiwiQlJPS0VOIiwiRklOSVNIRUQiLCJVTkZJTklTSEVEIiwiU1RPUFBFRCIsIkNSRUFURUQiLCJNSVNTSU5HIiwiUkVTVU1FRCIsIlNUQVJURUQiLCJMT0FESU5HIiwiUkVNT1ZFRCIsIklORk8iLCJFWElTVFMiLCJOT1RfRk9VTkQiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3740\n")},223:(module,__unused_webpack_exports,__webpack_require__)=>{eval('var downloadFileUtil = __webpack_require__(6003);\nvar fs = __webpack_require__(7147);\nvar _require = __webpack_require__(7194),\n net = _require.net;\nvar EventEmitter = (__webpack_require__(2361).EventEmitter);\n\n/**\n *\n * @param {string} url - url\n * @param {object} options - options\n * @returns {Chunk} - chunk object\n * @constructor\n */\nfunction Chunk(url, options) {\n var self = this;\n this.url = url;\n this.options = options;\n this.endPosition = options.endPosition;\n this.startPosition = options.startPosition;\n this.bytesRangeNotAvailable = options.bytesRangeNotAvailable;\n this.reset();\n this.events = new EventEmitter();\n this._promise = new Promise(function (resolve, reject) {\n self.resolve = resolve;\n self.reject = reject;\n });\n return this;\n}\nChunk.prototype._retry = function (errorType, callback) {\n var self = this;\n var maxDownloadRetry;\n this._errors = this._errors || {};\n this._errors[errorType] = this._errors[errorType] || 0;\n this._errors[errorType]++;\n if (errorType === downloadFileUtil.errors.INTERNET) {\n maxDownloadRetry = this.options.maxDownloadInternetRetry;\n } else {\n maxDownloadRetry = this.options.maxDownloadRetry;\n }\n if (this._errors[errorType] <= maxDownloadRetry) {\n if (self._timer) {\n clearTimeout(self._timer);\n }\n callback(true);\n self._timer = setTimeout(function () {\n // console.log("retrying chunk", errorType, self.destFile);\n self.reset(function () {\n self.start();\n });\n }, self.options.retryTimeout);\n } else {\n // console.log("not retrying chunk", errorType, self._errors[errorType]);\n callback(false);\n }\n};\nChunk.prototype.createFileStream = function (callback) {\n var self = this;\n if (!this.fileStream) {\n var destFile = this.options.destFile;\n if (this.options.multiChunks) {\n destFile = destFile + "." + this.startPosition + "." + this.endPosition;\n }\n downloadFileUtil.checkForLocalFile(destFile, function (resumeFile, fileSize) {\n self.destFile = destFile;\n if (resumeFile) {\n if (fileSize <= self.endPosition - self.startPosition) {\n self.resumeFile = resumeFile;\n self.available = fileSize;\n self.offsetStartPosition = fileSize;\n }\n }\n self.fileStream = fs.createWriteStream(destFile, {\n flags: self.resumeFile ? "a" : "w"\n });\n self.fileStream.on("error", callback);\n self.fileStream.on("open", function () {\n // for unknown reason from time to time the file descriptor of self.fileStream is null\n // when event \'open\' is fired then the file descriptor is not a null anymore\n // this should fix a problem with EBADF error\n // a bug in fs ?\n self.fileStream = this;\n this.removeListener("error", callback);\n this.on("error", function (error) {\n if (error.code === "ENOSPC") {\n // no space left on disk, do not retry downloading\n self.resolve(downloadFileUtil.errors.NO_SPACE_LEFT_ERROR, error);\n } else {\n self._retry(downloadFileUtil.errors.FILE_WRITING_ERROR, function (retried) {\n if (!retried) {\n self.resolve(downloadFileUtil.errors.FILE_WRITING_ERROR, error);\n }\n });\n }\n });\n this.on("finish", function () {\n if (!self.isDownloaded()) {\n self._retry(downloadFileUtil.errors.CHUNK_SIZE_ERROR, function (retried) {\n if (!retried) {\n self.closeStreamAndRequest(function () {\n self.resolve(downloadFileUtil.errors.CHUNK_SIZE_ERROR);\n });\n }\n });\n } else {\n self.closeStreamAndRequest(self.resolve);\n }\n });\n callback();\n });\n });\n } else {\n callback();\n }\n};\nChunk.prototype.isDownloaded = function () {\n return this.endPosition - this.startPosition - this.offsetStartPosition + 1 === this.downloaded;\n};\nChunk.prototype.start = function () {\n var self = this;\n var req_options = {\n timeout: this.options.timeout,\n url: this.url\n };\n self.createFileStream(function (err) {\n if (err) {\n self._retry(downloadFileUtil.errors.FILE_CREATING_ERROR, function (retried) {\n if (!retried) {\n self.closeStreamAndRequest(function () {\n self.resolve(downloadFileUtil.errors.FILE_CREATING_ERROR, err);\n });\n }\n });\n return;\n }\n req_options.headers = req_options.headers || {};\n if (!self.bytesRangeNotAvailable) {\n req_options.headers.range = "bytes=" + (self.startPosition + self.offsetStartPosition) + "-" + self.endPosition;\n }\n self._req = net.request(req_options);\n self._req.chunkedEncoding = self.options.useChunkedEncoding;\n self._req.on(\'response\', function (response) {\n response.on("error", function (error) {\n if (error.code === "ESOCKETTIMEDOUT" || error.code === "ENOTFOUND" || error.code === "ETIMEDOUT") {\n self._retry(downloadFileUtil.errors.INTERNET, function (retried) {\n if (!retried) {\n self.closeStreamAndRequest(function () {\n self.resolve(downloadFileUtil.errors.TIMEOUT, error);\n });\n }\n });\n } else {\n self.closeStreamAndRequest(function () {\n self.resolve(downloadFileUtil.errors.CHUNK_ERROR);\n });\n }\n });\n response.on("data", function (data) {\n if (response.statusCode === 200 || response.statusCode === 206) {\n self.available += data.length;\n self.downloaded += data.length;\n self.events.emit("download", data.length);\n }\n });\n response.pipe(self.fileStream);\n });\n self._req.end();\n });\n return this._promise;\n};\nChunk.prototype.closeStreamAndRequest = function (callback) {\n var self = this;\n var timer;\n var timerTimoutMS = 300;\n function onClose() {\n clearTimeout(timer);\n if (self.fileStream) {\n self.fileStream.destroy();\n delete self.fileStream;\n }\n delete self._req;\n callback();\n }\n if (this._req) {\n this._req.removeAllListeners();\n }\n if (this.fileStream) {\n this.fileStream.removeAllListeners();\n }\n if (this._req) {\n this._req.abort();\n if (this._req.timeoutTimer) {\n clearTimeout(this._req.timeoutTimer);\n this._req.timeoutTimer = null;\n }\n }\n if (this.fileStream) {\n timer = setTimeout(function () {\n onClose();\n }, timerTimoutMS);\n this.fileStream.end();\n this.fileStream.close(onClose);\n } else {\n delete this._req;\n callback();\n }\n};\nChunk.prototype.reset = function (callback) {\n var self = this;\n callback = callback || function () {};\n self.closeStreamAndRequest(function () {\n self.offsetStartPosition = 0;\n self.available = 0;\n self.downloaded = 0;\n self.writeProgress = 0;\n self.resumeFile = false;\n callback();\n });\n};\nChunk.prototype.stop = function () {\n var self = this;\n this.reset(function () {\n self.resolve(downloadFileUtil.errors.ABORTED);\n });\n};\nmodule.exports = Chunk;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIzLmpzIiwibWFwcGluZ3MiOiJBQUFBLElBQU1BLGdCQUFnQixHQUFHQyxtQkFBTyxDQUFDLElBQXNCLENBQUM7QUFDeEQsSUFBTUMsRUFBRSxHQUFHRCxtQkFBTyxDQUFDLElBQUksQ0FBQztBQUN4QixJQUFBRSxRQUFBLEdBQWNGLG1CQUFP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exports,__webpack_require__)=>{eval('/*eslint no-console: ["error", { allow: ["warn", "error", "info"] }] */\nvar fs = __webpack_require__(7147);\nvar _require = __webpack_require__(7194),\n net = _require.net;\nvar EventEmitter = (__webpack_require__(2361).EventEmitter);\nvar util = __webpack_require__(3837);\nvar downloadFileUtil = __webpack_require__(6003);\n\n/**\n *\n * @param {string} url - remote url\n * @param {string} destFile - local url\n * @param {object} options - options\n * @constructor\n */\nfunction DownloadFileNoHead(url, destFile, options) {\n this._url = url;\n this._destFile = destFile;\n this._options = options;\n this._resetValues();\n}\nutil.inherits(DownloadFileNoHead, EventEmitter);\nDownloadFileNoHead.prototype._reset = function (callback) {\n var self = this;\n callback = callback || function () {};\n self._closeStreamAndRequest(function () {\n self._resetValues();\n callback();\n });\n};\nDownloadFileNoHead.prototype._resetValues = function () {\n this.available = 0;\n this.downloaded = 0;\n this.file_size = 0;\n this.writeProgress = 0;\n};\nDownloadFileNoHead.prototype._createFileStream = function (callback) {\n var self = this;\n if (!this.fileStream) {\n var destFile = this._destFile;\n self.fileStream = fs.createWriteStream(destFile, {\n flags: "w"\n });\n self.fileStream.on("error", callback);\n self.fileStream.on("open", function () {\n // for unknown reason from time to time the file descriptor of self.fileStream is null\n // when event \'open\' is fired then the file descriptor is not a null anymore\n // this should fix a problem with EBADF error\n // a bug in fs ?\n self.fileStream = this;\n this.removeListener("error", callback);\n this.on("error", function (error) {\n if (error.code === "ENOSPC") {\n // no space left on disk, do not retry downloading\n self.emit("error", {\n message: downloadFileUtil.errors.NO_SPACE_LEFT_ERROR,\n data: error\n });\n } else {\n self._retry(downloadFileUtil.errors.FILE_WRITING_ERROR, function (retried) {\n if (!retried) {\n self.emit("error", {\n message: downloadFileUtil.errors.FILE_WRITING_ERROR,\n data: error\n });\n }\n });\n }\n });\n this.on("finish", function () {\n if (!self.isDownloaded()) {\n self._retry(downloadFileUtil.errors.CHUNK_SIZE_ERROR, function (retried) {\n if (!retried) {\n self._closeStreamAndRequest(function () {\n self.emit("error", {\n message: downloadFileUtil.errors.CHUNK_SIZE_ERROR\n });\n });\n }\n });\n } else {\n self.writeProgress = 1;\n self.emit("end");\n }\n });\n callback();\n });\n } else {\n callback();\n }\n};\nDownloadFileNoHead.prototype.isDownloaded = function () {\n return this.downloaded === this.file_size;\n};\nDownloadFileNoHead.prototype._retry = function (errorType, callback) {\n var self = this;\n var maxDownloadRetry;\n this._errors = this._errors || {};\n this._errors[errorType] = this._errors[errorType] || 0;\n this._errors[errorType]++;\n if (errorType === downloadFileUtil.errors.INTERNET) {\n maxDownloadRetry = this._options.maxDownloadChunkInternetRetry;\n } else {\n maxDownloadRetry = this._options.maxDownloadRetry;\n }\n if (this._errors[errorType] <= maxDownloadRetry) {\n if (self._timer) {\n clearTimeout(self._timer);\n }\n callback(true);\n self._timer = setTimeout(function () {\n // console.log("retrying chunk", errorType, self.destFile);\n self._reset(function () {\n self.start();\n });\n }, self._options.retryTimeout);\n } else {\n // console.log("not retrying chunk", errorType, self._errors[errorType]);\n callback(false);\n }\n};\nDownloadFileNoHead.prototype._closeStreamAndRequest = function (callback) {\n var self = this;\n var timer;\n var timerTimoutMS = 300;\n function onClose() {\n clearTimeout(timer);\n if (self.fileStream) {\n self.fileStream.destroy();\n delete self.fileStream;\n }\n delete self._req;\n callback();\n }\n if (this._req) {\n this._req.removeAllListeners();\n }\n if (this.fileStream) {\n this.fileStream.removeAllListeners();\n }\n if (this._req) {\n this._req.abort();\n if (this._req.timeoutTimer) {\n clearTimeout(this._req.timeoutTimer);\n this._req.timeoutTimer = null;\n }\n }\n if (this.fileStream) {\n timer = setTimeout(function () {\n onClose();\n }, timerTimoutMS);\n this.fileStream.end();\n this.fileStream.close(onClose);\n } else {\n delete this._req;\n callback();\n }\n};\n\n/**\n * starts download\n * @returns {void}\n */\nDownloadFileNoHead.prototype.start = function () {\n var self = this;\n var req_options = {\n timeout: this._options.timeout,\n url: this._url\n };\n if (this._options.noCache) {\n req_options.headers = {\n \'Cache-Control\': \'no-cache\'\n };\n }\n self._createFileStream(function (err) {\n if (err) {\n self._retry(downloadFileUtil.errors.FILE_CREATING_ERROR, function (retried) {\n if (!retried) {\n self._closeStreamAndRequest(function () {\n self.emit("error", {\n message: downloadFileUtil.errors.FILE_CREATING_ERROR\n });\n });\n }\n });\n return;\n }\n req_options.headers = req_options.headers || {};\n self._req = net.request(req_options);\n self._req.on(\'response\', function (response) {\n response.on("error", function (error) {\n console.error(\'ERROR (\' + self._url + \') :\' + error);\n if (error.code === "ESOCKETTIMEDOUT" || error.code === "ENOTFOUND" || error.code === "ETIMEDOUT") {\n self._retry(downloadFileUtil.errors.INTERNET, function (retried) {\n if (!retried) {\n self._closeStreamAndRequest(function () {\n self.emit("error", {\n message: downloadFileUtil.errors.TIMEOUT,\n data: error\n });\n });\n }\n });\n } else {\n self._retry(downloadFileUtil.errors.INTERNET, function (retried) {\n if (!retried) {\n self._closeStreamAndRequest(function () {\n self.emit("error", {\n message: downloadFileUtil.errors.CHUNK_ERROR,\n data: error\n });\n });\n }\n });\n }\n });\n if (response && response.statusCode >= 400) {\n self._retry(downloadFileUtil.errors.INTERNET, function (retried) {\n if (!retried) {\n self._closeStreamAndRequest(function () {\n console.error("HTTP DOWNLOAD ERROR url: ".concat(self._url, ", statusCode: ").concat(response.statusCode));\n self.emit("error", {\n message: downloadFileUtil.errors.CHUNK_ERROR,\n data: response\n });\n });\n }\n });\n } else {\n self._headers = response.headers;\n self.file_size = Number(self._headers["content-length"]);\n response.on("data", function (data) {\n if (response.statusCode === 200 || response.statusCode === 206) {\n self.available += data.length;\n self.downloaded += data.length;\n }\n });\n response.pipe(self.fileStream);\n }\n });\n self._req.end();\n });\n return this._promise;\n};\n\n/**\n * stops download\n * @returns {void}\n */\nDownloadFileNoHead.prototype.stop = function () {\n var self = this;\n this._reset(function () {\n self.emit("error", {\n message: downloadFileUtil.errors.ABORTED\n });\n });\n};\nmodule.exports = DownloadFileNoHead;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,ey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SIsIm1heERvd25sb2FkUmV0cnkiLCJfZXJyb3JzIiwiSU5URVJORVQiLCJtYXhEb3dubG9hZENodW5rSW50ZXJuZXRSZXRyeSIsIl90aW1lciIsImNsZWFyVGltZW91dCIsInNldFRpbWVvdXQiLCJzdGFydCIsInJldHJ5VGltZW91dCIsInRpbWVyIiwidGltZXJUaW1vdXRNUyIsIm9uQ2xvc2UiLCJkZXN0cm95IiwiX3JlcSIsInJlbW92ZUFsbExpc3RlbmVycyIsImFib3J0IiwidGltZW91dFRpbWVyIiwiZW5kIiwiY2xvc2UiLCJyZXFfb3B0aW9ucyIsInRpbWVvdXQiLCJub0NhY2hlIiwiaGVhZGVycyIsImVyciIsIkZJTEVfQ1JFQVRJTkdfRVJST1IiLCJyZXF1ZXN0IiwicmVzcG9uc2UiLCJjb25zb2xlIiwiVElNRU9VVCIsIkNIVU5LX0VSUk9SIiwic3RhdHVzQ29kZSIsImNvbmNhdCIsIl9oZWFkZXJzIiwiTnVtYmVyIiwibGVuZ3RoIiwicGlwZSIsIl9wcm9taXNlIiwic3RvcCIsIkFCT1JURUQiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2390\n')},6003:(module,__unused_webpack_exports,__webpack_require__)=>{eval('var fs = __webpack_require__(7147);\nvar appSettings = __webpack_require__(8557);\n\n/**\n *\n * @type {{start: number, end: null}}\n */\nvar defaultOptions = Object.assign({\n start: 0,\n end: null\n}, appSettings.getSettings().defaultManifestRequestOptions);\n\n/**\n *\n * @type {{CHUNK_ERROR: string, CHUNK_SIZE_ERROR: string, FILE_CREATING_ERROR: string, FILE_WRITING_ERROR: string,\n * ABORTED: string}}\n */\nvar errors = {\n ABORTED: "ABORTED",\n CHUNK_ERROR: "CHUNK_ERROR",\n CHUNK_SIZE_ERROR: "CHUNK_SIZE_ERROR",\n FILE_CREATING_ERROR: "FILE_CREATING_ERROR",\n FILE_WRITING_ERROR: "FILE_WRITING_ERROR",\n NO_SPACE_LEFT_ERROR: "NO_SPACE_LEFT_ERROR",\n INTERNET: "INTERNET",\n TIMEOUT: "TIMEOUT"\n};\n\n/**\n * @param {string} fileUrl - file url\n * @param {function} callback - callback to be invoked when check for file has been done\n * @returns {void}\n */\nfunction checkForLocalFile(fileUrl, callback) {\n fs.stat(fileUrl, function (error, stat) {\n if (error) {\n callback(false);\n } else {\n callback(true, stat.size);\n }\n });\n}\nmodule.exports = {\n checkForLocalFile: checkForLocalFile,\n defaultOptions: defaultOptions,\n errors: errors\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjAwMy5qcyIsIm1hcHBpbmdzIjoiQUFBQSxJQUFNQSxFQUFFLEdBQUdDLG1CQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLElBQU1DLFdBQVcsR0FBR0QsbUJBQU8sQ0FBQyxJQUFpQixDQUFDOztBQUU5QztBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQU1FLGNBQWMsR0FBR0MsTUFBTSxDQUFDQyxNQUFNLENBQ2xDO0VBQ0VDLEtBQUssRUFBRSxDQUFDO0VBQ1JDLEdBQUcsRUFBRTtBQUNQLENBQUMsRUFDREwsV0FBVyxDQUFDTSxXQUFXLENBQUMsQ0FBQyxDQUFDQyw2QkFDNUIsQ0FBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBTUMsTUFBTSxHQUFHO0VBQ2JDLE9BQU8sRUFBRSxTQUFTO0VBQ2xCQyxXQUFXLEVBQUUsYUFBYTtFQUMxQkMsZ0JBQWdCLEVBQUUsa0JBQWtCO0VBQ3BDQyxtQkFBbUIsRUFBRSxxQkFBcUI7RUFDMUNDLGtCQUFrQixFQUFFLG9CQUFvQjtFQUN4Q0MsbUJBQW1CLEVBQUUscUJBQXFCO0VBQzFDQyxRQUFRLEVBQUUsVUFBVTtFQUNwQkMsT0FBTyxFQUFFO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iAgICB9XG4gIH0pO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgY2hlY2tGb3JMb2NhbEZpbGU6IGNoZWNrRm9yTG9jYWxGaWxlLFxuICBkZWZhdWx0T3B0aW9uczogZGVmYXVsdE9wdGlvbnMsXG4gIGVycm9yczogZXJyb3JzXG59O1xuIl0sIm5hbWVzIjpbImZzIiwicmVxdWlyZSIsImFwcFNldHRpbmdzIiwiZGVmYXVsdE9wdGlvbnMiLCJPYmplY3QiLCJhc3NpZ24iLCJzdGFydCIsImVuZCIsImdldFNldHRpbmdzIiwiZGVmYXVsdE1hbmlmZXN0UmVxdWVzdE9wdGlvbnMiLCJlcnJvcnMiLCJBQk9SVEVEIiwiQ0hVTktfRVJST1IiLCJDSFVOS19TSVpFX0VSUk9SIiwiRklMRV9DUkVBVElOR19FUlJPUiIsIkZJTEVfV1JJVElOR19FUlJPUiIsIk5PX1NQQUNFX0xFRlRfRVJST1IiLCJJTlRFUk5FVCIsIlRJTUVPVVQiLCJjaGVja0ZvckxvY2FsRmlsZSIsImZpbGVVcmwiLCJjYWxsYmFjayIsInN0YXQiLCJlcnJvciIsInNpemUiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///6003\n')},739:(module,__unused_webpack_exports,__webpack_require__)=>{eval('var fs = __webpack_require__(7147);\nvar _require = __webpack_require__(7194),\n net = _require.net;\nvar EventEmitter = (__webpack_require__(2361).EventEmitter);\nvar util = __webpack_require__(3837);\nvar downloadFileUtil = __webpack_require__(6003);\nvar DownloadFileChunk = __webpack_require__(223);\n\n/**\n *\n * @param {string} url - remote url\n * @param {string} destFile - local url\n * @param {object} options - options\n * @constructor\n */\nfunction DownloadFile(url, destFile, options) {\n this._url = url;\n this._destFile = destFile;\n this._options = options;\n this._resetValues();\n}\nutil.inherits(DownloadFile, EventEmitter);\n\n/**\n *\n * @param {number} size - size of file\n * @private\n * @returns {*} - number of chunks\n */\nDownloadFile.prototype._calculateChunksNumber = function (size) {\n var MB = 1024 * 1024;\n for (var i = 0, j = this._options.threads.length; i < j; i++) {\n if (size < this._options.threads[i].size * MB) {\n return this._options.threads[i].number;\n }\n }\n return 1;\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownloadFile.prototype._concatChunks = function () {\n var self = this;\n var intervalTime = 500;\n self._chunks[0].writeProgress = 1;\n function countWriteProgress() {\n self.writeProgress = self._chunks.reduce(function (a, b) {\n return a + b.writeProgress;\n }, 0) / self._chunksNumber;\n self.emit("data");\n }\n function getWriteStream() {\n return fs.createWriteStream(self._chunks[0].destFile, {\n flags: "a"\n });\n }\n function onInterval(writeStream, currentStream) {\n self._chunks[currentStream].writeProgress = writeStream.bytesWritten / self._chunks[currentStream].available;\n if (self._chunks[currentStream].writeProgress > 1) {\n self._chunks[currentStream].writeProgress = 1;\n }\n countWriteProgress();\n }\n function pipeStream(writeStream, nextStreamNumber) {\n var chunk = self._chunks[nextStreamNumber];\n if (chunk) {\n var interval = setInterval(function () {\n onInterval(writeStream, nextStreamNumber);\n }, intervalTime);\n var readStream = fs.createReadStream(chunk.destFile);\n readStream.pipe(writeStream);\n writeStream.on("close", function () {\n clearInterval(interval);\n onInterval(writeStream, nextStreamNumber);\n writeStream.removeAllListeners();\n readStream.unpipe(writeStream);\n readStream.destroy();\n fs.unlink(chunk.destFile, function (err) {\n if (err) {\n self.emit("error", err);\n } else {\n writeStream.destroy();\n pipeStream(getWriteStream(), nextStreamNumber + 1);\n }\n });\n });\n } else {\n countWriteProgress();\n writeStream.removeAllListeners();\n writeStream.destroy();\n fs.rename(self._chunks[0].destFile, self._destFile, function (err) {\n if (err) {\n self.emit("error", err);\n } else {\n self.emit("end");\n }\n });\n }\n }\n if (self._chunks.length > 1) {\n pipeStream(getWriteStream(), 1);\n } else {\n countWriteProgress();\n self.emit("end");\n }\n};\n\n/**\n *\n * @param {number} chunkNumber - chunk number\n * @private\n * @returns {void}\n */\nDownloadFile.prototype._initChunk = function (chunkNumber) {\n var options = {};\n options.bytesRangeNotAvailable = this._bytesRangeNotAvailable;\n options.destFile = this._destFile;\n options.maxDownloadRetry = this._options.maxDownloadChunkRetry;\n options.maxDownloadInternetRetry = this._options.maxDownloadChunkInternetRetry;\n options.timeout = this._options.timeout;\n options.retryTimeout = this._options.retryTimeout;\n options.useChunkedEncoding = this._options.useChunkedEncoding;\n var size = this.file_size;\n if (this._chunksNumber > 1) {\n var chunkSize = parseInt(size / this._chunksNumber, 10);\n options.startPosition = chunkNumber * chunkSize;\n options.multiChunks = true;\n if (chunkNumber === this._chunksNumber - 1) {\n options.endPosition = size - 1;\n } else {\n options.endPosition = options.startPosition + chunkSize - 1;\n }\n } else {\n options.startPosition = 0;\n options.endPosition = size - 1;\n }\n var chunk = new DownloadFileChunk(this._url, options);\n chunk.events.on("download", this._onChunkDownload.bind(this));\n this._chunks.push(chunk);\n};\n\n/**\n *\n * @param {object} err - error\n * @param {boolean} aborted - if failure has been called because download was aborted\n * @private\n * @returns {void}\n */\nDownloadFile.prototype._onDownloadFailure = function (err, aborted) {\n this._promises = null;\n if (!aborted) {\n this._errors = this._errors || 0;\n this._errors++;\n if (this._errors <= this._options.maxDownloadRetry) {\n this._retryDownload();\n } else {\n this.emit("error", err);\n }\n } else {\n var noSpaceLeft = false;\n for (var i = 0, j = err.length; i < j; i++) {\n if (err[i]) {\n if (err[i] === downloadFileUtil.errors.NO_SPACE_LEFT_ERROR) {\n noSpaceLeft = true;\n break;\n }\n }\n }\n if (noSpaceLeft) {\n err = {\n message: downloadFileUtil.errors.NO_SPACE_LEFT_ERROR\n };\n }\n this.emit("error", err);\n }\n};\n\n/**\n *\n * @param {object} err - error\n * @private\n * @returns {void}\n */\nDownloadFile.prototype._onDownloadSuccess = function (err) {\n var aborted, error;\n this._promises = null;\n err = err || [];\n for (var i = 0, j = err.length; i < j; i++) {\n if (err[i]) {\n if (err[i] === downloadFileUtil.errors.ABORTED || err[i] === downloadFileUtil.errors.NO_SPACE_LEFT_ERROR) {\n aborted = true;\n }\n error = true;\n }\n }\n if (!error) {\n this._concatChunks();\n } else {\n this._onDownloadFailure(err, aborted);\n }\n};\n\n/**\n *\n * @param {number} downloaded - downloaded bytes\n * @private\n * @returns {void}\n */\nDownloadFile.prototype._onChunkDownload = function (downloaded) {\n this.downloaded += downloaded;\n this.available = this._chunks.reduce(function (a, b) {\n return a + b.available;\n }, 0);\n this.emit("data");\n};\nDownloadFile.prototype._retryDownload = function () {\n // console.log("retrying download", this._destFile);\n this._resetValues();\n this.start();\n};\nDownloadFile.prototype._resetValues = function () {\n this.available = 0;\n this.downloaded = 0;\n this.progress = 0;\n this.file_size = 0;\n this.writeProgress = 0;\n this._chunks = [];\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownloadFile.prototype._startChunks = function () {\n var promises = [];\n for (var i = 0, j = this._chunks.length; i < j; i++) {\n promises.push(this._chunks[i].start());\n }\n this._promises = promises;\n Promise.all(this._promises).then(this._onDownloadSuccess.bind(this), this._onDownloadFailure.bind(this));\n};\nDownloadFile.prototype._startAllChunks = function () {\n for (var i = 0, j = this._chunksNumber; i < j; i++) {\n this._initChunk(i);\n }\n this._startChunks();\n};\n\n/**\n * starts download\n * @returns {void}\n */\nDownloadFile.prototype.start = function () {\n var self = this;\n var req_options = Object.assign({\n url: this._url,\n method: \'HEAD\'\n }, downloadFileUtil.defaultOptions);\n if (this._options.noCache) {\n req_options.headers = req_options.headers || {};\n req_options.headers[\'Cache-Control\'] = \'no-cache\';\n }\n var req = net.request(req_options);\n req.chunkedEncoding = this._options.useChunkedEncoding;\n req.on(\'response\', function (response) {\n if (response && response.statusCode >= 400) {\n var error = response.statusMessage;\n if (error) {\n self._onDownloadFailure(error, false);\n return;\n }\n }\n response.on("error", function (error) {\n if (error) {\n self._onDownloadFailure(error, false);\n }\n });\n self._headers = response.headers;\n self.file_size = Number(self._headers["content-length"]);\n self._chunksNumber = self._calculateChunksNumber(self.file_size);\n downloadFileUtil.checkForLocalFile(self._destFile, function (exists, fileSize) {\n if (exists) {\n if (fileSize === self.file_size) {\n self.emit("end");\n } else if (fileSize > self.file_size) {\n fs.unlink(self._destFile, function (err) {\n if (err) {\n throw err;\n }\n });\n self._startAllChunks();\n } else if (fileSize < self.file_size && self._chunksNumber > 1) {\n fs.unlink(self._destFile, function (err) {\n if (err) {\n throw err;\n }\n });\n self._startAllChunks();\n } else {\n self._startAllChunks();\n }\n } else {\n self._startAllChunks();\n }\n });\n });\n req.end();\n};\n\n/**\n * stops download\n * @returns {void}\n */\nDownloadFile.prototype.stop = function () {\n var promises = [];\n for (var i = 0, j = this._chunks.length; i < j; i++) {\n this._chunks[i].stop();\n if (this._chunks[i]._promise) {\n promises.push(this._chunks[i]._promise);\n }\n }\n function onStopped() {\n this.emit("end", \'\');\n }\n if (!this._promises) {\n Promise.all(promises).then(onStopped.bind(this), onStopped.bind(this));\n }\n};\nmodule.exports = DownloadFile;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzM5LmpzIiwibWFwcGluZ3MiOiJBQUFBLElBQU1BLEVBQUUsR0FBR0MsbUJBQU8sQ0FBQyxJQUFJLENBQUM7QUFDeEIsSUFBQUMsUUFBQSxHQUFjRCxtQkFBTyxDQUFDLElBQVUsQ0FBQztFQUExQkUsR0FBRyxHQUFBRCxRQUFBLENBQUhDLEdBQUc7QUFDVixJQUFNQyxZQUFZLEdBQUdILHdDQUE4QjtBQUNuRCxJQUFNSSxJQUFJLEdBQUdKLG1CQUFPLENBQUMsSUFBTSxDQUFDO0FBQzVCLElBQU1LLGdCQUFnQixHQUFHTCxtQkFBTyxDQUFDLElBQXNCLENBQUM7QUFDeEQsSUFBTU0saUJBQWlCLEdBQUdOLG1CQUFPLENBQUMsR0FBdUIsQ0FBQzs7QUFFMUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTTyxZQUFZQSxDQUFFQyxHQU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yb3IiLCJBQk9SVEVEIiwiZG93bmxvYWRlZCIsInN0YXJ0IiwicHJvZ3Jlc3MiLCJfc3RhcnRDaHVua3MiLCJwcm9taXNlcyIsIlByb21pc2UiLCJhbGwiLCJ0aGVuIiwiX3N0YXJ0QWxsQ2h1bmtzIiwicmVxX29wdGlvbnMiLCJPYmplY3QiLCJhc3NpZ24iLCJtZXRob2QiLCJkZWZhdWx0T3B0aW9ucyIsIm5vQ2FjaGUiLCJoZWFkZXJzIiwicmVxIiwicmVxdWVzdCIsImNodW5rZWRFbmNvZGluZyIsInJlc3BvbnNlIiwic3RhdHVzQ29kZSIsInN0YXR1c01lc3NhZ2UiLCJfaGVhZGVycyIsIk51bWJlciIsImNoZWNrRm9yTG9jYWxGaWxlIiwiZXhpc3RzIiwiZmlsZVNpemUiLCJlbmQiLCJzdG9wIiwiX3Byb21pc2UiLCJvblN0b3BwZWQiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///739\n')},8298:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar _ = __webpack_require__(4952);\nvar domain = __webpack_require__(3639);\nvar DownloadFileNoHead = __webpack_require__(2390);\nvar DownloadFile = __webpack_require__(739);\nvar _require = __webpack_require__(9526),\n mkdirp = _require.mkdirp;\nvar appSettings = __webpack_require__(8557);\nvar EventEmitter = (__webpack_require__(2361).EventEmitter);\nvar STATUSES = __webpack_require__(9773);\n\n/**\n *\n * @param {object} params - parameters connected with download like id, bandwidth, contentType, remoteUrl, localUrl\n * see util class {@link downloadUtil.getDownloadLinks}\n * @param {object} options - options chosen for whole manifest, like number of chunks, retry,\n * @constructor\n */\nfunction Download(params, options) {\n this._defaults = {};\n this._defaults.threads = appSettings.getSettings().downloadingThreadsRules.threads;\n this.status = STATUSES.CREATED;\n Object.assign(this, params);\n this._options = Object.assign(this._defaults, options);\n this._options.maxDownloadRetry = appSettings.getSettings().MAX_ERRORS_DOWNLOAD_RETRY;\n this._options.maxDownloadChunkRetry = appSettings.getSettings().MAX_ERRORS_DOWNLOAD_CHUNK_RETRY;\n this._options.maxDownloadChunkInternetRetry = appSettings.getSettings().MAX_INTERNET_ERRORS_DOWNLOAD_CHUNK_RETRY;\n this._options.timeout = appSettings.getSettings().times.DOWNLOAD_TIMEOUT;\n this._options.retryTimeout = appSettings.getSettings().times.RETRY_TIMEOUT;\n this._options.useChunkedEncoding = appSettings.getSettings().useChunkedEncoding;\n this._options.useHeadRequests = appSettings.getSettings().useHeadRequests;\n this._options.noCache = appSettings.getSettings().noCache;\n this.stats = {\n available: 0,\n downloaded: 0,\n file_size: 0,\n writeProgress: 0\n };\n _.bindAll(this, "_onError", "_onEnd", "_onData", "_updateStats", "_attachEvents", "_removeEvents", "_removeEventsOnStop");\n this.events = new EventEmitter();\n}\n\n/**\n * @private\n * @returns {void}\n */\nDownload.prototype._attachEvents = function () {\n this._dl.on(\'error\', this._onError);\n this._dl.on(\'end\', this._onEnd);\n this._dl.on(\'data\', this._onData);\n};\n\n/**\n *\n * @param {function} callback - callback to be invoked then local path is created\n * @private\n * @returns {void}\n */\nDownload.prototype._createLocalPath = function (callback) {\n var folders = this.localUrl.split("/");\n folders = folders.slice(0, folders.length - 1);\n folders = folders.join("/");\n mkdirp(folders).then(function () {\n callback();\n }, function (error) {\n callback(error);\n });\n};\n\n/**\n *\n * @private\n * @returns {void}\n */\nDownload.prototype._onData = function () {\n this._updateStats();\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownload.prototype._onEnd = function () {\n this.status = STATUSES.FINISHED;\n this._updateStats();\n this._removeEvents();\n this.events.emit("end", this);\n};\n\n/**\n *\n * @param {object} data - error data\n * @private\n * @returns {void}\n */\nDownload.prototype._onError = function (data) {\n var self = this;\n this.status = STATUSES.ERROR;\n data = data || {};\n var message = data.message || "";\n self._removeEvents();\n self._updateStats();\n\n // notify only if there exists any error listener (from downloads controller)\n // otherwise EventEmitter throws an error\n if (self.events.listeners(\'error\').length) {\n self.events.emit("error", self, message);\n }\n};\nDownload.prototype._onDomainError = function (data) {\n var self = this;\n data = data || {};\n var message = data.message || "";\n if (self._dl) {\n if (message === \'net::ERR_NETWORK_CHANGED\' || message === \'net::ERR_SPDY_PROTOCOL_ERROR\' || message === \'net::ERR_HTTP2_PROTOCOL_ERROR\') {\n // network changed during download, retry download\n self.stop(function () {\n self.start();\n });\n } else {\n // stop current download to release file stream and notify error\n self.stop(function () {\n self._onError(data);\n });\n }\n } else {\n self._onError(data);\n }\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownload.prototype._removeEvents = function () {\n if (typeof this._dl.removeListener === "function") {\n this._dl.removeListener(\'error\', this._onError);\n this._dl.removeListener(\'end\', this._onEnd);\n this._dl.removeListener(\'data\', this._onData);\n }\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownload.prototype._removeEventsOnStop = function () {\n if (this._dl && typeof this._dl.removeListener === "function") {\n this._dl.removeListener(\'error\', this._onError);\n this._dl.removeListener(\'end\', this._onEnd);\n }\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownload.prototype._updateStats = function () {\n if (this.status === STATUSES.FINISHED) {\n this.stats.available = this._dl.file_size;\n this.stats.writeProgress = 1;\n } else {\n this.stats.available = this._dl.available;\n this.stats.writeProgress = this._dl.writeProgress;\n }\n this.stats.downloaded = this._dl.downloaded;\n this.stats.file_size = this._dl.file_size;\n};\n\n/**\n * @returns {void}\n */\nDownload.prototype.start = function () {\n var self = this;\n this.status = STATUSES.STARTED;\n this._createLocalPath(function (err) {\n if (err) {\n self._onError(err);\n return;\n }\n // NOTE: domain module is marked to be deprecated in the future,\n // we will use it until NodeJS will propose alternative or\n // rewrite with promises\n var d = domain.create();\n d.on(\'error\', function (err) {\n var message = \'\';\n if (err) {\n message = err.code || err.message || "";\n }\n // this needs to be disposed otherwise it might complain about unhandled error.\n if (typeof d.dispose === "function") {\n d.dispose();\n }\n self._onDomainError({\n message: message\n });\n });\n d.run(function () {\n self._dl = self.createDownloader(self.remoteUrl, self.localUrl, self._options);\n self._attachEvents();\n self._dl.start();\n });\n });\n};\n\n/**\n * Creates file downloader\n * @param {string} [remoteUrl] - url of fragment\n * @param {string} [localUrl] - local url where to download fragment\n * @param {object} [options] - some options\n * @returns {void}\n */\nDownload.prototype.createDownloader = function (remoteUrl, localUrl, options) {\n if (this._options.useHeadRequests) {\n return new DownloadFile(remoteUrl, localUrl, options);\n } else {\n return new DownloadFileNoHead(remoteUrl, localUrl, options);\n }\n};\n\n/**\n * @param {function} [resolve] - callback to be invoked when stop was successfully\n * @returns {void}\n */\nDownload.prototype.stop = function (resolve) {\n var self = this;\n this.status = STATUSES.STOPPED;\n this._removeEventsOnStop();\n if (typeof resolve !== "function") {\n resolve = function resolve() {};\n }\n if (this._dl) {\n var d = domain.create();\n d.on(\'error\', function () {\n resolve();\n });\n d.run(function () {\n self._dl.on(\'error\', function () {\n resolve();\n });\n self._dl.on(\'end\', function () {\n resolve();\n });\n self._dl.stop();\n });\n } else {\n resolve();\n }\n};\n\n/**\n *\n * @returns {Promise} - promise\n */\nDownload.prototype.stopPromise = function () {\n var self = this;\n return new Promise(function (resolve) {\n self.stop(function () {\n resolve();\n });\n });\n};\nmodule.exports = Download;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI5OC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxDQUFDLEdBQUdDLG1CQUFPLENBQUMsSUFBWSxDQUFDO0FBQy9CLElBQU1DLE1BQU0sR0FBR0QsbUJBQU8sQ0FBQyxJQUFRLENBQUM7QUFDaEMsSUFBTUUsa0JBQWtCLEdBQUdGLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUM3RCxJQUFNRyxZQUFZLEdBQUdILG1CQUFPLENBQUMsR0FBaUIsQ0FBQztBQUMvQyxJQUFBSSxRQUFBLEdBQWlCSixtQkFBTyxDQUFDLElBQVEsQ0FBQzt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JvbWlzZSIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///8298\n')},8381:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar _require = __webpack_require__(9526),\n mkdirp = _require.mkdirp;\nvar appSettings = __webpack_require__(8557);\nvar jsonfile = __webpack_require__(3480);\nvar LinkSave = __webpack_require__(2317);\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {string} storageKey - storage key\n * @param {object} items - storage items\n * @constructor\n */\nfunction FlushItem(manifestId, storageKey, items) {\n this.manifestId = manifestId;\n this.storageKey = storageKey;\n this.items = items;\n}\n\n/**\n *\n * @param {function} resolve - callback to be invoked when save was successful\n * @param {function} reject - callback to be invoked when save failed\n * @private\n * @returns {void}\n */\nFlushItem.prototype._saveToDisk = function (resolve, reject) {\n var self = this;\n var path = appSettings.getSettings().settingsFolder + this.manifestId + "/";\n var file = "" + this.storageKey + ".json";\n var fileUrl = path + file;\n mkdirp(path).then(function () {\n var data = convertStorage(self.storageKey, self.items);\n jsonfile.writeFile(fileUrl, data, function (err) {\n if (!err) {\n resolve();\n } else {\n reject(err);\n }\n });\n }, function (error) {\n reject(error);\n });\n};\n\n/**\n *\n * @returns {Promise} promise\n */\nFlushItem.prototype.save = function () {\n return new Promise(this._saveToDisk.bind(this));\n};\nmodule.exports = FlushItem;\n\n/**\n * Helper function\n * @param {string} storageKey - storage key\n * @param {object} items - storage items\n * @returns {*} data to be stored\n */\nvar convertStorage = function convertStorage(storageKey, items) {\n var itemsA = [];\n var data;\n //only for downloading we want to have an array\n if (storageKey === "downloading") {\n itemsA = [];\n for (var key in items) {\n itemsA.push(items[key]);\n }\n items = itemsA;\n }\n if (items instanceof Array) {\n data = [];\n for (var i = 0, j = items.length; i < j; i++) {\n data.push(new LinkSave(items[i]));\n }\n } else {\n data = items;\n }\n return data;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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ucHVzaChpdGVtc1trZXldKTtcbiAgICB9XG4gICAgaXRlbXMgPSBpdGVtc0E7XG4gIH1cbiAgaWYgKGl0ZW1zIGluc3RhbmNlb2YgQXJyYXkpIHtcbiAgICBkYXRhID0gW107XG4gICAgZm9yIChsZXQgaSA9IDAsIGogPSBpdGVtcy5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgIGRhdGEucHVzaChuZXcgTGlua1NhdmUoaXRlbXNbaV0pKTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgZGF0YSA9IGl0ZW1zO1xuICB9XG4gIHJldHVybiBkYXRhO1xufTtcblxuIl0sIm5hbWVzIjpbIl9yZXF1aXJlIiwicmVxdWlyZSIsIm1rZGlycCIsImFwcFNldHRpbmdzIiwianNvbmZpbGUiLCJMaW5rU2F2ZSIsIkZsdXNoSXRlbSIsIm1hbmlmZXN0SWQiLCJzdG9yYWdlS2V5IiwiaXRlbXMiLCJwcm90b3R5cGUiLCJfc2F2ZVRvRGlzayIsInJlc29sdmUiLCJyZWplY3QiLCJzZWxmIiwicGF0aCIsImdldFNldHRpbmdzIiwic2V0dGluZ3NGb2xkZXIiLCJmaWxlIiwiZmlsZVVybCIsInRoZW4iLCJkYXRhIiwiY29udmVydFN0b3JhZ2UiLCJ3cml0ZUZpbGUiLCJlcnIiLCJlcnJvciIsInNhdmUiLCJQcm9taXNlIiwiYmluZCIsIm1vZHVsZSIsImV4cG9ydHMiLCJpdGVtc0EiLCJrZXkiLCJwdXNoIiwiQXJyYXkiLCJpIiwiaiIsImxlbmd0aCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8381\n')},2144:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar jsonfile = __webpack_require__(3480);\nvar path = __webpack_require__(1017);\nvar appSettings = __webpack_require__(8557);\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @param {string} itemName - item name\n * @returns {Promise} promise\n * @constructor\n */\nfunction ReadItem(manifestId, itemName) {\n if (!manifestId) {\n throw new Error("manifestId is missing");\n }\n this._manifestId = manifestId;\n this._itemName = itemName;\n return new Promise(this._read.bind(this));\n}\n\n/**\n *\n * @param {function} resolve - callback to be invoked on finish\n * @private\n * @returns {void}\n */\nReadItem.prototype._read = function (resolve) {\n var fileUrl = path.resolve(appSettings.getSettings().settingsFolder + "/" + this._manifestId + "/" + this._itemName + ".json");\n jsonfile.readFile(fileUrl, function (err, data) {\n if (err) {\n resolve();\n } else {\n resolve(data);\n }\n });\n};\nmodule.exports = ReadItem;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE0NC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxRQUFRLEdBQUdDLG1CQUFPLENBQUMsSUFBVSxDQUFDO0FBQ3BDLElBQU1DLElBQUksR0FBR0QsbUJBQU8sQ0FBQyxJQUFNLENBQUM7QUFFNUIsSUFBTUUsV0FBVyxHQUFHRixtQkFBTyxDQUFDLElBQWlCLENBQUM7O0FBRTlDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBU0csUUFBUUEsQ0FBRUMsVUFBVSxFQUFFQyxRQUFRLEVBQUU7RUFDdkMsSUFBSSxDQUFDRCxVQUFVLEVBQUU7SUFDZixNQUFNLElBQUlFLEtBQUssQ0FBQyx1QkFBdUIsQ0FBQztFQUMxQztFQUNBLElBQUksQ0FBQ0MsV0FBVyxHQUFHSCxVQUFVO0VBQzdCLElBQUksQ0FBQ0ksU0FBUyxHQUFHSCxRQUFRO0VBQ3pCLE9BQU8sSUFBSUksT0FBTyxDQUFDLElBQUksQ0FBQ0MsS0FBSyxDQUFDQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDM0M7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0FSLFFBQVEsQ0FBQ1MsU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iwiRXJyb3IiLCJfbWFuaWZlc3RJZCIsIl9pdGVtTmFtZSIsIlByb21pc2UiLCJfcmVhZCIsImJpbmQiLCJwcm90b3R5cGUiLCJyZXNvbHZlIiwiZmlsZVVybCIsImdldFNldHRpbmdzIiwic2V0dGluZ3NGb2xkZXIiLCJyZWFkRmlsZSIsImVyciIsImRhdGEiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2144\n')},9773:module=>{"use strict";eval('\n\nvar STATUSES = {\n "CREATED": "CREATED",\n "STARTED": "STARTED",\n "ERROR": "ERROR",\n "STOPPED": "STOPPED",\n "FINISHED": "FINISHED",\n "BROKEN": "BROKEN",\n "QUEUED": "QUEUED"\n};\nmodule.exports = STATUSES;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTc3My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxRQUFRLEdBQUc7RUFDZixTQUFTLEVBQUUsU0FBUztFQUNwQixTQUFTLEVBQUUsU0FBUztFQUNwQixPQUFPLEVBQUUsT0FBTztFQUNoQixTQUFTLEVBQUUsU0FBUztFQUNwQixVQUFVLEVBQUUsVUFBVTtFQUN0QixRQUFRLEVBQUUsUUFBUTtFQUNsQixRQUFRLEVBQUU7QUFDWixDQUFDO0FBRURDLE1BQU0sQ0FBQ0MsT0FBTyxHQUFHRixRQUFRIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vZG93bnN0cmVhbS1lbGVjdHJvbi8uL2FwaS9kb3dubG9hZHMvc3RhdHVzZXMuanM/OWM1MyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbmNvbnN0IFNUQVRVU0VTID0ge1xuICBcIkNSRUFURURcIjogXCJDUkVBVEVEXCIsXG4gIFwiU1RBUlRFRFwiOiBcIlNUQVJURURcIixcbiAgXCJFUlJPUlwiOiBcIkVSUk9SXCIsXG4gIFwiU1RPUFBFRFwiOiBcIlNUT1BQRURcIixcbiAgXCJGSU5JU0hFRFwiOiBcIkZJTklTSEVEXCIsXG4gIFwiQlJPS0VOXCI6IFwiQlJPS0VOXCIsXG4gIFwiUVVFVUVEXCI6IFwiUVVFVUVEXCJcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gU1RBVFVTRVM7Il0sIm5hbWVzIjpbIlNUQVRVU0VTIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///9773\n')},1587:module=>{"use strict";eval("\n\nfunction SyncItem(resolve, reject, manifestId, storageKeys) {\n this.resolve = resolve;\n this.reject = reject;\n this.manifestId = manifestId;\n this.storageKeys = storageKeys;\n}\nmodule.exports = SyncItem;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU4Ny5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixTQUFTQSxRQUFRQSxDQUFFQyxPQUFPLEVBQUVDLE1BQU0sRUFBRUMsVUFBVSxFQUFFQyxXQUFXLEVBQUU7RUFDM0QsSUFBSSxDQUFDSCxPQUFPLEdBQUdBLE9BQU87RUFDdEIsSUFBSSxDQUFDQyxNQUFNLEdBQUdBLE1BQU07RUFDcEIsSUFBSSxDQUFDQyxVQUFVLEdBQUdBLFVBQVU7RUFDNUIsSUFBSSxDQUFDQyxXQUFXLEdBQUdBLFdBQVc7QUFDaEM7QUFFQUMsTUFBTSxDQUFDQyxPQUFPLEdBQUdOLFFBQVEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9kb3duc3RyZWFtLWVsZWN0cm9uLy4vYXBpL2Rvd25sb2Fkcy9zeW5jLWl0ZW0uanM/OGIxYyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZnVuY3Rpb24gU3luY0l0ZW0gKHJlc29sdmUsIHJlamVjdCwgbWFuaWZlc3RJZCwgc3RvcmFnZUtleXMpIHtcbiAgdGhpcy5yZXNvbHZlID0gcmVzb2x2ZTtcbiAgdGhpcy5yZWplY3QgPSByZWplY3Q7XG4gIHRoaXMubWFuaWZlc3RJZCA9IG1hbmlmZXN0SWQ7XG4gIHRoaXMuc3RvcmFnZUtleXMgPSBzdG9yYWdlS2V5cztcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBTeW5jSXRlbTtcbiJdLCJuYW1lcyI6WyJTeW5jSXRlbSIsInJlc29sdmUiLCJyZWplY3QiLCJtYW5pZmVzdElkIiwic3RvcmFnZUtleXMiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1587\n")},1630:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("/*eslint no-console: [\"error\", { allow: [\"warn\", \"error\", \"info\"] }] */\n\n\nvar _ = __webpack_require__(4952);\nvar Snowflake = __webpack_require__(4576);\nvar appSettings = __webpack_require__(8557);\nvar beMethods = __webpack_require__(3274);\nvar DownloadsController = __webpack_require__(785);\nvar ManifestController = __webpack_require__(8948);\nvar OfflineController = __webpack_require__(3656);\nvar SubscribersController = __webpack_require__(8834);\nvar Server = __webpack_require__(1584);\nvar DownstreamElectronBE;\nfunction deserialize(serializedJavascript) {\n try {\n return JSON.parse(serializedJavascript);\n } catch (err) {\n return {};\n }\n}\n\n/**\n * @constructor\n * @namespace DownstreamElectronBE\n * @param {object} configParams - configuration\n * @property {DownstreamElectronBE.init} init - initialize api in main process\n * @description\n * During initialization you can configure your app, [click here]{@link DownstreamElectronBE.configuration}\n *\n * @example\n * //somewhere in the main process\n * const { BrowserWindow, app } = require('electron');\n * const downstreamElectron = require('downstream-electron');\n *\n * const userSettings = {\n * \"appDir\": \"/Users/admin/myApp\",\n * \"settingsName\": \"settings\",\n * \"publicName\": \"public\",\n * \"downloadsName\": \"movies\"\n * };\n *\n * let downstreamInstance;\n * function createWindow() {\n * downstreamInstance = downstreamElectron.init(userSettings);\n * const win = new BrowserWindow({\n * width: 1200,\n * height: 700,\n * resizable: true,\n * webPreferences: {\n * plugins: true\n * }\n * });\n * win.loadURL('file://index.html');\n * win.webContents.openDevTools();\n * }\n *\n * function onWillQuit() {\n * downstreamInstance.stop();\n * }\n *\n * app.on('ready', createWindow);\n * app.on('will-quit', onWillQuit);\n * app.on('window-all-closed', function () {\n * console.log(\"window-all-closed\");\n * app.quit();\n * });\n */\nDownstreamElectronBE = function DownstreamElectronBE() {\n this._offlineContentPort = appSettings.getSettings().offlineContentPortStart;\n _.bindAll(this, '_onApiRequest', 'processSubscriber');\n this._createControllers();\n this._serveOfflineContent();\n this._attachEvents();\n // this.offlineController.restoreLocalManifest(\"6163760572308389888\");\n};\nDownstreamElectronBE.prototype.stop = function () {\n this.server.stop();\n};\n\n/**\n *\n * @param {string} methodName - api function\n * @param {string} promiseId - promise identifier\n * @param {object} args - arguments\n * @param {number} target - target window id\n * @private\n * @returns {void}\n */\nDownstreamElectronBE.prototype._apiMethods = function (methodName, promiseId, args, target) {\n var self = this;\n var manifestId = args[0];\n var response = {};\n response.promiseId = promiseId;\n var onSuccess = function onSuccess(result, subscribersId) {\n response.subscribersId = subscribersId;\n response.status = 'OK';\n response.result = result;\n response.manifestId = manifestId;\n self._send(response, target);\n };\n var onFailure = function onFailure(err, internalError) {\n var errorId = String(Snowflake.SnowflakeId.getUUID());\n var errorInfo = _.clone({\n errorId: errorId,\n methodName: methodName,\n args: args.slice(4),\n err: err,\n internalError: internalError\n });\n response.manifestId = manifestId;\n response.status = 'ERROR';\n response.error = err || {};\n response.error.errorId = errorId;\n response.error.details = internalError;\n self._send(response, target);\n\n // @TODO log all errors that user have seen, the errorId will help to find stack\n try {\n console.error(new Date(), 'Error occurred', JSON.stringify(errorInfo));\n } catch (e) {\n //do nothing\n }\n };\n args = args || [];\n args.unshift(target);\n args.unshift(onFailure);\n args.unshift(onSuccess);\n args.unshift(this);\n var method = this._getMethod(methodName);\n if (typeof method === 'function') {\n method.apply(null, args);\n } else {\n response.status = 'ERROR';\n response.error = \"Provided method '\" + methodName + \"' doesn't exists\";\n this._send(response, target);\n console.error('ERROR', \"Provided method '\" + methodName + \"' doesn't exists\");\n }\n};\n\n/**\n *\n * @private\n * @returns {void}\n */\nDownstreamElectronBE.prototype._attachEvents = function () {\n var ipcMain = (__webpack_require__(7194).ipcMain);\n ipcMain.on('downstreamElectronBE', this._onApiRequest);\n};\n\n/**\n *\n * @private\n * @returns {void}\n */\nDownstreamElectronBE.prototype._createControllers = function () {\n this.manifestController = new ManifestController();\n this.offlineController = new OfflineController(this.manifestController);\n this.downloadsController = new DownloadsController(this.manifestController, this.offlineController);\n this.subscribersController = new SubscribersController();\n};\n\n/**\n *\n * @param {string} methodName - method name\n * @returns {*} - method\n * @private\n */\nDownstreamElectronBE.prototype._getMethod = function (methodName) {\n var names = methodName.split('.');\n var i, j, method;\n method = beMethods[names[0]];\n for (i = 1, j = names.length; i < j; i++) {\n method = method[names[i]];\n }\n return method;\n};\n\n/**\n *\n * @param {object} evt - event\n * @param {object} data - data from renderer\n * @param {number} target - target window id\n * @private\n * @returns {void}\n */\nDownstreamElectronBE.prototype._onApiRequest = function (evt, data, target) {\n var promiseId = data.promiseId;\n var argsObj = deserialize(data.args) || {};\n var method = data.method;\n var windowId = evt.sender.getOwnerBrowserWindow().id;\n target = windowId;\n var args = [];\n var i = 0;\n while (argsObj.hasOwnProperty(i)) {\n args.push(argsObj[i]);\n i++;\n }\n this._apiMethods(method, promiseId, args, target);\n};\n\n/**\n * @private\n * @param {object} response - response\n * @param {number} target - window target id\n * @returns {void}\n */\nDownstreamElectronBE.prototype._send = function (response, target) {\n try {\n var windows = (__webpack_require__(7194).BrowserWindow.getAllWindows)();\n for (var i = 0, j = windows.length; i < j; i++) {\n if (windows[i].id === target) {\n windows[i].webContents.send('downstreamElectronFE', response);\n break;\n }\n }\n } catch (err) {\n console.error('internal error ocurred', err);\n }\n};\n\n/**\n * @private\n * @returns {void}\n */\nDownstreamElectronBE.prototype._serveOfflineContent = function () {\n var self = this;\n var maxOfflineContentPortRange = appSettings.getSettings().maxOfflineContentPortRange;\n this.server = new Server(this.offlineController, this.downloadsController, maxOfflineContentPortRange, this._offlineContentPort);\n this.server.serveOfflineContent(function (offlinePort) {\n self._offlineContentPort = offlinePort;\n });\n};\n\n/**\n *\n * @param {string} manifestId - manifest identifier\n * @returns {string} - offline path\n */\nDownstreamElectronBE.prototype.getOfflinePath = function (manifestId) {\n var offlinePath = appSettings.getSettings().offlineDomain;\n var offlineContentPort = this._offlineContentPort;\n if (offlineContentPort) {\n offlinePath += ':' + offlineContentPort;\n }\n offlinePath += '/' + encodeURIComponent(appSettings.getSettings().downloadsName) + '/' + encodeURIComponent(manifestId) + '/';\n return offlinePath;\n};\n\n/**\n *\n * @param {string} subscriberId - subscriber identifier\n * @param {object} err - error\n * @param {object} result - result\n * @param {number} target - window target id\n * @param {boolean} subscriberFinished - download finished\n * @returns {void}\n */\nDownstreamElectronBE.prototype.processSubscriber = function (subscriberId, err, result, target, subscriberFinished) {\n var response = {};\n response.subscriberId = subscriberId;\n response.status = err ? 'ERROR' : 'OK';\n response.err = err;\n response.result = result;\n response.subscriberFinished = subscriberFinished;\n this._send(response, target);\n if (subscriberFinished) {\n this.subscribersController.removeAllManifestSubscribersById(subscriberId);\n }\n};\n\n//---------------------------\nmodule.exports = {\n init: function init(userSettings) {\n appSettings.load(userSettings);\n return new DownstreamElectronBE();\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYzMC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNhOztBQUViLElBQU1BLENBQUMsR0FBR0MsbUJBQU8sQ0FBQyxJQUFZLENBQUM7QUFDL0IsSUFBTUMsU0FBUyxHQUFHRCxtQkFBTyxDQUFDLElBQXFCLENBQUM7QUFFaEQs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2VJZCIsImdldFVVSUQiLCJlcnJvckluZm8iLCJjbG9uZSIsInNsaWNlIiwiZXJyb3IiLCJkZXRhaWxzIiwiY29uc29sZSIsIkRhdGUiLCJzdHJpbmdpZnkiLCJlIiwidW5zaGlmdCIsIm1ldGhvZCIsIl9nZXRNZXRob2QiLCJhcHBseSIsImlwY01haW4iLCJvbiIsIl9vbkFwaVJlcXVlc3QiLCJtYW5pZmVzdENvbnRyb2xsZXIiLCJvZmZsaW5lQ29udHJvbGxlciIsImRvd25sb2Fkc0NvbnRyb2xsZXIiLCJzdWJzY3JpYmVyc0NvbnRyb2xsZXIiLCJuYW1lcyIsInNwbGl0IiwiaSIsImoiLCJsZW5ndGgiLCJldnQiLCJkYXRhIiwiYXJnc09iaiIsIndpbmRvd0lkIiwic2VuZGVyIiwiZ2V0T3duZXJCcm93c2VyV2luZG93IiwiaWQiLCJoYXNPd25Qcm9wZXJ0eSIsInB1c2giLCJ3aW5kb3dzIiwiQnJvd3NlcldpbmRvdyIsImdldEFsbFdpbmRvd3MiLCJ3ZWJDb250ZW50cyIsInNlbmQiLCJtYXhPZmZsaW5lQ29udGVudFBvcnRSYW5nZSIsInNlcnZlT2ZmbGluZUNvbnRlbnQiLCJvZmZsaW5lUG9ydCIsImdldE9mZmxpbmVQYXRoIiwib2ZmbGluZVBhdGgiLCJvZmZsaW5lRG9tYWluIiwib2ZmbGluZUNvbnRlbnRQb3J0IiwiZW5jb2RlVVJJQ29tcG9uZW50IiwiZG93bmxvYWRzTmFtZSIsInByb2Nlc3NTdWJzY3JpYmVyIiwic3Vic2NyaWJlcklkIiwic3Vic2NyaWJlckZpbmlzaGVkIiwicmVtb3ZlQWxsTWFuaWZlc3RTdWJzY3JpYmVyc0J5SWQiLCJtb2R1bGUiLCJleHBvcnRzIiwiaW5pdCIsInVzZXJTZXR0aW5ncyIsImxvYWQiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1630\n")},9977:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fieldsPicker = __webpack_require__(1408);\nmodule.exports = function AudioRepresentation(attr) {\n fieldsPicker(this, ["audioSamplingRate", "bandwidth", "id", "lang", "durationInS"], attr);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTk3Ny5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxZQUFZLEdBQUdDLG1CQUFPLENBQUMsSUFBMEIsQ0FBQztBQUV4REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsU0FBU0MsbUJBQW1CQSxDQUFFQyxJQUFJLEVBQUU7RUFDbkRMLFlBQVksQ0FBQyxJQUFJLEVBQUUsQ0FDakIsbUJBQW1CLEVBQ25CLFdBQVcsRUFDWCxJQUFJLEVBQ0osTUFBTSxFQUNOLGFBQWEsQ0FDZCxFQUFFSyxJQUFJLENBQUM7QUFDVixDQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vZG93bnN0cmVhbS1lbGVjdHJvbi8uL2FwaS9tYW5pZmVzdC9qc29uL2F1ZGlvLXJlcHJlc2VudGF0aW9uLmpzP2UzMzQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5jb25zdCBmaWVsZHNQaWNrZXIgPSByZXF1aXJlKFwiLi4vLi4vdXRpbC9maWVsZHMtcGlja2VyXCIpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIEF1ZGlvUmVwcmVzZW50YXRpb24gKGF0dHIpIHtcbiAgZmllbGRzUGlja2VyKHRoaXMsIFtcbiAgICBcImF1ZGlvU2FtcGxpbmdSYXRlXCIsXG4gICAgXCJiYW5kd2lkdGhcIixcbiAgICBcImlkXCIsXG4gICAgXCJsYW5nXCIsXG4gICAgXCJkdXJhdGlvbkluU1wiXG4gIF0sIGF0dHIpO1xufTtcbiJdLCJuYW1lcyI6WyJmaWVsZHNQaWNrZXIiLCJyZXF1aXJlIiwibW9kdWxlIiwiZXhwb3J0cyIsIkF1ZGlvUmVwcmVzZW50YXRpb24iLCJhdHRyIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9977\n')},2317:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fieldsPicker = __webpack_require__(1408);\nmodule.exports = function LinkSave(attr) {\n fieldsPicker(this, ["id", "contentType", "bandwidth", "remoteUrl", "stats", "localUrl"], attr);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMxNy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxZQUFZLEdBQUdDLG1CQUFPLENBQUMsSUFBMEIsQ0FBQztBQUV4REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsU0FBU0MsUUFBUUEsQ0FBRUMsSUFBSSxFQUFFO0VBQ3hDTCxZQUFZLENBQUMsSUFBSSxFQUFFLENBQ2pCLElBQUksRUFDSixhQUFhLEVBQ2IsV0FBVyxFQUNYLFdBQVcsRUFDWCxPQUFPLEVBQ1AsVUFBVSxDQUNYLEVBQUVLLElBQUksQ0FBQztBQUNWLENBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9kb3duc3RyZWFtLWVsZWN0cm9uLy4vYXBpL21hbmlmZXN0L2pzb24vbGluay1zYXZlLmpzPzFhMDgiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5jb25zdCBmaWVsZHNQaWNrZXIgPSByZXF1aXJlKFwiLi4vLi4vdXRpbC9maWVsZHMtcGlja2VyXCIpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIExpbmtTYXZlIChhdHRyKSB7XG4gIGZpZWxkc1BpY2tlcih0aGlzLCBbXG4gICAgXCJpZFwiLFxuICAgIFwiY29udGVudFR5cGVcIixcbiAgICBcImJhbmR3aWR0aFwiLFxuICAgIFwicmVtb3RlVXJsXCIsXG4gICAgXCJzdGF0c1wiLFxuICAgIFwibG9jYWxVcmxcIlxuICBdLCBhdHRyKTtcbn07Il0sIm5hbWVzIjpbImZpZWxkc1BpY2tlciIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiTGlua1NhdmUiLCJhdHRyIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2317\n')},1099:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fieldsPicker = __webpack_require__(1408);\nmodule.exports = function TextRepresentation(attr) {\n fieldsPicker(this, ["bandwidth", "id", "lang", "durationInS"], attr);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTA5OS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxZQUFZLEdBQUdDLG1CQUFPLENBQUMsSUFBMEIsQ0FBQztBQUN4REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsU0FBU0Msa0JBQWtCQSxDQUFFQyxJQUFJLEVBQUU7RUFDbERMLFlBQVksQ0FBQyxJQUFJLEVBQUUsQ0FDakIsV0FBVyxFQUNYLElBQUksRUFDSixNQUFNLEVBQ04sYUFBYSxDQUNkLEVBQUVLLElBQUksQ0FBQztBQUNWLENBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9kb3duc3RyZWFtLWVsZWN0cm9uLy4vYXBpL21hbmlmZXN0L2pzb24vdGV4dC1yZXByZXNlbnRhdGlvbi5qcz9lMDBiIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuY29uc3QgZmllbGRzUGlja2VyID0gcmVxdWlyZShcIi4uLy4uL3V0aWwvZmllbGRzLXBpY2tlclwiKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gVGV4dFJlcHJlc2VudGF0aW9uIChhdHRyKSB7XG4gIGZpZWxkc1BpY2tlcih0aGlzLCBbXG4gICAgXCJiYW5kd2lkdGhcIixcbiAgICBcImlkXCIsXG4gICAgXCJsYW5nXCIsXG4gICAgXCJkdXJhdGlvbkluU1wiXG4gIF0sIGF0dHIpO1xufTtcbiJdLCJuYW1lcyI6WyJmaWVsZHNQaWNrZXIiLCJyZXF1aXJlIiwibW9kdWxlIiwiZXhwb3J0cyIsIlRleHRSZXByZXNlbnRhdGlvbiIsImF0dHIiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1099\n')},6756:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fieldsPicker = __webpack_require__(1408);\nmodule.exports = function VideoRepresentation(attr) {\n fieldsPicker(this, ["bandwidth", "id", "height", "lang", "width", "durationInS"], attr);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjc1Ni5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxZQUFZLEdBQUdDLG1CQUFPLENBQUMsSUFBMEIsQ0FBQztBQUN4REMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsU0FBU0MsbUJBQW1CQSxDQUFFQyxJQUFJLEVBQUU7RUFDbkRMLFlBQVksQ0FBQyxJQUFJLEVBQUUsQ0FDakIsV0FBVyxFQUNYLElBQUksRUFDSixRQUFRLEVBQ1IsTUFBTSxFQUNOLE9BQU8sRUFDUCxhQUFhLENBQ2QsRUFBRUssSUFBSSxDQUFDO0FBQ1YsQ0FBQyIsInNvdXJjZXMiOlsid2VicGFjazovL2Rvd25zdHJlYW0tZWxlY3Ryb24vLi9hcGkvbWFuaWZlc3QvanNvbi92aWRlby1yZXByZXNlbnRhdGlvbi5qcz81MWE4Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuY29uc3QgZmllbGRzUGlja2VyID0gcmVxdWlyZShcIi4uLy4uL3V0aWwvZmllbGRzLXBpY2tlclwiKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gVmlkZW9SZXByZXNlbnRhdGlvbiAoYXR0cikge1xuICBmaWVsZHNQaWNrZXIodGhpcywgW1xuICAgIFwiYmFuZHdpZHRoXCIsXG4gICAgXCJpZFwiLFxuICAgIFwiaGVpZ2h0XCIsXG4gICAgXCJsYW5nXCIsXG4gICAgXCJ3aWR0aFwiLFxuICAgIFwiZHVyYXRpb25JblNcIlxuICBdLCBhdHRyKTtcbn07XG4iXSwibmFtZXMiOlsiZmllbGRzUGlja2VyIiwicmVxdWlyZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJWaWRlb1JlcHJlc2VudGF0aW9uIiwiYXR0ciJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///6756\n')},2069:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar _require = __webpack_require__(7194),\n net = _require.net;\nvar appSettings = __webpack_require__(8557);\nvar ManifestLoader = function () {\n function ManifestLoader() {}\n ManifestLoader.prototype.load = function (url) {\n return this.sendXMLHttpRequest(url);\n };\n ManifestLoader.prototype.sendXMLHttpRequest = function (url) {\n var req_options = Object.assign({\n url: url,\n method: 'GET'\n }, appSettings.getSettings().defaultManifestRequestOptions);\n return new Promise(function (resolve, reject) {\n var req = net.request(req_options);\n req.chunkedEncoding = appSettings.getSettings().useChunkedEncoding;\n req.on('error', function (err) {\n reject(err);\n });\n req.on('response', function (response) {\n response.on(\"error\", function (error) {\n reject(new Error(\"MANIFEST LOAD FAILURE \" + error));\n });\n var error;\n if (response.statusCode >= 400) {\n error = response.statusMessage;\n }\n if (!error) {\n var body = [];\n response.on('data', function (chunk) {\n body.push(chunk);\n }).on('end', function () {\n body = Buffer.concat(body);\n resolve({\n response: body,\n url: url\n });\n });\n } else {\n reject(new Error(\"MANIFEST LOAD FAILURE \" + error));\n }\n });\n req.end();\n });\n };\n return ManifestL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xldCByZXEgPSBuZXQucmVxdWVzdChyZXFfb3B0aW9ucyk7XG4gICAgICByZXEuY2h1bmtlZEVuY29kaW5nID0gYXBwU2V0dGluZ3MuZ2V0U2V0dGluZ3MoKS51c2VDaHVua2VkRW5jb2Rpbmc7XG5cbiAgICAgIHJlcS5vbignZXJyb3InLCAoZXJyKSA9PiB7XG4gICAgICAgIHJlamVjdChlcnIpO1xuICAgICAgfSk7XG5cbiAgICAgIHJlcS5vbigncmVzcG9uc2UnLCAocmVzcG9uc2UpID0+IHtcblxuICAgICAgICByZXNwb25zZS5vbihcImVycm9yXCIsIGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoXCJNQU5JRkVTVCBMT0FEIEZBSUxVUkUgXCIgKyBlcnJvcikpO1xuICAgICAgICB9KTtcblxuICAgICAgICBsZXQgZXJyb3I7XG4gICAgICAgIGlmIChyZXNwb25zZS5zdGF0dXNDb2RlID49IDQwMCkge1xuICAgICAgICAgICAgZXJyb3IgPSByZXNwb25zZS5zdGF0dXNNZXNzYWdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFlcnJvcikge1xuICAgICAgICAgIGxldCBib2R5ID0gW107XG4gICAgICAgICAgcmVzcG9uc2Uub24oJ2RhdGEnLCAoY2h1bmspID0+IHtcbiAgICAgICAgICAgIGJvZHkucHVzaChjaHVuayk7XG4gICAgICAgICAgfSkub24oJ2VuZCcsICgpID0+IHtcbiAgICAgICAgICAgIGJvZHkgPSBCdWZmZXIuY29uY2F0KGJvZHkpO1xuICAgICAgICAgICAgcmVzb2x2ZSh7cmVzcG9uc2U6IGJvZHksIHVybDogdXJsfSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZWplY3QobmV3IEVycm9yKFwiTUFOSUZFU1QgTE9BRCBGQUlMVVJFIFwiICsgZXJyb3IpKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXEuZW5kKCk7XG4gICAgfSk7XG4gIH07XG4gIHJldHVybiBNYW5pZmVzdExvYWRlcjtcbn0oKSk7XG5leHBvcnRzLk1hbmlmZXN0TG9hZGVyID0gTWFuaWZlc3RMb2FkZXI7XG4iXSwibmFtZXMiOlsiX3JlcXVpcmUiLCJyZXF1aXJlIiwibmV0IiwiYXBwU2V0dGluZ3MiLCJNYW5pZmVzdExvYWRlciIsInByb3RvdHlwZSIsImxvYWQiLCJ1cmwiLCJzZW5kWE1MSHR0cFJlcXVlc3QiLCJyZXFfb3B0aW9ucyIsIk9iamVjdCIsImFzc2lnbiIsIm1ldGhvZCIsImdldFNldHRpbmdzIiwiZGVmYXVsdE1hbmlmZXN0UmVxdWVzdE9wdGlvbnMiLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCIsInJlcSIsInJlcXVlc3QiLCJjaHVua2VkRW5jb2RpbmciLCJ1c2VDaHVua2VkRW5jb2RpbmciLCJvbiIsImVyciIsInJlc3BvbnNlIiwiZXJyb3IiLCJFcnJvciIsInN0YXR1c0NvZGUiLCJzdGF0dXNNZXNzYWdlIiwiYm9keSIsImNodW5rIiwicHVzaCIsIkJ1ZmZlciIsImNvbmNhdCIsImVuZCIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///2069\n")},1826:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fs = __webpack_require__(7147);\nvar path = __webpack_require__(1017);\n\n/**\n * @param {string} url - local url\n * @returns {Promise} promise\n * @constructor\n */\nfunction ManifestLocalLoader(url) {\n return new Promise(function (resolve, reject) {\n fs.readFile(path.resolve(url), "utf-8", function (err, content) {\n if (!err) {\n resolve(content);\n } else {\n reject(err);\n }\n });\n });\n}\nmodule.exports = ManifestLocalLoader;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTgyNi5qcyIsIm1hcHBpbmdzIjoiQ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WZlc3RMb2NhbExvYWRlciAodXJsKSB7XG4gIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgZnMucmVhZEZpbGUocGF0aC5yZXNvbHZlKHVybCksIFwidXRmLThcIiwgZnVuY3Rpb24gKGVyciwgY29udGVudCkge1xuICAgICAgaWYgKCFlcnIpIHtcbiAgICAgICAgcmVzb2x2ZShjb250ZW50KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJlamVjdChlcnIpO1xuICAgICAgfVxuICAgIH0pO1xuICB9KTtcbn1cbm1vZHVsZS5leHBvcnRzID0gTWFuaWZlc3RMb2NhbExvYWRlcjtcbiJdLCJuYW1lcyI6WyJmcyIsInJlcXVpcmUiLCJwYXRoIiwiTWFuaWZlc3RMb2NhbExvYWRlciIsInVybCIsIlByb21pc2UiLCJyZXNvbHZlIiwicmVqZWN0IiwicmVhZEZpbGUiLCJlcnIiLCJjb250ZW50IiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1826\n')},7151:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar ManifestLoader = __webpack_require__(2069);\nvar ManifestLocalLoader = __webpack_require__(1826);\n// const ManifestXML_1 = require(\"./../parser/manifest-xml\");\nvar ManifestXML_1 = __webpack_require__(5022);\nvar AllAdaptationSets_1 = __webpack_require__(3487);\nvar SnowflakeId_1 = __webpack_require__(4576);\nvar jsonRepresentation = __webpack_require__(7644);\nvar jsonRepresentationWithProtection = __webpack_require__(5628);\nvar manifestLoader = new ManifestLoader.ManifestLoader();\nvar urlParse = __webpack_require__(3720);\nvar encoding = __webpack_require__(2759);\nvar Manifest = function () {\n function Manifest(id) {\n if (!id) {\n this.id = String(SnowflakeId_1.SnowflakeId.getUUID());\n } else {\n this.id = id;\n }\n }\n Manifest.prototype._setUpUrl = function (url) {\n var pathName = urlParse(url).pathname;\n this.url = url;\n this.url_domain = url.substring(0, url.lastIndexOf('/') + 1);\n this.manifest_name = pathName.substring(pathName.lastIndexOf('/') + 1, pathName.length);\n };\n Manifest.prototype.load = function (url) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this._setUpUrl(url);\n var p = manifestLoader.load(url);\n p.then(function (v) {\n var isEncodingUTF16 = encoding.isUTF16(v.response);\n v.response = v.response.toString(isEncodingUTF16 ? 'utf16le' : 'utf-8');\n var xml = v.response;\n _this.manifestXML = new ManifestXML_1.ManifestXML();\n _this.manifestXML.parse(xml, function () {\n resolve();\n }, function (e) {\n reject(e);\n throw new Error(\"Manifest parsing error\");\n });\n }, function (e) {\n reject(e);\n });\n });\n };\n Manifest.prototype.loadWithManifest = function (url, manifest) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this._setUpUrl(url);\n _this.manifestXML = new ManifestXML_1.ManifestXML();\n _this.manifestXML.parse(manifest, function () {\n resolve();\n }, function (e) {\n reject(e);\n throw new Error(\"Manifest parsing error\");\n });\n });\n };\n Manifest.prototype.loadFromLocal = function (localPath, url) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!url || !localPath) {\n reject('wrong parameter');\n return;\n }\n ManifestLocalLoader(localPath).then(function (str) {\n _this._setUpUrl(url);\n _this.manifestXML = new ManifestXML_1.ManifestXML();\n _this.manifestXML.parse(str, function () {\n resolve();\n }, function (e) {\n reject(e);\n });\n }, function (e) {\n reject(e);\n });\n });\n };\n Manifest.prototype.loadFromStr = function (str, url) {\n this.url_domain = url.substring(0, url.lastIndexOf('/') + 1);\n this.manifest_name = url.substring(url.lastIndexOf('/') + 1, url.length);\n this.manifestXML = new ManifestXML_1.ManifestXML();\n this.manifestXML.parse(str);\n };\n Manifest.prototype.getAdaptationSets = function () {\n var vid = this.manifestXML.getVideoAdaptation();\n var audio = this.manifestXML.getAudioAdaptation();\n var text = this.manifestXML.getTextAdaptation();\n var all = new AllAdaptationSets_1.AllAdaptationSets(vid, audio, text);\n return all;\n };\n Manifest.prototype.getVideoRepresentations = function () {\n return this.manifestXML.getVideoAdaptation();\n };\n Manifest.prototype.getAudioRepresentations = function () {\n return this.manifestXML.getAudioAdaptation();\n };\n Manifest.prototype.getTextRepresentations = function () {\n return this.manifestXML.getTextAdaptation();\n };\n Manifest.prototype.getProtections = function () {\n var protections = {};\n protections.video = jsonRepresentationWithProtection(this.getVideoRepresentations());\n protections.audio = jsonRepresentationWithProtection(this.getAudioRepresentations());\n protections.text = jsonRepresentationWithProtection(this.getTextRepresentations());\n return protections;\n };\n Manifest.prototype.getRemoteDomain = function () {\n return this.url_domain;\n };\n Manifest.prototype.getManifestName = function () {\n return this.manifest_name;\n };\n Manifest.prototype.getManifestUrl = function () {\n return this.url;\n };\n Manifest.prototype.getManifestXML = function () {\n return this.manifestXML.getManifestXML();\n };\n Manifest.prototype.removeNode = function () {\n this.manifestXML.removeNode();\n };\n Manifest.prototype.getJsonInfo = function () {\n var json = {};\n json.id = this.id;\n json.audio = jsonRepresentation(this.getAudioRepresentations());\n json.video = jsonRepresentation(this.getVideoRepresentations());\n json.text = jsonRepresentation(this.getTextRepresentations());\n json.protections = this.getProtections();\n return json;\n };\n return Manifest;\n}();\nexports.G = Manifest;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzE1MS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxjQUFjLEdBQUdDLG1CQUFPLENBQUMsSUFBbUIsQ0FBQztBQUNuRCxJQUFNQyxtQkFBbUIsR0FBR0QsbUJBQU8sQ0FBQyxJQUF5QixDQUFDO0FBQzlEO0FBQ0EsSUFBTUUsYUFBYSxHQUFHRixtQkFBTyxDQUFDLElBQThCLENBQUM7QUFDN0QsSUFBTUcsbUJBQW1CLEdBQUdILG1CQUFPLENBQUMsSUFBK0IsQ0FBQztBQUNwRSxJQUFNSSxhQUFhLEdBQUdKLG1CQUFPLENBQUMsSUFBeU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WRhcHRhdGlvbiIsImF1ZGlvIiwiZ2V0QXVkaW9BZGFwdGF0aW9uIiwidGV4dCIsImdldFRleHRBZGFwdGF0aW9uIiwiYWxsIiwiQWxsQWRhcHRhdGlvblNldHMiLCJnZXRWaWRlb1JlcHJlc2VudGF0aW9ucyIsImdldEF1ZGlvUmVwcmVzZW50YXRpb25zIiwiZ2V0VGV4dFJlcHJlc2VudGF0aW9ucyIsImdldFByb3RlY3Rpb25zIiwicHJvdGVjdGlvbnMiLCJ2aWRlbyIsImdldFJlbW90ZURvbWFpbiIsImdldE1hbmlmZXN0TmFtZSIsImdldE1hbmlmZXN0VXJsIiwiZ2V0TWFuaWZlc3RYTUwiLCJyZW1vdmVOb2RlIiwiZ2V0SnNvbkluZm8iLCJqc29uIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///7151\n")},4033:function(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar BASE64 = __webpack_require__(7769);\nvar pssh = __webpack_require__(2712);\nvar MPEG_DASH_PROTECTION_SCHEME_ID_URI = 'urn:mpeg:dash:mp4protection:2011';\nvar WIDEVINE_SCHEME_ID_URI = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed';\nvar __extends = this && this.__extends || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) {\n d[p] = b[p];\n }\n }\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar ManifestNode_1 = __webpack_require__(8243);\nvar RepresentationNode_1 = __webpack_require__(814);\nvar AdaptationSetNode = function (_super) {\n __extends(AdaptationSetNode, _super);\n function AdaptationSetNode(node, xml) {\n _super.call(this, node, xml);\n this.representationColl = [];\n this.contentProtections = [];\n this.parse();\n }\n AdaptationSetNode.prototype.parse = function () {\n var rep = this.currentNode.getElementsByTagName('Representation');\n for (var i = 0; i < rep.length; i++) {\n var repNode = new RepresentationNode_1.RepresentationNode(rep[i], this.xml);\n this.representationColl[i] = repNode;\n if (this.representationColl[0].hasMimeType()) {\n {\n this.attributeList['mimeType'] = this.representationColl[0].getMimeType();\n }\n }\n }\n var contentProtections = this.currentNode.getElementsByTagName('ContentProtection');\n var KID;\n // find CENC KEY ID if there is some\n for (var _i = 0; _i < contentProtections.length; _i++) {\n var attrs = contentProtections[_i].attributes;\n var schemeIdUri = attrs.getNamedItem(\"schemeIdUri\");\n if (schemeIdUri && schemeIdUri.value.toLowerCase() === MPEG_DASH_PROTECTION_SCHEME_ID_URI) {\n if (attrs.getNamedItem(\"cenc:default_KID\")) {\n KID = attrs.getNamedItem(\"cenc:default_KID\").value;\n // Get KID (base64 decoded) as byte array\n KID = BASE64.toByteArray(KID);\n break;\n }\n }\n }\n for (var _i2 = 0; _i2 < contentProtections.length; _i2++) {\n var _attrs = contentProtections[_i2].attributes;\n if (_attrs.getNamedItem(\"schemeIdUri\")) {\n var scheme = _attrs.getNamedItem(\"schemeIdUri\").value.toLowerCase();\n var cenc = contentProtections[_i2].getElementsByTagName(\"cenc:pssh\");\n if (cenc.length) {\n var contentProtection = {\n schemeIdUri: scheme,\n cencPSSH: cenc[0].childNodes[0].data\n };\n this.contentProtections.push(contentProtection);\n } else if (KID && scheme === WIDEVINE_SCHEME_ID_URI) {\n var psshWV = pssh.createWidevinePssh(KID);\n var _contentProtection = {\n schemeIdUri: scheme,\n cencPSSH: psshWV\n };\n this.contentProtections.push(_contentProtection);\n }\n }\n }\n };\n AdaptationSetNode.prototype.getContentProtections = function () {\n return this.contentProtections;\n };\n AdaptationSetNode.prototype.getWidevineProtection = function () {\n return this.contentProtections.filter(function (item) {\n return item.schemeIdUri && item.schemeIdUri.toLowerCase() === WIDEVINE_SCHEME_ID_URI;\n });\n };\n AdaptationSetNode.prototype.isMimeType = function (str) {\n return this.attributeList['mimeType'].indexOf(str) != -1 ? true : false;\n };\n AdaptationSetNode.prototype.isContentType = function (str) {\n return this.attributeList['contentType'] && this.attributeList['contentType'].indexOf(str) != -1 ? true : false;\n };\n return AdaptationSetNode;\n}(ManifestNode_1.ManifestNode);\nexports.AdaptationSetNode = AdaptationSetNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAzMy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxNQUFNLEdBQUdDLG1CQUFPLENBQUMsSUFBVyxDQUFDO0FBQ25DLElBQU1DLElBQUksR0FBR0QsbUJBQU8sQ0FBQyxJQUFRLENBQUM7QUFDOUIsSUFBTUUsa0NBQWtDLEdBQUcsa0NBQWtDO0FBQzdFLElBQU1DLHNCQUFzQixHQUFHLCtDQUErQztBQUU5RSxJQUFNQyxTQUFTLEdBQUksSUFBSSxJQUFJLElBQUksQ0FBQ0EsU0FBUyxJQUFLLFVBQVVDLENBQUMsRUFBRUMsQ0FBQyxFQUFFO0VBQ3hELEtBQUssSUFBSUMsQ0FBQyxJQUFJRCxDQUFDLEVBQUU7SUFDZixJQUFJQSxDQUFDLENBQUNFLGNBQWMsQ0FBQ0QsQ0FBQyxDQUFDLEVBQUU7TUFDdkJGLENBQUMsQ0FBQ0UsQ0FBQyxDQUFDLEdBQUdELENBQUMsQ0FBQ0MsQ0FBQyxDQUFDO0lBQ2I7RUFDRjtFQUNBLFNBQVNFLEVBQUVBLENBQUEsRUFBSTtJQUNiLElBQUksQ0FBQ0MsV0FBVyxHQUFHTCxDQUFDO0VBQ3RCO0VBRUFBLENBQUMsQ0FBQ00sU0FBUyxHQUFHTCxDQUFDLEtBQUssSUFBSSxHQUFHTSxNQUFNLENBQUNDLE1BQU0sQ0FBQ1AsQ0FBQyxDQUFDLElBQUlHLEVBQUUsQ0FBQ0UsU0FBUyxHQUFHTCxDQUFDLENBQUNLLFNBQVMsRUFBRSxJQUFJRixFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ3RGLENBQUM7QUFDTCxJQUFNSyxjQUFjLEdBQ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pZmVzdE5vZGVfMSIsIlJlcHJlc2VudGF0aW9uTm9kZV8xIiwiQWRhcHRhdGlvblNldE5vZGUiLCJfc3VwZXIiLCJub2RlIiwieG1sIiwiY2FsbCIsInJlcHJlc2VudGF0aW9uQ29sbCIsImNvbnRlbnRQcm90ZWN0aW9ucyIsInBhcnNlIiwicmVwIiwiY3VycmVudE5vZGUiLCJnZXRFbGVtZW50c0J5VGFnTmFtZSIsImkiLCJsZW5ndGgiLCJyZXBOb2RlIiwiUmVwcmVzZW50YXRpb25Ob2RlIiwiaGFzTWltZVR5cGUiLCJhdHRyaWJ1dGVMaXN0IiwiZ2V0TWltZVR5cGUiLCJLSUQiLCJhdHRycyIsImF0dHJpYnV0ZXMiLCJzY2hlbWVJZFVyaSIsImdldE5hbWVkSXRlbSIsInZhbHVlIiwidG9Mb3dlckNhc2UiLCJ0b0J5dGVBcnJheSIsInNjaGVtZSIsImNlbmMiLCJjb250ZW50UHJvdGVjdGlvbiIsImNlbmNQU1NIIiwiY2hpbGROb2RlcyIsImRhdGEiLCJwdXNoIiwicHNzaFdWIiwiY3JlYXRlV2lkZXZpbmVQc3NoIiwiZ2V0Q29udGVudFByb3RlY3Rpb25zIiwiZ2V0V2lkZXZpbmVQcm90ZWN0aW9uIiwiZmlsdGVyIiwiaXRlbSIsImlzTWltZVR5cGUiLCJzdHIiLCJpbmRleE9mIiwiaXNDb250ZW50VHlwZSIsIk1hbmlmZXN0Tm9kZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///4033\n")},3487:(__unused_webpack_module,exports)=>{"use strict";eval("\n\nvar AllAdaptationSets = function () {\n function AllAdaptationSets(vid, audio, text) {\n this.videoAdaptation = vid;\n if (audio) {\n this.audioAdaptation = audio;\n }\n if (text) {\n this.textAdaptation = text;\n }\n }\n return AllAdaptationSets;\n}();\nexports.AllAdaptationSets = AllAdaptationSets;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,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uU2V0cyA9IEFsbEFkYXB0YXRpb25TZXRzO1xuIl0sIm5hbWVzIjpbIkFsbEFkYXB0YXRpb25TZXRzIiwidmlkIiwiYXVkaW8iLCJ0ZXh0IiwidmlkZW9BZGFwdGF0aW9uIiwiYXVkaW9BZGFwdGF0aW9uIiwidGV4dEFkYXB0YXRpb24iLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3487\n")},5628:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar AudioRepresentation = __webpack_require__(9977);\nvar VideoRepresentation = __webpack_require__(6756);\nvar TextRepresentation = __webpack_require__(1099);\nmodule.exports = function jsonRepresentation(representations) {\n var reprObj = [];\n for (var i = 0, j = representations.length; i < j; i++) {\n var cols = representations[i].representationColl;\n for (var k = 0, l = cols.length; k < l; k++) {\n var attr = cols[k].attributeList;\n var contentType = attr.contentType || attr.mimeType;\n if (contentType.indexOf("video") >= 0) {\n contentType = "video";\n } else if (contentType.indexOf("audio") >= 0) {\n contentType = "audio";\n } else {\n contentType = "text";\n }\n switch (contentType) {\n case "audio":\n reprObj.push(new AudioRepresentation(attr));\n break;\n case "video":\n reprObj.push(new VideoRepresentation(attr));\n break;\n default:\n reprObj.push(new TextRepresentation(attr));\n }\n reprObj[k].protections = representations[i].contentProtections.slice();\n }\n }\n return reprObj;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTYyOC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxtQkFBbUIsR0FBR0MsbUJBQU8sQ0FBQyxJQUE4QixDQUFDO0FBQ25FLElBQU1DLG1CQUFtQixHQUFHRCxtQkFBTyxDQUFDLElBQThCLENBQUM7QUFDbkUsSUFBTUUsa0JBQWtCLEdBQUdGLG1CQUFPLENBQUMsSUFBNkIsQ0FBQztBQUVqRUcsTUFBTSxDQUFDQyxPQUFPLE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QgY29scyA9IHJlcHJlc2VudGF0aW9uc1tpXS5yZXByZXNlbnRhdGlvbkNvbGw7XG4gICAgZm9yIChsZXQgayA9IDAsIGwgPSBjb2xzLmxlbmd0aDsgayA8IGw7IGsrKykge1xuICAgICAgY29uc3QgYXR0ciA9IGNvbHNba10uYXR0cmlidXRlTGlzdDtcbiAgICAgIGxldCBjb250ZW50VHlwZSA9IGF0dHIuY29udGVudFR5cGUgfHwgYXR0ci5taW1lVHlwZTtcbiAgICAgIGlmIChjb250ZW50VHlwZS5pbmRleE9mKFwidmlkZW9cIikgPj0gMCkge1xuICAgICAgICBjb250ZW50VHlwZSA9IFwidmlkZW9cIjtcbiAgICAgIH0gZWxzZSBpZiAoY29udGVudFR5cGUuaW5kZXhPZihcImF1ZGlvXCIpID49IDApIHtcbiAgICAgICAgY29udGVudFR5cGUgPSBcImF1ZGlvXCI7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb250ZW50VHlwZSA9IFwidGV4dFwiO1xuICAgICAgfVxuICAgICAgc3dpdGNoIChjb250ZW50VHlwZSkge1xuICAgICAgICBjYXNlIFwiYXVkaW9cIjpcbiAgICAgICAgICByZXByT2JqLnB1c2gobmV3IEF1ZGlvUmVwcmVzZW50YXRpb24oYXR0cikpO1xuICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgXCJ2aWRlb1wiOlxuICAgICAgICAgIHJlcHJPYmoucHVzaChuZXcgVmlkZW9SZXByZXNlbnRhdGlvbihhdHRyKSk7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICByZXByT2JqLnB1c2gobmV3IFRleHRSZXByZXNlbnRhdGlvbihhdHRyKSk7XG4gICAgICB9XG4gICAgICByZXByT2JqW2tdLnByb3RlY3Rpb25zID0gcmVwcmVzZW50YXRpb25zW2ldLmNvbnRlbnRQcm90ZWN0aW9ucy5zbGljZSgpO1xuICAgIH1cblxuICB9XG4gIHJldHVybiByZXByT2JqO1xufTtcbiJdLCJuYW1lcyI6WyJBdWRpb1JlcHJlc2VudGF0aW9uIiwicmVxdWlyZSIsIlZpZGVvUmVwcmVzZW50YXRpb24iLCJUZXh0UmVwcmVzZW50YXRpb24iLCJtb2R1bGUiLCJleHBvcnRzIiwianNvblJlcHJlc2VudGF0aW9uIiwicmVwcmVzZW50YXRpb25zIiwicmVwck9iaiIsImkiLCJqIiwibGVuZ3RoIiwiY29scyIsInJlcHJlc2VudGF0aW9uQ29sbCIsImsiLCJsIiwiYXR0ciIsImF0dHJpYnV0ZUxpc3QiLCJjb250ZW50VHlwZSIsIm1pbWVUeXBlIiwiaW5kZXhPZiIsInB1c2giLCJwcm90ZWN0aW9ucyIsImNvbnRlbnRQcm90ZWN0aW9ucyIsInNsaWNlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5628\n')},7644:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar AudioRepresentation = __webpack_require__(9977);\nvar VideoRepresentation = __webpack_require__(6756);\nvar TextRepresentation = __webpack_require__(1099);\nmodule.exports = function jsonRepresentation(representations) {\n var reprObj = [];\n for (var i = 0, j = representations.length; i < j; i++) {\n var cols = representations[i].representationColl;\n for (var k = 0, l = cols.length; k < l; k++) {\n var attr = cols[k].attributeList;\n var contentType = attr.contentType || attr.mimeType;\n if (contentType.indexOf("video") >= 0) {\n contentType = "video";\n } else if (contentType.indexOf("audio") >= 0) {\n contentType = "audio";\n } else {\n contentType = "text";\n }\n switch (contentType) {\n case "audio":\n reprObj.push(new AudioRepresentation(attr));\n break;\n case "video":\n reprObj.push(new VideoRepresentation(attr));\n break;\n default:\n reprObj.push(new TextRepresentation(attr));\n }\n }\n }\n return reprObj;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzY0NC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxtQkFBbU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3RoOyBpIDwgajsgaSsrKSB7XG4gICAgY29uc3QgY29scyA9IHJlcHJlc2VudGF0aW9uc1tpXS5yZXByZXNlbnRhdGlvbkNvbGw7XG4gICAgZm9yIChsZXQgayA9IDAsIGwgPSBjb2xzLmxlbmd0aDsgayA8IGw7IGsrKykge1xuICAgICAgY29uc3QgYXR0ciA9IGNvbHNba10uYXR0cmlidXRlTGlzdDtcbiAgICAgIGxldCBjb250ZW50VHlwZSA9IGF0dHIuY29udGVudFR5cGUgfHwgYXR0ci5taW1lVHlwZTtcbiAgICAgIGlmIChjb250ZW50VHlwZS5pbmRleE9mKFwidmlkZW9cIikgPj0gMCkge1xuICAgICAgICBjb250ZW50VHlwZSA9IFwidmlkZW9cIjtcbiAgICAgIH0gZWxzZSBpZiAoY29udGVudFR5cGUuaW5kZXhPZihcImF1ZGlvXCIpID49IDApIHtcbiAgICAgICAgY29udGVudFR5cGUgPSBcImF1ZGlvXCI7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb250ZW50VHlwZSA9IFwidGV4dFwiO1xuICAgICAgfVxuICAgICAgc3dpdGNoIChjb250ZW50VHlwZSkge1xuICAgICAgICBjYXNlIFwiYXVkaW9cIjpcbiAgICAgICAgICByZXByT2JqLnB1c2gobmV3IEF1ZGlvUmVwcmVzZW50YXRpb24oYXR0cikpO1xuICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgXCJ2aWRlb1wiOlxuICAgICAgICAgIHJlcHJPYmoucHVzaChuZXcgVmlkZW9SZXByZXNlbnRhdGlvbihhdHRyKSk7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICByZXByT2JqLnB1c2gobmV3IFRleHRSZXByZXNlbnRhdGlvbihhdHRyKSk7XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHJldHVybiByZXByT2JqO1xufTtcbiJdLCJuYW1lcyI6WyJBdWRpb1JlcHJlc2VudGF0aW9uIiwicmVxdWlyZSIsIlZpZGVvUmVwcmVzZW50YXRpb24iLCJUZXh0UmVwcmVzZW50YXRpb24iLCJtb2R1bGUiLCJleHBvcnRzIiwianNvblJlcHJlc2VudGF0aW9uIiwicmVwcmVzZW50YXRpb25zIiwicmVwck9iaiIsImkiLCJqIiwibGVuZ3RoIiwiY29scyIsInJlcHJlc2VudGF0aW9uQ29sbCIsImsiLCJsIiwiYXR0ciIsImF0dHJpYnV0ZUxpc3QiLCJjb250ZW50VHlwZSIsIm1pbWVUeXBlIiwiaW5kZXhPZiIsInB1c2giXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///7644\n')},8243:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar SnowflakeId_1 = __webpack_require__(4576);\nvar ManifestNode = function () {\n function ManifestNode(node, xml) {\n this.childCollection = [];\n this.attributeList = {};\n this.setCurrentNode(node);\n this.setChildCollection(node.childNodes);\n this.buildAttributeList(node, this.attributeList);\n this.setParentNode(node.parentNode);\n this.xml = xml;\n this.id = SnowflakeId_1.SnowflakeId.getUUID();\n }\n ManifestNode.prototype.setParentNode = function (node) {\n this.parentNode = node;\n };\n ManifestNode.prototype.setChildCollection = function (coll) {\n this.childCollection = coll;\n };\n ManifestNode.prototype.setCurrentNode = function (node) {\n this.currentNode = node;\n };\n ManifestNode.prototype.buildAttributeList = function (node, list) {\n this.writeAttributesToList(node, list);\n };\n ManifestNode.prototype.writeAttributesToList = function (node, list) {\n var attrList = node.attributes;\n for (var attr in attrList) {\n if (!list[attrList[attr].nodeName]) {\n list[attrList[attr].nodeName] = attrList[attr].nodeValue;\n }\n }\n if (node.parentNode !== null) {\n this.buildAttributeList(node.parentNode, list);\n }\n };\n ManifestNode.prototype.getCurrentNode = function () {\n return this.currentNode;\n };\n ManifestNode.prototype.markNodeForDownload = function (value) {\n var newAtt = this.xml.createAttribute('markForDownload');\n if (!value) {\n this.currentNode.removeAttribute('markForDownload');\n } else {\n newAtt.value = value.toString();\n this.currentNode.setAttributeNode(newAtt);\n }\n };\n ManifestNode.prototype.getAttributeList = function () {\n return this.attributeList;\n };\n return ManifestNode;\n}();\nexports.ManifestNode = ManifestNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxhQUFhLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN4RCxJQUFNQyxZQUFZLEdBQUksWUFBWTtFQUNoQyxTQUFTQSxZQUFZQSxDQUFFQyxJQUFJLEVBQUVDLEdBQUcsRUFBRTtJQUNoQyxJQUFJLENBQUNDLGVBQWUsR0FBRyxFQUFFO0lBQ3pCLElBQUksQ0FBQ0MsYUFBYSxHQUFHLENBQUMsQ0FBQztJQUN2QixJQUFJLENBQUNDLGNBQWMsQ0FBQ0osSUFBSSxDQUFDO0lBQ3pCLElBQUksQ0FBQ0ssa0JBQWtCLENBQUNMLElBQUksQ0FBQ00sVUFBVSxDQUFDO0lBQ3hDLElBQUksQ0FBQ0Msa0JBQWtCLENBQUNQLElBQUksRUFBRSxJQUFJLENBQUNHLGFBQWEsQ0FBQztJQUNqRCxJQUFJLENBQUNLLGFBQWEsQ0FBQ1IsSUFBSSxDQUFDUyxVQUFVLENBQUM7SUFDbkMsSUFBSSxDQUFDUixHQUFHLEdBQUdBLEdBQUc7SUFDZCxJQUFJLENBQUNTLEVBQUUsR0FBR2IsYUFBYSxDQUFDYyxXQUFXLENBQUNDLE9BQU8sQ0FBQyxDQUFDO0VBQy9DO0VBRUFiLFlBQVksQ0FBQ2MsU0FBUyxDQUFDTCxhQUFhLEdBQUcsVUFBVVIsSUFBSSxFQUFFO0lBQ3JELElBQUksQ0FBQ1MsVUFBVSxHQUFHVCxJQUFJO0VBQ3hCLENBQUM7RUFDREQsWUFBWSxDQUFDYyxTQUFTLENBQUNSLGtCQUFrQixHQUFHLFVBQVVTLElBQU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mV0dXJuIE1hbmlmZXN0Tm9kZTtcbn0oKSk7XG5leHBvcnRzLk1hbmlmZXN0Tm9kZSA9IE1hbmlmZXN0Tm9kZTtcbiJdLCJuYW1lcyI6WyJTbm93Zmxha2VJZF8xIiwicmVxdWlyZSIsIk1hbmlmZXN0Tm9kZSIsIm5vZGUiLCJ4bWwiLCJjaGlsZENvbGxlY3Rpb24iLCJhdHRyaWJ1dGVMaXN0Iiwic2V0Q3VycmVudE5vZGUiLCJzZXRDaGlsZENvbGxlY3Rpb24iLCJjaGlsZE5vZGVzIiwiYnVpbGRBdHRyaWJ1dGVMaXN0Iiwic2V0UGFyZW50Tm9kZSIsInBhcmVudE5vZGUiLCJpZCIsIlNub3dmbGFrZUlkIiwiZ2V0VVVJRCIsInByb3RvdHlwZSIsImNvbGwiLCJjdXJyZW50Tm9kZSIsImxpc3QiLCJ3cml0ZUF0dHJpYnV0ZXNUb0xpc3QiLCJhdHRyTGlzdCIsImF0dHJpYnV0ZXMiLCJhdHRyIiwibm9kZU5hbWUiLCJub2RlVmFsdWUiLCJnZXRDdXJyZW50Tm9kZSIsIm1hcmtOb2RlRm9yRG93bmxvYWQiLCJ2YWx1ZSIsIm5ld0F0dCIsImNyZWF0ZUF0dHJpYnV0ZSIsInJlbW92ZUF0dHJpYnV0ZSIsInRvU3RyaW5nIiwic2V0QXR0cmlidXRlTm9kZSIsImdldEF0dHJpYnV0ZUxpc3QiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},886:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar AdaptationSetNode_1 = __webpack_require__(4033);\nvar DOMParser = (__webpack_require__(2008).DOMParser);\nvar ManifestXML = function () {\n function ManifestXML() {}\n ManifestXML.prototype.parse = function (str, onSuccess, onError) {\n var parser;\n if (typeof onSuccess === \"function\" && typeof onError === \"function\") {\n parser = new DOMParser({\n errorHandler: {\n warning: function warning() {},\n error: onError,\n fatalError: onError\n }\n });\n } else {\n parser = new DOMParser();\n }\n this.adaptationSetColl = [];\n this.xml = parser.parseFromString(str, \"application/xml\");\n this.parseAdaptations();\n if (typeof onSuccess === \"function\") {\n onSuccess();\n }\n };\n ManifestXML.prototype.getAdaptationSetNodeName = function () {\n return 'AdaptationSet';\n };\n ManifestXML.prototype.getRepresentationNodeName = function () {\n return 'Representation';\n };\n ManifestXML.prototype.parseAdaptations = function () {\n var adaptations = this.xml.getElementsByTagName('AdaptationSet');\n for (var i = 0; i < adaptations.length; i++) {\n var adaptNode = new AdaptationSetNode_1.AdaptationSetNode(adaptations[i], this.xml);\n this.adaptationSetColl[i] = adaptNode;\n }\n };\n ManifestXML.prototype.getVideoAdaptation = function () {\n return this.getAdaptations('video');\n };\n ManifestXML.prototype.getAudioAdaptation = function () {\n return this.getAdaptations('audio');\n };\n ManifestXML.prototype.getTextAdaptation = function () {\n return this.getAdaptations('text');\n };\n ManifestXML.prototype.getManifestXML = function () {\n return this.xml;\n };\n ManifestXML.prototype.getAdaptations = function (which) {\n var adaptations = this.adaptationSetColl.map(function (item) {\n return item;\n }).filter(function (item) {\n if (item.isMimeType(which) || item.isContentType(which)) {\n return true;\n }\n });\n return adaptations;\n };\n ManifestXML.cloneXML = function (xml) {\n var newDocument = xml.implementation.createDocument(xml.namespaceURI, null, null);\n var newNode = newDocument.importNode(xml.documentElement, true);\n newDocument.appendChild(newNode);\n return newDocument;\n };\n ManifestXML.prototype.removeNode = function () {\n var self = this;\n var representationCollection = this.xml.documentElement.getElementsByTagName(this.getRepresentationNodeName());\n var adaptationCollection = this.xml.documentElement.getElementsByTagName(this.getAdaptationSetNodeName());\n var repArray = [];\n var adaptationArray = [];\n for (var i = 0; i < representationCollection.length; i++) {\n repArray[i] = representationCollection[i];\n }\n repArray.forEach(function (item) {\n var markForDownload = item.attributes.getNamedItem(\"markForDownload\") && item.attributes.getNamedItem(\"markForDownload\").value == 'true' ? true : false;\n if (!markForDownload) {\n item.parentNode.removeChild(item);\n }\n item.removeAttribute('markForDownload');\n }, this);\n for (var _i = 0; _i < adaptationCollection.length; _i++) {\n adaptationArray[_i] = adaptationCollection[_i];\n }\n adaptationArray.forEach(function (item) {\n if (!item.getElementsByTagName(self.getRepresentationNodeName()).length) {\n item.parentNode.removeChild(item);\n }\n });\n };\n return ManifestXML;\n}();\nexports.ManifestXML = ManifestXML;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODg2LmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiLElBQU1BLG1CQUFtQixHQUFHQyxtQkFBTyxDQUFDLElBQXVCLENBQUM7QUFDNUQsSUFBTUMsU0FBUyxHQUFHRCxxQ0FBbUM7QUFDckQsSUFBTUUsV0FBVyxHQUFJLFlBQVk7RUFDL0IsU0FBU0EsV0FBV0EsQ0FBQSxFQUFJLENBQ3hCO0VBQ0FBLFdBQVcsQ0FBQ0MsU0FBUyxDQUFDQyxLQUFLLEdBQUcsVUFBVUMsR0FBRyxFQUFFQyxTQUFTLEVBQUVDLE9BQU8sRUFBRTtJQUMvRCxJQUFJQyxNQUFNO0lBQ1YsSUFBSSxPQUFPRixTQUFTLEtBQUssVUFBVSxJQUFJLE9BQU9DLE9BQU8sS0FBSyxVQUFVLEVBQUU7TUFDcEVDLE1BQU0sR0FBRyxJQUFJUCxTQUFTLENBQUM7UUFDckJRLFlBQVksRUFBRTtVQUNaQyxPQUFPLEVBQUUsU0FBQUEsUUFBQSxFQUFZLENBQUUsQ0FBQztVQUN4QkMsS0FBSyxFQUFFSixPQUFPO1VBQUVLLFVBQVUsRUFBRUw7UUFDOUI7TUFDRixDQUFDLENBQUM7SUFFSixDQUFDLE1BQU07TUFDTEMsTUFBTSxHQUFHLElBQUlQLFNBQVMsQ0FBQyxDQUFDO0lBQzFCO0lBQ0EsSUFBSSxDQUFDWSxpQkFBaUIsR0FBRyxFQUFFO0lBQzNCLElBQUksQ0FBQ0MsR0FB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ndoaWNoIiwibWFwIiwiaXRlbSIsImZpbHRlciIsImlzTWltZVR5cGUiLCJpc0NvbnRlbnRUeXBlIiwiY2xvbmVYTUwiLCJuZXdEb2N1bWVudCIsImltcGxlbWVudGF0aW9uIiwiY3JlYXRlRG9jdW1lbnQiLCJuYW1lc3BhY2VVUkkiLCJuZXdOb2RlIiwiaW1wb3J0Tm9kZSIsImRvY3VtZW50RWxlbWVudCIsImFwcGVuZENoaWxkIiwicmVtb3ZlTm9kZSIsInNlbGYiLCJyZXByZXNlbnRhdGlvbkNvbGxlY3Rpb24iLCJhZGFwdGF0aW9uQ29sbGVjdGlvbiIsInJlcEFycmF5IiwiYWRhcHRhdGlvbkFycmF5IiwiZm9yRWFjaCIsIm1hcmtGb3JEb3dubG9hZCIsImF0dHJpYnV0ZXMiLCJnZXROYW1lZEl0ZW0iLCJ2YWx1ZSIsInBhcmVudE5vZGUiLCJyZW1vdmVDaGlsZCIsInJlbW92ZUF0dHJpYnV0ZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///886\n")},4826:(__unused_webpack_module,exports)=>{"use strict";eval("\n\nvar MediaUrl = function () {\n function MediaUrl(baseURL, mediaFile, mimeType, url_domain) {\n if (url_domain === void 0) {\n url_domain = '';\n }\n this.baseURL = '';\n if (baseURL.startsWith('http') === false) {\n this.baseURL = baseURL;\n }\n this.mediaFile = mediaFile.indexOf('/') !== -1 ? this.truncateMediaFilePath(mediaFile) : mediaFile;\n this.url_domain = url_domain;\n this.mimeType = mimeType;\n }\n MediaUrl.prototype.truncateMediaFilePath = function (mediaFile) {\n var startIndex = mediaFile.lastIndexOf('/');\n var front = mediaFile.substring(0, startIndex);\n var end = mediaFile.substring(startIndex + 1, mediaFile.length);\n this.baseURL += front;\n return end;\n };\n MediaUrl.prototype.getFileAddress = function () {\n return this.baseURL + this.mediaFile;\n };\n return MediaUrl;\n}();\nexports.MediaUrl = MediaUrl;//# sourceURL=[module]\n//# sourceMapp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VR5cGUgPSBtaW1lVHlwZTtcbiAgfVxuXG4gIE1lZGlhVXJsLnByb3RvdHlwZS50cnVuY2F0ZU1lZGlhRmlsZVBhdGggPSBmdW5jdGlvbiAobWVkaWFGaWxlKSB7XG4gICAgY29uc3Qgc3RhcnRJbmRleCA9IG1lZGlhRmlsZS5sYXN0SW5kZXhPZignLycpO1xuICAgIGNvbnN0IGZyb250ID0gbWVkaWFGaWxlLnN1YnN0cmluZygwLCBzdGFydEluZGV4KTtcbiAgICBjb25zdCBlbmQgPSBtZWRpYUZpbGUuc3Vic3RyaW5nKHN0YXJ0SW5kZXggKyAxLCBtZWRpYUZpbGUubGVuZ3RoKTtcbiAgICB0aGlzLmJhc2VVUkwgKz0gZnJvbnQ7XG4gICAgcmV0dXJuIGVuZDtcbiAgfTtcbiAgTWVkaWFVcmwucHJvdG90eXBlLmdldEZpbGVBZGRyZXNzID0gZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiB0aGlzLmJhc2VVUkwgKyB0aGlzLm1lZGlhRmlsZTtcbiAgfTtcbiAgcmV0dXJuIE1lZGlhVXJsO1xufSgpKTtcbmV4cG9ydHMuTWVkaWFVcmwgPSBNZWRpYVVybDtcbiJdLCJuYW1lcyI6WyJNZWRpYVVybCIsImJhc2VVUkwiLCJtZWRpYUZpbGUiLCJtaW1lVHlwZSIsInVybF9kb21haW4iLCJzdGFydHNXaXRoIiwiaW5kZXhPZiIsInRydW5jYXRlTWVkaWFGaWxlUGF0aCIsInByb3RvdHlwZSIsInN0YXJ0SW5kZXgiLCJsYXN0SW5kZXhPZiIsImZyb250Iiwic3Vic3RyaW5nIiwiZW5kIiwibGVuZ3RoIiwiZ2V0RmlsZUFkZHJlc3MiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4826\n")},7640:function(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar __extends = this && this.__extends || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) {\n d[p] = b[p];\n }\n }\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar MediaUrl_1 = __webpack_require__(4826);\nvar SegmentInformation_1 = __webpack_require__(5848);\nvar FragmentInformation = function (_super) {\n __extends(FragmentInformation, _super);\n function FragmentInformation(presentationDuration, bandwidth, baseUrl, representationID, mimeType, segmentTemplate) {\n _super.call(this, presentationDuration, bandwidth, baseUrl, representationID, mimeType);\n if (segmentTemplate) {\n this.segmentTemplate = segmentTemplate;\n this.mediaTemplate = this.segmentTemplate.media;\n this.mediaTemplate = this.replace$Bandwidth$(this.mediaTemplate, this.bandwidth);\n }\n if (this.segmentTemplate.media) {\n this.timelineItemList = this.segmentTemplate.SegmentTimeline;\n }\n this.createFragmentUrlsFromTimeline(this.timelineItemList);\n }\n FragmentInformation.prototype.createFragmentUrlsFromTimeline = function (segmentNodes) {\n for (var i = 0; i < segmentNodes.S.length; i++) {\n var fragment = this.mediaTemplate;\n fragment = this.replace$Time$(fragment, segmentNodes.S[i].t);\n this.mediaUrls.push(new MediaUrl_1.MediaUrl(this.baseUrl, fragment, this.mimeType));\n }\n };\n return FragmentInformation;\n}(SegmentInformation_1.SegmentInformation);\nexports.FragmentInformation = FragmentInformation;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzY0MC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxTQUFTLEdBQUksSUFBSSxJQUFJLElBQUksQ0FBQ0EsU0FBUyxJQUFLLFVBQVVDLENBQUMsRUFBRUMsQ0FBQyxFQUFFO0VBQ3hELEtBQUssSUFBSUMsQ0FBQyxJQUFJRCxDQUFDLEVBQUU7SUFDZixJQUFJQSxDQUFDLENBQUNFLGNBQWMsQ0FBQ0QsQ0FBQyxDQUFDLEVBQUU7TUFDdkJGLENBQUMsQ0FBQ0UsQ0FBQyxDQUFDL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XG4gIH07XG4gIHJldHVybiBGcmFnbWVudEluZm9ybWF0aW9uO1xufShTZWdtZW50SW5mb3JtYXRpb25fMS5TZWdtZW50SW5mb3JtYXRpb24pKTtcbmV4cG9ydHMuRnJhZ21lbnRJbmZvcm1hdGlvbiA9IEZyYWdtZW50SW5mb3JtYXRpb247Il0sIm5hbWVzIjpbIl9fZXh0ZW5kcyIsImQiLCJiIiwicCIsImhhc093blByb3BlcnR5IiwiX18iLCJjb25zdHJ1Y3RvciIsInByb3RvdHlwZSIsIk9iamVjdCIsImNyZWF0ZSIsIk1lZGlhVXJsXzEiLCJyZXF1aXJlIiwiU2VnbWVudEluZm9ybWF0aW9uXzEiLCJGcmFnbWVudEluZm9ybWF0aW9uIiwiX3N1cGVyIiwicHJlc2VudGF0aW9uRHVyYXRpb24iLCJiYW5kd2lkdGgiLCJiYXNlVXJsIiwicmVwcmVzZW50YXRpb25JRCIsIm1pbWVUeXBlIiwic2VnbWVudFRlbXBsYXRlIiwiY2FsbCIsIm1lZGlhVGVtcGxhdGUiLCJtZWRpYSIsInJlcGxhY2UkQmFuZHdpZHRoJCIsInRpbWVsaW5lSXRlbUxpc3QiLCJTZWdtZW50VGltZWxpbmUiLCJjcmVhdGVGcmFnbWVudFVybHNGcm9tVGltZWxpbmUiLCJzZWdtZW50Tm9kZXMiLCJpIiwiUyIsImxlbmd0aCIsImZyYWdtZW50IiwicmVwbGFjZSRUaW1lJCIsInQiLCJtZWRpYVVybHMiLCJwdXNoIiwiTWVkaWFVcmwiLCJTZWdtZW50SW5mb3JtYXRpb24iLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7640\n")},5022:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar ManifestXML_1 = __webpack_require__(886);\nvar StreamIndexNode_1 = __webpack_require__(2872);\nManifestXML_1.ManifestXML.prototype.getManifestType = function (xml) {\n return xml.getElementsByTagName('SmoothStreamingMedia').length !== 0 ? 'MSS' : 'DASH';\n};\nManifestXML_1.ManifestXML.prototype.getAdaptationSetNodeName = function () {\n return this.manifestType === 'MSS' ? 'StreamIndex' : 'AdaptationSet';\n};\nManifestXML_1.ManifestXML.prototype.getRepresentationNodeName = function () {\n return this.manifestType === 'MSS' ? 'QualityLevel' : 'Representation';\n};\nManifestXML_1.ManifestXML.prototype.parseStreams = function () {\n var streams = this.xml.getElementsByTagName('StreamIndex');\n for (var i = 0; i < streams.length; i++) {\n var streamNode = new StreamIndexNode_1.StreamIndexNode(streams[i], this.xml);\n this.adaptationSetColl[i] = streamNode;\n }\n};\nManifestXML_1.ManifestXML.prototype._parseAdaptations = ManifestXML_1.ManifestXML.prototype.parseAdaptations;\nManifestXML_1.ManifestXML.prototype.parseAdaptations = function () {\n // Manifest type detection\n this.manifestType = this.getManifestType(this.xml);\n if (this.manifestType === 'MSS') {\n return this.parseStreams();\n } else {\n return this._parseAdaptations();\n }\n};\nexports.ManifestXML = ManifestXML_1.ManifestXML;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAyMi5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxhQUFhLEdBQUdDLG1CQUFPLENBQUMsR0FBaUIsQ0FBQztBQUNoRCxJQUFNQyxpQkFBaUIsR0FBR0QsbUJBQU8sQ0FBQyxJQUFvQixDQUFDO0FBR3ZERCxhQUFhLENBQUNHLFdBQVcsQ0FBQ0MsU0FBUyxDQUFDQyxlQUFlLEdBQUcsVUFBVUMsR0FBRyxFQUFFO0VBQ25FLE9BQU9BLEdBQUcsQ0FBQ0Msb0JBQW9CLENBQUMsc0JBQXNCLENBQUMsQ0FBQ0MsTUFBTSxLQUFLLENBQUMsR0FBRyxLQUFLLEdBQUcsTUFBTTtBQUN2RixDQUFDO0FBRURSLGFBQWEsQ0FBQ0csV0FBVyxDQUFDQyxTQUFTLENBQUNLLHdCQUF3QixHQUFHLF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AgcmV0dXJuIHRoaXMuX3BhcnNlQWRhcHRhdGlvbnMoKTtcbiAgfVxufTtcblxuZXhwb3J0cy5NYW5pZmVzdFhNTCA9IE1hbmlmZXN0WE1MXzEuTWFuaWZlc3RYTUw7XG4iXSwibmFtZXMiOlsiTWFuaWZlc3RYTUxfMSIsInJlcXVpcmUiLCJTdHJlYW1JbmRleE5vZGVfMSIsIk1hbmlmZXN0WE1MIiwicHJvdG90eXBlIiwiZ2V0TWFuaWZlc3RUeXBlIiwieG1sIiwiZ2V0RWxlbWVudHNCeVRhZ05hbWUiLCJsZW5ndGgiLCJnZXRBZGFwdGF0aW9uU2V0Tm9kZU5hbWUiLCJtYW5pZmVzdFR5cGUiLCJnZXRSZXByZXNlbnRhdGlvbk5vZGVOYW1lIiwicGFyc2VTdHJlYW1zIiwic3RyZWFtcyIsImkiLCJzdHJlYW1Ob2RlIiwiU3RyZWFtSW5kZXhOb2RlIiwiYWRhcHRhdGlvblNldENvbGwiLCJfcGFyc2VBZGFwdGF0aW9ucyIsInBhcnNlQWRhcHRhdGlvbnMiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5022\n")},6543:function(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar __extends = this && this.__extends || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) {\n d[p] = b[p];\n }\n }\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar ManifestNode_1 = __webpack_require__(8243);\nvar IsoDurationParser_1 = __webpack_require__(453);\nvar FragmentInformation_1 = __webpack_require__(7640);\nvar TIME_SCALE_100_NANOSECOND_UNIT = 10000000.0;\nvar QualityLevelNode = function (_super) {\n __extends(QualityLevelNode, _super);\n function QualityLevelNode(node, xml) {\n _super.call(this, node, xml);\n }\n QualityLevelNode.prototype.createSegmentInformation = function () {\n var presentationDuration = IsoDurationParser_1.IsoDurationParser.getDuration(parseFloat(this.attributeList['Duration'] / TIME_SCALE_100_NANOSECOND_UNIT));\n var representationID = this.attributeList['id'];\n this.bandwidth = this.attributeList['bandwidth'] ? parseInt(this.attributeList['bandwidth']) : -1;\n this.segmentTemplate = this.mapMssSegmentTemplate();\n this.segmentInformation = new FragmentInformation_1.FragmentInformation(presentationDuration, this.bandwidth, this.baseURL, representationID, this.attributeList['mimeType'], this.segmentTemplate);\n };\n QualityLevelNode.prototype.mapMssSegmentTemplate = function () {\n var segmentTemplate = {};\n var mediaUrl;\n mediaUrl = this.attributeList['Url'].replace('{bitrate}', '$Bandwidth$');\n mediaUrl = mediaUrl.replace('{start time}', '$Time$');\n segmentTemplate.media = mediaUrl;\n segmentTemplate.timescale = TIME_SCALE_100_NANOSECOND_UNIT;\n segmentTemplate.SegmentTimeline = this.mapMssSegmentTimeline();\n return segmentTemplate;\n };\n QualityLevelNode.prototype.mapMssSegmentTimeline = function () {\n var segmentTimeline = {};\n var chunks = this.currentNode.parentNode.getElementsByTagName('c');\n var segments = [];\n var segment;\n var prevSegment;\n var tManifest;\n var i;\n var duration = 0;\n for (i = 0; i < chunks.length; i++) {\n segment = {};\n\n // Get time 't' attribute value\n tManifest = chunks[i].getAttribute('t');\n\n // => segment.tManifest = original timestamp value as a string (for constructing the fragment request url, see DashHandler)\n // => segment.t = number value of timestamp (maybe rounded value, but only for 0.1 microsecond)\n segment.tManifest = parseFloat(tManifest);\n segment.t = parseFloat(tManifest);\n\n // Get duration 'd' attribute value\n segment.d = parseFloat(chunks[i].getAttribute('d'));\n\n // If 't' not defined for first segment then t=0\n if (i === 0 && !segment.t) {\n segment.t = 0;\n }\n if (i > 0) {\n prevSegment = segments[segments.length - 1];\n // Update previous segment duration if not defined\n if (!prevSegment.d) {\n if (prevSegment.tManifest) {\n prevSegment.d = parseFloat(tManifest) - parseFloat(prevSegment.tManifest);\n } else {\n prevSegment.d = segment.t - prevSegment.t;\n }\n }\n // Set segment absolute timestamp if not set in manifest\n if (!segment.t) {\n if (prevSegment.tManifest) {\n segment.tManifest = parseFloat(prevSegment.tManifest) + prevSegment.d;\n segment.t = parseFloat(segment.tManifest);\n } else {\n segment.t = prevSegment.t + prevSegment.d;\n }\n }\n }\n duration += segment.d;\n\n // Create new segment\n segments.push(segment);\n }\n segmentTimeline.S = segments;\n segmentTimeline.S_asArray = segments;\n segmentTimeline.duration = duration / TIME_SCALE_100_NANOSECOND_UNIT;\n return segmentTimeline;\n };\n QualityLevelNode.prototype.writeAttributesToList = function (node, list) {\n var attrList = node.attributes;\n var mimeTypeMap = {\n 'video': 'video/mp4',\n 'audio': 'audio/mp4',\n 'text': 'application/mp4'\n };\n for (var i = 0; i < node.childNodes.length; i++) {\n if (!this.baseURL && node.childNodes[i].nodeName == 'BaseURL') {\n this.baseURL = node.childNodes[i].firstChild.nodeValue;\n }\n if (!this.segmentBase && node.childNodes[i].nodeName == 'SegmentBase') {\n this.segmentBase = node.childNodes[i];\n }\n if (!this.segmentTemplate && node.childNodes[i].nodeName == 'SegmentTemplate') {\n this.segmentTemplate = node.childNodes[i];\n }\n if (!this.segmentList && node.childNodes[i].nodeName == 'SegmentList') {\n this.segmentList = node.childNodes[i];\n }\n }\n for (var attr in attrList) {\n if (!list[attrList[attr].nodeName]) {\n list[attrList[attr].nodeName] = attrList[attr].nodeValue;\n }\n }\n if (list['Type'] !== undefined) {\n list['contentType'] = list['Type'];\n list['mimeType'] = mimeTypeMap[list['contentType']];\n list['bandwidth'] = list['Bitrate'];\n list['width'] = list['MaxWidth'];\n list['height'] = list['MaxHeight'];\n list.lang = list['Language'] || 'und';\n var indexId = list['Name'] ? list['Name'] : list['Type'];\n // build id\n list['id'] = indexId + '_' + list['Index'];\n if (list['Type'] === 'audio') {\n list.audioSamplingRate = list['SamplingRate'];\n }\n }\n if (list['Duration'] !== undefined) {\n list['durationInS'] = this.attributeList['Duration'] / TIME_SCALE_100_NANOSECOND_UNIT;\n }\n if (node.parentNode !== null) {\n this.buildAttributeList(node.parentNode, list);\n } else {\n if (!this.segmentInformation) {\n this.createSegmentInformation();\n }\n }\n _super.prototype.writeAttributesToList.call(this, node, list);\n };\n QualityLevelNode.prototype.getMimeType = function () {\n return this.attributeList['mimeType'];\n };\n QualityLevelNode.prototype.hasMimeType = function () {\n return this.attributeList['mimeType'] ? true : false;\n };\n QualityLevelNode.prototype.getContentType = function () {\n return this.attributeList['contentType'];\n };\n QualityLevelNode.prototype.hasContentType = function () {\n return this.attributeList['contentType'] ? true : false;\n };\n return QualityLevelNode;\n}(ManifestNode_1.ManifestNode);\nexports.QualityLevelNode = QualityLevelNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjU0My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxTQUFTLEdBQUksSUFBSSxJQUFJLElBQUksQ0FBQ0EsU0FBUyxJQUFLLFVBQVVDLENBQUMsRUFBRUMsQ0FBQyxFQUFFO0VBQzVELEtBQUssSUFBSUMsQ0FBQyxJQUFJRCxDQUFDLEVBQUU7SUFDZixJQUFJQSxDQUFDLENBQUNFLGNBQWMsQ0FBQ0QsQ0FBQyxDQUFDLEVBQUU7TUFDdkJGLENBQUMsQ0FBQ0UsQ0FBQyxDQUFDLEdBQUdELENBQUMsQ0FBQ0MsQ0FBQyxDQUFDO0lBQ2I7RUFDRjtFQUNBLFNBQVNFLEVBQUVBLENBQUEsRUFBSTtJQUNiLElBQUksQ0FBQ0MsV0FBVyxHQUFHTCxDQUFDO0VBQ3RCO0VBRUFBLENBQUMsQ0FBQ00sU0FBUyxHQUFHTCxDQUFDLEtBQUssSUFBSSxHQUFHTSxNQUFNLENBQUNDLE1BQU0sQ0FBQ1AsQ0FBQyxDQUFDLElBQUlHLEVBQUUsQ0FBQ0UsU0FBUyxHQUFHTCxDQUFDLENBQUNLLFNBQVMsRUFBRSxJQUFJRixFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ3RGLENBQUM7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AgICAgICAvLyBHZXQgZHVyYXRpb24gJ2QnIGF0dHJpYnV0ZSB2YWx1ZVxuICAgICAgICBzZWdtZW50LmQgPSBwYXJzZUZsb2F0KGNodW5rc1tpXS5nZXRBdHRyaWJ1dGUoJ2QnKSk7XG5cbiAgICAgICAgLy8gSWYgJ3QnIG5vdCBkZWZpbmVkIGZvciBmaXJzdCBzZWdtZW50IHRoZW4gdD0wXG4gICAgICAgIGlmICgoaSA9PT0gMCkgJiYgIXNlZ21lbnQudCkge1xuICAgICAgICAgICAgc2VnbWVudC50ID0gMDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpID4gMCkge1xuICAgICAgICAgICAgcHJldlNlZ21lbnQgPSBzZWdtZW50c1tzZWdtZW50cy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgIC8vIFVwZGF0ZSBwcmV2aW91cyBzZWdtZW50IGR1cmF0aW9uIGlmIG5vdCBkZWZpbmVkXG4gICAgICAgICAgICBpZiAoIXByZXZTZWdtZW50LmQpIHtcbiAgICAgICAgICAgICAgICBpZiAocHJldlNlZ21lbnQudE1hbmlmZXN0KSB7XG4gICAgICAgICAgICAgICAgICAgIHByZXZTZWdtZW50LmQgPSBwYXJzZUZsb2F0KHRNYW5pZmVzdCkgLSBwYXJzZUZsb2F0KHByZXZTZWdtZW50LnRNYW5pZmVzdCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJldlNlZ21lbnQuZCA9IHNlZ21lbnQudCAtIHByZXZTZWdtZW50LnQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gU2V0IHNlZ21lbnQgYWJzb2x1dGUgdGltZXN0YW1wIGlmIG5vdCBzZXQgaW4gbWFuaWZlc3RcbiAgICAgICAgICAgIGlmICghc2VnbWVudC50KSB7XG4gICAgICAgICAgICAgICAgaWYgKHByZXZTZWdtZW50LnRNYW5pZmVzdCkge1xuICAgICAgICAg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VmFsdWUiLCJzZWdtZW50QmFzZSIsInNlZ21lbnRMaXN0IiwiYXR0ciIsInVuZGVmaW5lZCIsImxhbmciLCJpbmRleElkIiwiYXVkaW9TYW1wbGluZ1JhdGUiLCJidWlsZEF0dHJpYnV0ZUxpc3QiLCJnZXRNaW1lVHlwZSIsImhhc01pbWVUeXBlIiwiZ2V0Q29udGVudFR5cGUiLCJoYXNDb250ZW50VHlwZSIsIk1hbmlmZXN0Tm9kZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6543\n")},2872:function(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar BASE64 = __webpack_require__(7769);\nvar pssh = __webpack_require__(2712);\nvar DOMParser = (__webpack_require__(2008).DOMParser);\nvar WIDEVINE_SCHEME_ID_URI = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed';\nvar PLAYREADY_SCHEME_ID_URI = 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95';\nvar __extends = this && this.__extends || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) {\n d[p] = b[p];\n }\n }\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar AdaptationSetNode_1 = __webpack_require__(4033);\nvar QualityLevelNode_1 = __webpack_require__(6543);\nvar StreamIndexNode = function (_super) {\n __extends(StreamIndexNode, _super);\n function StreamIndexNode(node, xml) {\n _super.call(this, node, xml);\n }\n StreamIndexNode.prototype.parse = function () {\n var qualityLevels = this.currentNode.getElementsByTagName('QualityLevel');\n for (var i = 0; i < qualityLevels.length; i++) {\n var qualityLevelNode = new QualityLevelNode_1.QualityLevelNode(qualityLevels[i], this.xml);\n this.representationColl[i] = qualityLevelNode;\n if (this.representationColl[0].hasMimeType()) {\n this.attributeList['mimeType'] = this.representationColl[0].getMimeType();\n }\n if (this.representationColl[0].hasContentType()) {\n this.attributeList['mimeType'] = this.representationColl[0].getContentType();\n }\n }\n var protection = this.xml.getElementsByTagName('Protection')[0];\n if (protection !== undefined) {\n var protectionHeader = protection.getElementsByTagName('ProtectionHeader')[0];\n // Some packagers put newlines into the ProtectionHeader base64 string, which is not good\n // because this cannot be correctly parsed. Let's just filter out any newlines found in there.\n var psshPR = protectionHeader.firstChild.data.replace(/\\n|\\r/g, '');\n\n // Get KID (in CENC format) from protection header\n var KID = this.getKIDFromProtectionHeader(protectionHeader);\n\n // Create ContentProtection for PlayReady\n var cpPR = {\n schemeIdUri: PLAYREADY_SCHEME_ID_URI,\n cencPSSH: psshPR\n };\n this.contentProtections.push(cpPR);\n\n // Create ContentProtection for Widevine (as a CENC protection)\n var psshWV = pssh.createWidevinePssh(KID);\n var cpWV = {\n schemeIdUri: WIDEVINE_SCHEME_ID_URI,\n cencPSSH: psshWV\n };\n this.contentProtections.push(cpWV);\n }\n };\n StreamIndexNode.prototype.getKIDFromProtectionHeader = function (protectionHeader) {\n var prHeader, wrmHeader, xmlReader, KID;\n\n // Get PlayReady header as byte array (base64 decoded)\n prHeader = BASE64.toByteArray(protectionHeader.firstChild.data);\n\n // Get Right Management header (WRMHEADER) from PlayReady header\n wrmHeader = this.getWRMHeaderFromPRHeader(prHeader);\n\n // Convert from multi-byte to unicode\n wrmHeader = new Uint16Array(wrmHeader.buffer);\n\n // Convert to string\n wrmHeader = String.fromCharCode.apply(null, wrmHeader);\n\n // Parse <WRMHeader> to get KID field value\n xmlReader = new DOMParser().parseFromString(wrmHeader, 'application/xml');\n KID = xmlReader.getElementsByTagName('KID')[0].textContent;\n\n // Get KID (base64 decoded) as byte array\n KID = BASE64.toByteArray(KID);\n\n // Convert UUID from little-endian to big-endian\n this.convertUuidEndianness(KID);\n return KID;\n };\n StreamIndexNode.prototype.convertUuidEndianness = function (uuid) {\n this.swapBytes(uuid, 0, 3);\n this.swapBytes(uuid, 1, 2);\n this.swapBytes(uuid, 4, 5);\n this.swapBytes(uuid, 6, 7);\n };\n StreamIndexNode.prototype.swapBytes = function (bytes, pos1, pos2) {\n var temp = bytes[pos1];\n bytes[pos1] = bytes[pos2];\n bytes[pos2] = temp;\n };\n StreamIndexNode.prototype.getWRMHeaderFromPRHeader = function getWRMHeaderFromPRHeader(prHeader) {\n var recordType, recordLength, recordValue;\n var i = 0;\n\n // Parse PlayReady header\n\n // Length - 32 bits (LE format)\n // var length = (prHeader[i + 3] << 24) + (prHeader[i + 2] << 16) + (prHeader[i + 1] << 8) + prHeader[i];\n i += 4;\n\n // Record count - 16 bits (LE format)\n // var recordCount = (prHeader[i + 1] << 8) + prHeader[i];\n i += 2;\n\n // Parse records\n while (i < prHeader.length) {\n // Record type - 16 bits (LE format)\n recordType = prHeader[i + 1] * 256 + prHeader[i];\n i += 2;\n\n // Check if Rights Management header (record type = 0x01)\n if (recordType === 0x01) {\n // Record length - 16 bits (LE format)\n recordLength = prHeader[i + 1] * 256 + prHeader[i];\n i += 2;\n\n // Record value => contains <WRMHEADER>\n recordValue = new Uint8Array(recordLength);\n recordValue.set(prHeader.subarray(i, i + recordLength));\n return recordValue;\n }\n }\n return null;\n };\n return StreamIndexNode;\n}(AdaptationSetNode_1.AdaptationSetNode);\nexports.StreamIndexNode = StreamIndexNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjg3Mi5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxNQUFNLEdBQUdDLG1CQUFPLENBQUMsSUFBVyxDQUFDO0FBQ25DLElBQU1DLElBQUksR0FBR0QsbUJBQU8sQ0FBQyxJQUFTLENBQUM7QUFDL0IsSUFBTUUsU0FBUyxHQUFHRixxQ0FBbUM7QUFFckQsSUFBTUcsc0JBQXNCLEdBQUcsK0NBQStDO0FBQzlFLElBQU1DLHVCQUF1QixHQUFHLCtDQUErQztBQUUvRSxJQUFNQyxTQUFTLEdBQUksSUFBSSxJQUFJLElBQUksQ0FBQ0EsU0FBUyxJ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ZGUiLCJhcHBseSIsInBhcnNlRnJvbVN0cmluZyIsInRleHRDb250ZW50IiwiY29udmVydFV1aWRFbmRpYW5uZXNzIiwidXVpZCIsInN3YXBCeXRlcyIsImJ5dGVzIiwicG9zMSIsInBvczIiLCJ0ZW1wIiwicmVjb3JkVHlwZSIsInJlY29yZExlbmd0aCIsInJlY29yZFZhbHVlIiwiVWludDhBcnJheSIsInNldCIsInN1YmFycmF5IiwiQWRhcHRhdGlvblNldE5vZGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2872\n")},2712:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar BASE64 = __webpack_require__(7769);\nfunction createWidevinePssh(KID) {\n // Create Widevine CENC header (Protocol Buffer) with KID value\n var wvCencHeader = new Uint8Array(2 + KID.length);\n wvCencHeader[0] = 0x12;\n wvCencHeader[1] = 0x10;\n wvCencHeader.set(KID, 2);\n\n // Create a pssh box\n var length = 12 /* box length, type, version and flags */ + 16 /* SystemID */ + 4 /* data length */ + wvCencHeader.length,\n pssh = new Uint8Array(length),\n i = 0;\n\n // Set box length value (4 bytes)\n pssh[i++] = 0;\n pssh[i++] = 0;\n pssh[i++] = 0;\n pssh[i++] = length;\n\n // Set type ('pssh'), version (0) and flags (0)\n pssh.set([0x70, 0x73, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00], i);\n i += 8;\n\n // Set SystemID ('edef8ba9-79d6-4ace-a3c8-27dcd51d21ed')\n pssh.set([0xed, 0xef, 0x8b, 0xa9, 0x79, 0xd6, 0x4a, 0xce, 0xa3, 0xc8, 0x27, 0xdc, 0xd5, 0x1d, 0x21, 0xed], i);\n i += 16;\n\n // Set data length value\n pssh[i++] = 0;\n pssh[i++] = 0;\n pssh[i++] = 0;\n pssh[i++] = wvCencHeader.length;\n\n // Copy Widevine CENC header\n pssh.set(wvCencHeader, i);\n\n // Convert to BASE64 string\n pssh = BASE64.fromByteArray(pssh);\n return p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EICgnZWRlZjhiYTktNzlkNi00YWNlLWEzYzgtMjdkY2Q1MWQyMWVkJylcbiAgcHNzaC5zZXQoWzB4ZWQsIDB4ZWYsIDB4OGIsIDB4YTksICAweDc5LCAweGQ2LCAweDRhLCAweGNlLCAweGEzLCAweGM4LCAweDI3LCAweGRjLCAweGQ1LCAweDFkLCAweDIxLCAweGVkXSwgaSk7XG4gIGkgKz0gMTY7XG5cbiAgLy8gU2V0IGRhdGEgbGVuZ3RoIHZhbHVlXG4gIHBzc2hbaSsrXSA9IDA7XG4gIHBzc2hbaSsrXSA9IDA7XG4gIHBzc2hbaSsrXSA9IDA7XG4gIHBzc2hbaSsrXSA9IHd2Q2VuY0hlYWRlci5sZW5ndGg7XG5cbiAgLy8gQ29weSBXaWRldmluZSBDRU5DIGhlYWRlclxuICBwc3NoLnNldCh3dkNlbmNIZWFkZXIsIGkpO1xuXG4gIC8vIENvbnZlcnQgdG8gQkFTRTY0IHN0cmluZ1xuICBwc3NoID0gQkFTRTY0LmZyb21CeXRlQXJyYXkocHNzaCk7XG4gIHJldHVybiBwc3NoO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgY3JlYXRlV2lkZXZpbmVQc3NoOiBjcmVhdGVXaWRldmluZVBzc2hcbn1cbiJdLCJuYW1lcyI6WyJCQVNFNjQiLCJyZXF1aXJlIiwiY3JlYXRlV2lkZXZpbmVQc3NoIiwiS0lEIiwid3ZDZW5jSGVhZGVyIiwiVWludDhBcnJheSIsImxlbmd0aCIsInNldCIsInBzc2giLCJpIiwiZnJvbUJ5dGVBcnJheSIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///2712\n")},814:function(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar __extends = this && this.__extends || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) {\n d[p] = b[p];\n }\n }\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar ManifestNode_1 = __webpack_require__(8243);\nvar SegmentInformation_1 = __webpack_require__(5848);\nvar IsoDurationParser_1 = __webpack_require__(453);\nvar RepresentationNode = function (_super) {\n __extends(RepresentationNode, _super);\n function RepresentationNode(node, xml) {\n _super.call(this, node, xml);\n this.markNodeForDownload(false);\n }\n RepresentationNode.prototype.createSegmentInformation = function () {\n var presentationDuration = IsoDurationParser_1.IsoDurationParser.getDuration(this.attributeList['mediaPresentationDuration']);\n var segmentTimeline;\n var timelineItemList;\n var segmentUrlList;\n var representationID = this.attributeList['id'];\n if (this.segmentTemplate && this.segmentTemplate.hasChildNodes()) {\n for (var i = 0; i < this.segmentTemplate.childNodes.length; i++) {\n if (this.segmentTemplate.childNodes[i].nodeName == \"SegmentTimeline\") {\n segmentTimeline = this.segmentTemplate.childNodes[i];\n }\n }\n }\n try {\n timelineItemList = segmentTimeline.getElementsByTagName('S');\n } catch (e) {}\n try {\n segmentUrlList = this.segmentList.getElementsByTagName('SegmentURL');\n } catch (e) {}\n this.bandwidth = this.attributeList['bandwidth'] ? parseInt(this.attributeList['bandwidth']) : -1;\n this.segmentInformation = new SegmentInformation_1.SegmentInformation(presentationDuration, this.bandwidth, this.baseURL, representationID, this.attributeList['mimeType'], this.segmentBase, this.segmentTemplate, segmentTimeline, timelineItemList, this.segmentList, segmentUrlList);\n };\n RepresentationNode.prototype.writeAttributesToList = function (node, list) {\n var attrList = node.attributes;\n for (var i = 0; i < node.childNodes.length; i++) {\n if (!this.baseURL && node.childNodes[i].nodeName == 'BaseURL') {\n this.baseURL = node.childNodes[i].firstChild.nodeValue;\n }\n if (!this.segmentBase && node.childNodes[i].nodeName == 'SegmentBase') {\n this.segmentBase = node.childNodes[i];\n }\n if (!this.segmentTemplate && node.childNodes[i].nodeName == 'SegmentTemplate') {\n this.segmentTemplate = node.childNodes[i];\n }\n if (!this.segmentList && node.childNodes[i].nodeName == 'SegmentList') {\n this.segmentList = node.childNodes[i];\n }\n }\n for (var attr in attrList) {\n if (!list[attrList[attr].nodeName]) {\n list[attrList[attr].nodeName] = attrList[attr].nodeValue;\n }\n }\n if (list['mediaPresentationDuration'] !== undefined) {\n list['durationInS'] = IsoDurationParser_1.IsoDurationParser.getDurationAsS(this.attributeList['mediaPresentationDuration']);\n }\n if (node.parentNode !== null) {\n this.buildAttributeList(node.parentNode, list);\n } else {\n if (!this.segmentInformation) {\n this.createSegmentInformation();\n }\n }\n _super.prototype.writeAttributesToList.call(this, node, list);\n };\n RepresentationNode.prototype.getMimeType = function () {\n return this.attributeList['mimeType'] || this.attributeList['contentType'];\n };\n RepresentationNode.prototype.hasMimeType = function () {\n return this.attributeList['mimeType'] || this.attributeList['contentType'] ? true : false;\n };\n RepresentationNode.prototype.getMediaUrlList = function () {\n return this.segmentInformation.getMediaUrlList();\n };\n RepresentationNode.prototype.getRepresentationId = function () {\n return this.id;\n };\n return RepresentationNode;\n}(ManifestNode_1.ManifestNode);\nexports.RepresentationNode = RepresentationNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODE0LmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiLElBQU1BLFNBQVMsR0FBSSxJQUFJLElBQUksSUFBSSxDQUFDQSxTQUFTLElBQUssVUFBVUMsQ0FBQyxFQUFFQyxDQUFDLEVBQUU7RUFDeEQsS0FBSyxJQUFJQyxDQUFDLElBQUlELENBQUMsRUFBRTtJQUNmLElBQUlBLENBQUMsQ0FBQ0UsY0FBYyxDQUFDRCxDQUFDLENBQUMsRUFBRTtNQUN2QkYsQ0FBQyxDQUFDRSxDQUFDLENBQUMsR0FBR0QsQ0FBQyxDQUFDQyxDQUFDLENBQUM7SUFDYjtFQUNGO0VBQ0EsU0FBU0UsRUFBRUEsQ0FBQSxFQUFJO0lBQ2IsSUFBSSxDQUFDQyxXQUFXLEdBQUdMLENBQUM7RUFDdEI7RUFFQUEsQ0F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iwibm9kZVZhbHVlIiwiYXR0ciIsInVuZGVmaW5lZCIsImdldER1cmF0aW9uQXNTIiwicGFyZW50Tm9kZSIsImJ1aWxkQXR0cmlidXRlTGlzdCIsImdldE1pbWVUeXBlIiwiaGFzTWltZVR5cGUiLCJnZXRNZWRpYVVybExpc3QiLCJnZXRSZXByZXNlbnRhdGlvbklkIiwiaWQiLCJNYW5pZmVzdE5vZGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///814\n")},5848:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval('\n\nvar ZeroPadding_1 = __webpack_require__(7074);\nvar MediaUrl_1 = __webpack_require__(4826);\nvar CREATE_URL;\n(function (CREATE_URL) {\n CREATE_URL[CREATE_URL["FROM_TEMPLATE"] = 0] = "FROM_TEMPLATE";\n CREATE_URL[CREATE_URL["FROM_TIMELINE"] = 1] = "FROM_TIMELINE";\n CREATE_URL[CREATE_URL["FROM_SEGMENTLIST"] = 2] = "FROM_SEGMENTLIST";\n CREATE_URL[CREATE_URL["FROM_SEGMENT_BASE"] = 3] = "FROM_SEGMENT_BASE";\n})(CREATE_URL || (CREATE_URL = {}));\nvar SegmentInformation = function () {\n function SegmentInformation(presentationDuration, bandwidth, baseUrl, representationID, mimeType, segmentBase, segmentTemplate, segmentTimeline, timelineItemList, segmentList, segmentUrlList) {\n this.hasSegmentBase = false;\n this.baseUrl = \'\';\n this.presentationDuration = 0;\n this.bandwidth = 0;\n this.startNumber = 0;\n this.mediaUrls = [];\n this.whichUseCase = -1;\n this.mimeType = \'\';\n SegmentInformation.count += 1;\n this.presentationDuration = presentationDuration;\n this.mimeType = mimeType;\n if (baseUrl) {\n this.baseUrl = baseUrl;\n }\n if (bandwidth) {\n this.bandwidth = bandwidth;\n }\n if (representationID) {\n this.representationID = representationID;\n }\n if (segmentBase) {\n this.segmentBase = segmentBase;\n this.hasSegmentBase = true;\n this.whichUseCase = CREATE_URL.FROM_SEGMENT_BASE;\n }\n if (segmentTemplate) {\n this.segmentTemplate = segmentTemplate;\n this.mediaTemplate = this.segmentTemplate.attributes.getNamedItem("media").nodeValue;\n this.mediaTemplate = this.replace$RepresentationID$(this.mediaTemplate, this.representationID);\n this.mediaTemplate = this.replace$Bandwidth$(this.mediaTemplate, this.bandwidth);\n this.startNumber = this.segmentTemplate.attributes.getNamedItem("startNumber") ? parseInt(this.segmentTemplate.attributes.getNamedItem("startNumber").nodeValue) : 0;\n this.whichUseCase = CREATE_URL.FROM_TEMPLATE;\n }\n if (segmentTimeline) {\n this.segmentTimeline = segmentTimeline;\n }\n if (timelineItemList) {\n this.timelineItemList = timelineItemList;\n this.whichUseCase = CREATE_URL.FROM_TIMELINE;\n }\n if (segmentList) {\n this.segmentList = segmentList;\n }\n if (segmentUrlList) {\n this.segmentUrlList = segmentUrlList;\n this.whichUseCase = CREATE_URL.FROM_SEGMENTLIST;\n }\n var hasFileExtension = false;\n var initSegment = \'\';\n switch (this.whichUseCase) {\n case CREATE_URL.FROM_SEGMENTLIST:\n this.createFragmentFromUrlList(this.segmentUrlList);\n initSegment = this.createInitSegment(this.segmentList.getElementsByTagName(\'Initialization\')[0].attributes.getNamedItem("sourceURL").nodeValue);\n this.mediaUrls.unshift(new MediaUrl_1.MediaUrl(this.baseUrl, initSegment, this.mimeType));\n if (SegmentInformation.count == 0) {\n // console.log(\'CREATE_URL.FROM_SEGMENTLIST\', this.mediaUrls, this);\n }\n break;\n case CREATE_URL.FROM_TIMELINE:\n initSegment = this.createInitSegment(this.segmentTemplate.attributes.getNamedItem("initialization").nodeValue);\n this.mediaUrls.unshift(new MediaUrl_1.MediaUrl(this.baseUrl, initSegment, this.mimeType));\n this.createFragmentUrlsFromTimeline(this.timelineItemList);\n break;\n case CREATE_URL.FROM_SEGMENT_BASE:\n try {\n hasFileExtension = this.baseUrl.indexOf(\'.\') !== -1 ? true : false;\n } catch (e) {}\n if (hasFileExtension) {\n this.mediaUrls.push(new MediaUrl_1.MediaUrl(this.baseUrl, this.baseUrl, this.mimeType));\n }\n if (SegmentInformation.count == 0) {\n // console.log(\'CREATE_URL.FROM_SEGMENT_BASE\', this.mediaUrls, this);\n }\n break;\n case CREATE_URL.FROM_TEMPLATE:\n this.createFragmentsFromTemplate();\n initSegment = this.createInitSegment(this.segmentTemplate.attributes.getNamedItem("initialization").nodeValue);\n this.mediaUrls.unshift(new MediaUrl_1.MediaUrl(this.baseUrl, initSegment, this.mimeType));\n break;\n default:\n try {\n hasFileExtension = this.baseUrl.indexOf(\'.\') !== -1 ? true : false;\n } catch (e) {}\n if (hasFileExtension) {\n this.mediaUrls.push(new MediaUrl_1.MediaUrl("", this.baseUrl, this.mimeType));\n }\n }\n }\n SegmentInformation.prototype.createFragmentUrlsFromTimeline = function (segmentNodes) {\n var currentTime = this.segmentTemplate.attributes.getNamedItem("presentationTimeOffset");\n if (currentTime) {\n currentTime = parseInt(currentTime.nodeValue, 10);\n } else {\n currentTime = 0;\n }\n var hasCurrentTime = false;\n var time = 0;\n for (var i = 0; i < segmentNodes.length; i++) {\n if (i > 0 && segmentNodes[i].attributes.getNamedItem("t") && segmentNodes[i].attributes.getNamedItem("t").nodeValue !== undefined) {\n hasCurrentTime = true;\n time = parseInt(segmentNodes[i].attributes.getNamedItem("t").nodeValue);\n } else {\n hasCurrentTime = false;\n }\n var duration = segmentNodes[i].attributes.getNamedItem("d") && segmentNodes[i].attributes.getNamedItem("d").nodeValue !== undefined ? parseInt(segmentNodes[i].attributes.getNamedItem("d").nodeValue) : 0;\n var repeat = segmentNodes[i].attributes.getNamedItem("r") && segmentNodes[i].attributes.getNamedItem("r").nodeValue !== undefined ? parseInt(segmentNodes[i].attributes.getNamedItem("r").nodeValue) : 0;\n for (var k = 1; k <= repeat; k++) {\n var fragment_1 = this.segmentTemplate.attributes.getNamedItem("media").nodeValue;\n fragment_1 = this.replace$RepresentationID$(fragment_1, this.representationID);\n fragment_1 = this.replace$Time$(fragment_1, currentTime);\n fragment_1 = this.replace$Bandwidth$(fragment_1, this.bandwidth);\n this.mediaUrls.push(new MediaUrl_1.MediaUrl(this.baseUrl, fragment_1, this.mimeType));\n if (!hasCurrentTime) {\n currentTime += duration;\n } else {\n currentTime = time;\n }\n }\n var fragment = this.segmentTemplate.attributes.getNamedItem("media").nodeValue;\n fragment = this.replace$RepresentationID$(fragment, this.representationID);\n fragment = this.replace$Time$(fragment, currentTime);\n fragment = this.replace$Bandwidth$(fragment, this.bandwidth);\n this.mediaUrls.push(new MediaUrl_1.MediaUrl(this.baseUrl, fragment, this.mimeType));\n if (!hasCurrentTime) {\n currentTime += duration;\n } else {\n currentTime = time;\n }\n }\n };\n SegmentInformation.prototype.createFragmentFromUrlList = function (urlListNodes) {\n for (var i = 0; i < urlListNodes.length; i++) {\n var fragment = urlListNodes[i].attributes.getNamedItem("media").nodeValue;\n this.mediaUrls.push(new MediaUrl_1.MediaUrl(this.baseUrl, fragment, this.mimeType));\n }\n };\n SegmentInformation.prototype.createFragmentsFromTemplate = function () {\n var segmentDuration = parseInt(this.segmentTemplate.attributes.getNamedItem("duration").nodeValue);\n var segmentTimescale = this.segmentTemplate.attributes.getNamedItem("timescale") ? parseInt(this.segmentTemplate.attributes.getNamedItem("timescale").nodeValue) : 1;\n var numSegments = Math.ceil(this.presentationDuration / (segmentDuration / segmentTimescale) / 1000);\n var mediaTemplateStringSegment = this.mediaTemplate.split(\'$\');\n var templateReplaceableIndex;\n var startNumber = this.startNumber || 0;\n for (var k = 0; k < mediaTemplateStringSegment.length; k++) {\n if (mediaTemplateStringSegment[k].indexOf(\'Number\') != -1) {\n templateReplaceableIndex = \'$\' + mediaTemplateStringSegment[k] + \'$\';\n }\n }\n var paddingAmount = ZeroPadding_1.ZeroPadding.getPaddingAmount(templateReplaceableIndex);\n for (var i = startNumber; i < numSegments + startNumber; i++) {\n var segmentIndex = ZeroPadding_1.ZeroPadding.addPadding(i, paddingAmount);\n var fragment = void 0;\n if (paddingAmount === 0) {\n fragment = this.replace$Number$(this.mediaTemplate, i);\n } else {\n fragment = this.mediaTemplate.replace(templateReplaceableIndex, segmentIndex);\n }\n this.mediaUrls.push(new MediaUrl_1.MediaUrl(this.baseUrl, fragment, this.mimeType));\n }\n };\n SegmentInformation.prototype.replace$RepresentationID$ = function (fragment, id) {\n return fragment.replace(new RegExp(\'\\\\$RepresentationID\\\\$\', \'g\'), id);\n };\n SegmentInformation.prototype.replace$Number$ = function (fragment, num) {\n return fragment.replace(new RegExp(\'\\\\$Number\\\\$\', \'g\'), num.toString());\n };\n SegmentInformation.prototype.replace$Bandwidth$ = function (fragment, bandwidth) {\n return fragment.replace(new RegExp(\'\\\\$Bandwidth\\\\$\', \'g\'), bandwidth.toString());\n };\n SegmentInformation.prototype.replace$Time$ = function (fragment, currentIndex) {\n return fragment.replace(new RegExp(\'\\\\$Time\\\\$\', \'g\'), currentIndex.toString());\n };\n SegmentInformation.prototype.createInitSegment = function (fragment) {\n fragment = this.replace$Bandwidth$(fragment, this.bandwidth);\n fragment = this.replace$RepresentationID$(fragment, this.representationID);\n return fragment;\n };\n SegmentInformation.prototype.getMediaUrlList = function () {\n return this.mediaUrls;\n };\n SegmentInformation.count = -1;\n return SegmentInformation;\n}();\nexports.SegmentInformation = SegmentInformation;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTg0OC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxhQUFhLEdBQUdDLG1CQUFPLENBQUMsSUFBeUIsQ0FBQztBQUN4RCxJQUFNQyxVQUFVLEdBQUdELG1CQUFPLENBQUMsSUFBYSxDQUFDO0FBQ3pDLElBQUlFLFVBQVU7QUFDZCxDQUFDLFVBQVVBLFVBQVUsRUFBRTtFQUNyQkEsVUFBVSxDQUFDQSxVQUFVLENBQUMsZUFBZSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsZUFBZTtFQUM3REEsVUFBVSxDQUFDQSxVQUFVLENBQ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ZSIsImluZGV4T2YiLCJlIiwicHVzaCIsImNyZWF0ZUZyYWdtZW50c0Zyb21UZW1wbGF0ZSIsInByb3RvdHlwZSIsInNlZ21lbnROb2RlcyIsImN1cnJlbnRUaW1lIiwiaGFzQ3VycmVudFRpbWUiLCJ0aW1lIiwiaSIsImxlbmd0aCIsInVuZGVmaW5lZCIsImR1cmF0aW9uIiwicmVwZWF0IiwiayIsImZyYWdtZW50XzEiLCJyZXBsYWNlJFRpbWUkIiwiZnJhZ21lbnQiLCJ1cmxMaXN0Tm9kZXMiLCJzZWdtZW50RHVyYXRpb24iLCJzZWdtZW50VGltZXNjYWxlIiwibnVtU2VnbWVudHMiLCJNYXRoIiwiY2VpbCIsIm1lZGlhVGVtcGxhdGVTdHJpbmdTZWdtZW50Iiwic3BsaXQiLCJ0ZW1wbGF0ZVJlcGxhY2VhYmxlSW5kZXgiLCJwYWRkaW5nQW1vdW50IiwiWmVyb1BhZGRpbmciLCJnZXRQYWRkaW5nQW1vdW50Iiwic2VnbWVudEluZGV4IiwiYWRkUGFkZGluZyIsInJlcGxhY2UkTnVtYmVyJCIsInJlcGxhY2UiLCJpZCIsIlJlZ0V4cCIsIm51bSIsInRvU3RyaW5nIiwiY3VycmVudEluZGV4IiwiZ2V0TWVkaWFVcmxMaXN0IiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5848\n')},1584:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("/*eslint no-console: [\"error\", { allow: [\"warn\", \"error\", \"info\", \"log\"] }] */\n/*eslint no-sync: [\"off\"]*/\n\n\nvar isPortTaken = __webpack_require__(96);\nvar path = __webpack_require__(1017);\nvar fs = __webpack_require__(7147);\nvar fork = (__webpack_require__(2081).fork);\nvar appSettings = __webpack_require__(8557);\nvar _require = __webpack_require__(7194),\n app = _require.app;\nvar CHILD_SCRIPT_FILENAME = 'startServer.js';\n\n/**\n * Offline content server\n * @param {object} offlineController : offline controller\n * @param {object} downloadController : download controller\n * @param {string} maxOfflineContentPortRange - max range for offline port to on which content can be served\n * @param {string} offlineContentPort - on which port offline content should be served, default is 3010\n * @constructor\n */\nfunction OfflineContentServer(offlineController, downloadController, maxOfflineContentPortRange, offlineContentPort) {\n this._offlineController = offlineController;\n this._downloadController = downloadController;\n this._maxOfflineContentPortRange = maxOfflineContentPortRange;\n this._offlineContentPort = offlineContentPort;\n this.childProcess = undefined;\n}\n\n/**\n * Start http server in a child_process\n * @param {object} port : on which port offline content should be served, default is 3010\n * @param {object} callback : a callback function to get listen port (if default is already taken)\n * @constructor\n */\nOfflineContentServer.prototype._startServer = function (port, callback) {\n var self = this;\n\n // NOTE: this is so ugly FIXME\n var serverPath = path.join(app.getAppPath(), 'node_modules/downstream-electron');\n if (!fs.existsSync(path.join(serverPath, CHILD_SCRIPT_FILENAME))) {\n serverPath = path.join(app.getAppPath(), 'node_modules/downstream-electron/api/server');\n if (!fs.existsSync(path.join(serverPath, CHILD_SCRIPT_FILENAME))) {\n serverPath = app.getAppPath();\n if (!fs.existsSync(path.join(serverPath, CHILD_SCRIPT_FILENAME))) {\n serverPath = __dirname;\n }\n }\n }\n console.log('Server Path:', serverPath);\n var script = path.join(serverPath, CHILD_SCRIPT_FILENAME);\n console.log('Script for server:', script);\n\n // FOR DEBUG PURPOSE self.childProcess = fork(script ,[],{execArgv:['--inspect=5860']});\n self.childProcess = fork(script, []);\n var routeName = appSettings.getSettings().downloadsName;\n\n // send init data for http server\n var data = {\n cmd: 'init',\n routeName: routeName,\n port: port\n };\n self.childProcess.send(data);\n self.childProcess.on('error', function (err) {\n console.error(err);\n });\n // handles message from child process\n self.childProcess.on('message', function (data) {\n if (data.cmd === 'log') {\n // http server wants to log some data\n console.log(data.log);\n }\n if (data.cmd === 'listening_port') {\n // http server is listening => notify application for listen port\n callback(data.port);\n }\n if (data.cmd === 'get_info') {\n var requestId = data.requestId;\n // http server asks data folder for manifest id\n var manifestId = data.args.manifest;\n self._offlineController.getManifestInfo(manifestId, function (err, info) {\n if (err) {\n return self.childProcess.send({\n error: err,\n requestId: requestId\n });\n }\n var downloadFolder = info.manifest.folder;\n if (!downloadFolder) {\n // try to serve from default download folder\n downloadFolder = appSettings.getSettings().downloadsFolderPath;\n }\n\n // send response back\n return self.childProcess.send({\n status: 'OK',\n requestId: requestId,\n result: {\n folder: downloadFolder,\n status: info.status\n }\n });\n });\n }\n if (data.cmd === 'is_downloading') {\n var _requestId = data.requestId;\n var _manifestId = data.args.manifest;\n var file = data.args.file;\n var download = self._downloadController.getDownloading(_manifestId, file);\n var downloadedCallback = function downloadedCallback(err) {\n if (err) {\n return self.childProcess.send({\n error: err,\n requestId: _requestId\n });\n }\n return self.childProcess.send({\n status: 'OK',\n requestId: _requestId\n });\n };\n if (download) {\n // file is created but being downloading => wait for download before sending result\n self._downloadController.waitForDownload(download, downloadedCallback);\n } else {\n return downloadedCallback();\n }\n }\n if (data.cmd === 'perform_seek') {\n var _requestId2 = data.requestId;\n var _manifestId2 = data.args.manifest;\n var _file = data.args.file;\n var _downloadedCallback = function _downloadedCallback(err) {\n if (err) {\n return self.childProcess.send({\n error: err,\n requestId: _requestId2\n });\n }\n return self.childProcess.send({\n status: 'OK',\n requestId: _requestId2\n });\n };\n self._downloadController.performSeek(_manifestId2, _file, _downloadedCallback);\n }\n });\n self.childProcess.on('close', function (code, signal) {\n // child has closed\n if (code == null) {\n console.log('Child process closed with signal:', signal);\n } else {\n console.log('Child process closed with code:', code);\n }\n });\n};\n/**\n * @param {Function} callback - a callback function to get listen port (if default is taken)\n * @constructor\n */\nOfflineContentServer.prototype.serveOfflineContent = function (callback) {\n var self = this;\n function startOnPort(port) {\n if (port > self._maxOfflineContentPortRange) {\n return;\n }\n isPortTaken(port, function (err) {\n if (err) {\n port++;\n startOnPort(port);\n } else {\n console.log('Port found:', port);\n self._startServer(port, function () {\n self._offlineContentPort = port;\n callback(self._offlineContentPort);\n console.info('Offline content served on port:', port);\n });\n }\n });\n }\n startOnPort(this._offlineContentPort);\n};\n\n/*\n * Stop server process\n * @returns\n */\nOfflineContentServer.prototype.stop = function () {\n this.childProcess.kill('SIGTERM');\n};\nmodule.exports = OfflineContentServer;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTU4NC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ2E7O0FBRWIsSUFBTUEsV0FBVyxHQUFHQyxtQkFBTyxDQUFDLEVBQXVCLENBQUM7QUFDcEQsSUFBTUMsSUFBSSxHQUFHRCxtQkFBTyxDQUFDLElBQU0sQ0FBQztBQUM1QixJQUFNRSxFQUFFLEdBQUdGLG1CQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLElBQUlHLElBQUksR0FBR0gsZ0NBQTZCO0FBQ3hDLElBQU1JLFdBQVcsR0FBR0osbUJBQU8sQ0FBQyxJQUFpQixDQUFDO0FBQzlDLElBQUFLLFFBQUEsR0FBY0wsbUJBQU8sQ0FBQyxJQUFVLENBQUM7RUFBMUJNLEdBQUcsR0FBQUQsUUFBQSxDQUFIQyxHQUFHO0FBRVYsSUFBTUMscUJBQXFCLEdBQUcsZ0JBQWdCOztBQUU5QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBU0Msb0JBQW9CQSxDQUFFQyxpQkFBaUIsRUFBRUMsa0JBQWtCLEVBQUVDLDBCQUEwQixFQUFFQyxrQkFBa0IsRUFBRTtFQUNwSCxJQUFJLENBQUNDLGtCQUFrQixHQUFHSixpQkFBaUI7RUFDM0MsSUFBSSxDQUFDSyxtQkFBbUIsR0FBR0osa0JBQWtCO0VBQzdDLElBQUksQ0FBQ0ssMkJBQTJCLEdBQUdKLDBCQUEwQjtFQUM3RCxJQUFJLENBQUNLLG1CQUFtQixHQUFHSixrQkFBa0I7RUFDN0MsSUFBSSxDQUFDSyxZQUFZLEdBQUdDLFNBQVM7QUFDL0I7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ZSIsIm9mZmxpbmVDb250ZW50UG9ydCIsIl9vZmZsaW5lQ29udHJvbGxlciIsIl9kb3dubG9hZENvbnRyb2xsZXIiLCJfbWF4T2ZmbGluZUNvbnRlbnRQb3J0UmFuZ2UiLCJfb2ZmbGluZUNvbnRlbnRQb3J0IiwiY2hpbGRQcm9jZXNzIiwidW5kZWZpbmVkIiwicHJvdG90eXBlIiwiX3N0YXJ0U2VydmVyIiwicG9ydCIsImNhbGxiYWNrIiwic2VsZiIsInNlcnZlclBhdGgiLCJqb2luIiwiZ2V0QXBwUGF0aCIsImV4aXN0c1N5bmMiLCJfX2Rpcm5hbWUiLCJjb25zb2xlIiwibG9nIiwic2NyaXB0Iiwicm91dGVOYW1lIiwiZ2V0U2V0dGluZ3MiLCJkb3dubG9hZHNOYW1lIiwiZGF0YSIsImNtZCIsInNlbmQiLCJvbiIsImVyciIsImVycm9yIiwicmVxdWVzdElkIiwibWFuaWZlc3RJZCIsImFyZ3MiLCJtYW5pZmVzdCIsImdldE1hbmlmZXN0SW5mbyIsImluZm8iLCJkb3dubG9hZEZvbGRlciIsImZvbGRlciIsImRvd25sb2Fkc0ZvbGRlclBhdGgiLCJzdGF0dXMiLCJyZXN1bHQiLCJmaWxlIiwiZG93bmxvYWQiLCJnZXREb3dubG9hZGluZyIsImRvd25sb2FkZWRDYWxsYmFjayIsIndhaXRGb3JEb3dubG9hZCIsInBlcmZvcm1TZWVrIiwiY29kZSIsInNpZ25hbCIsInNlcnZlT2ZmbGluZUNvbnRlbnQiLCJzdGFydE9uUG9ydCIsInN0b3AiLCJraWxsIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1584\n")},534:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar _ = __webpack_require__(4952);\n\n/**\n * how much of progress should be connected with writing chunks to a hard drive (1 - 100%)\n * @type {number}\n */\nvar writeProgressUsage = 0.1;\n\n/**\n *\n * @param {DownloadsStorageController} storage - downloads storage controller\n * @constructor\n */\nfunction DownloadStats(storage) {\n this._storage = storage;\n this._stats = {};\n this._statsPrevious = {};\n this._STATS_TIME_GENERATION = 1000;\n _.bindAll(this, "_generate");\n}\n\n/**\n * @param {number} value - bytes\n * @param {number} precision - precision for kilobytes\n * @param {number=} precision2 - precision for megabytes\n * @param {number=} precision3 - precision for gigabytes\n * @returns {string} converted bytes to kb or mb or gb\n * @private\n */\nDownloadStats.prototype._convertToBytes = function (value, precision, precision2, precision3) {\n precision2 = typeof precision2 !== "undefined" ? precision2 : precision;\n precision3 = typeof precision3 !== "undefined" ? precision3 : precision;\n if (value < 100000) {\n return this._convertToKB(value, precision);\n } else if (value < 1024 * 1024 * 1024) {\n return this._convertToMB(value, precision2);\n } else {\n return this._convertToGB(value, precision3);\n }\n};\n\n/**\n *\n * @param {number} value - bytes\n * @param {number} precision - precision\n * @returns {string} kilobytes\n * @private\n */\nDownloadStats.prototype._convertToKB = function (value, precision) {\n precision = typeof precision !== "undefined" ? precision : 0;\n var a = Math.pow(10, precision);\n var oneKB = 1024;\n return Math.round(value * a / oneKB) / a + "kB";\n};\n\n/**\n * @param {number} value - bytes\n * @param {number} precision - precision\n * @returns {string} - megabytes\n * @private\n */\nDownloadStats.prototype._convertToMB = function (value, precision) {\n precision = typeof precision !== "undefined" ? precision : 0;\n var a = Math.pow(10, precision);\n var oneMB = 1024 * 1024;\n return Math.round(value * a / oneMB) / a + "MB";\n};\n\n/**\n * @param {number} value - bytes\n * @param {number} precision - precision\n * @returns {string} gigabytes\n * @private\n */\nDownloadStats.prototype._convertToGB = function (value, precision) {\n precision = typeof precision !== "undefined" ? precision : 0;\n var a = Math.pow(10, precision);\n var oneGB = 1024 * 1024 * 1024;\n return Math.round(value * a / oneGB) / a + "GB";\n};\nDownloadStats.prototype._clearSpeed = function () {\n var allManifestIds = Object.keys(this._stats) || [];\n for (var i = 0, j = allManifestIds.length; i < j; i++) {\n var manifestId = allManifestIds[i];\n if (!this._storage.keyExists(manifestId) && this._stats[manifestId] && this._stats[manifestId].speed) {\n this._stats[manifestId].speed = 0;\n this._stats[manifestId].speedBytes = this._convertToBytes(this._stats[manifestId].speed, 3, 2);\n }\n }\n};\n\n/**\n * @param {boolean} refresh - decides if stats should be only calculated without setting previous stats\n * this is useful when downloads finishes and stats are being calculated one more time\n * @returns {void}\n * @private\n */\nDownloadStats.prototype._generate = function (refresh) {\n var allStats = {};\n var manifests = this._storage.getKeys();\n this._clearSpeed();\n function countParts(items) {\n var parts = 0;\n for (var k = 0, l = items.length; k < l; k++) {\n var item = items[k];\n parts += item.bandwidth || 1;\n }\n return parts;\n }\n function countPartsObj(items, withDownloadedOnly) {\n var parts = 0;\n for (var key in items) {\n if (items.hasOwnProperty(key)) {\n var item = items[key];\n parts += (withDownloadedOnly ? item.stats.available / (item.stats.file_size || 1) : 1) * (item.bandwidth || 1);\n }\n }\n return parts;\n }\n function toArray(obj) {\n var arr = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var item = obj[key];\n arr.push(item);\n }\n }\n return arr;\n }\n var stats = {\n downloading: 0,\n downloaded: 0,\n available: 0,\n left: 0,\n downloadingAvailableBytes: 0,\n downloading_file_size: 0,\n downloadingBytes: 0,\n downloadedBytes: 0,\n availableBytes: 0,\n writeProgress: 0,\n writeProgressDownloading: 0,\n writeProgressDownloaded: 0,\n errors: 0,\n progress: 0,\n speed: 0,\n status: \'\'\n };\n\n //availableBytes - bates that has been already downloaded\n //downloadedBytes - bytes used to calculate the current speed\n //if for any reason the connection is broken or user stopped, then after resuming the available bytes are\n //always bigger then the actual downloaded bytes.\n //once the file is finished both values are equal and have the same value as file_size\n\n var now = new Date().getTime();\n if (!this._statsTime) {\n this._statsTime = now;\n }\n for (var i = 0, j = manifests.length; i < j; i++) {\n var manifestId = manifests[i];\n allStats[manifestId] = _.clone(stats);\n allStats[manifestId].left = this._storage.left.count(manifestId);\n allStats[manifestId].leftI = this._storage.left.getItems(manifestId);\n allStats[manifestId].errors = this._storage.errors.count(manifestId);\n allStats[manifestId].errorsI = this._storage.errors.getItems(manifestId);\n var items = this._storage.downloading.getKeys(manifestId);\n allStats[manifestId].downloading = items.length;\n allStats[manifestId].downloadingI = this._storage.downloading.getItems(manifestId);\n var writeProgressDownloadingItemsLength = items.length;\n for (var k = 0, l = items.length; k < l; k++) {\n var item = this._storage.downloading.getItem(manifestId, items[k]);\n allStats[manifestId].downloadingBytes += item.stats.downloaded;\n allStats[manifestId].downloading_file_size += item.stats.file_size;\n allStats[manifestId].downloadingAvailableBytes += item.stats.available;\n allStats[manifestId].writeProgressDownloading += item.stats.writeProgress;\n }\n items = this._storage.downloaded.getItems(manifestId);\n allStats[manifestId].downloaded = items.length;\n allStats[manifestId].downloadedI = items;\n var writeProgressItemsDownloadedLength = items.length;\n for (var _k = 0, _l = items.length; _k < _l; _k++) {\n var _item = items[_k];\n allStats[manifestId].downloadedBytes += _item.stats.downloaded;\n allStats[manifestId].writeProgressDownloaded += _item.stats.writeProgress;\n }\n\n //need to calculate what percentage of bytes that are going to be written to hard drive are according the the whole\n // size for example 5 files are being downloaded, 4 smaller are 100mb and one large 1,9GB. When the large file is\n // being saved the write progress is basically 1900/2000 = 95% of all written bytes.\n allStats[manifestId].writeProgressDownloading = allStats[manifestId].writeProgressDownloading * (allStats[manifestId].downloadingAvailableBytes / (allStats[manifestId].downloadedBytes + allStats[manifestId].downloading_file_size) || 1);\n allStats[manifestId].writeProgressDownloading = allStats[manifestId].writeProgressDownloading / (writeProgressDownloadingItemsLength || 1);\n allStats[manifestId].writeProgressDownloaded = allStats[manifestId].writeProgressDownloaded * (allStats[manifestId].downloadedBytes / (allStats[manifestId].downloadedBytes + allStats[manifestId].downloading_file_size) || 1);\n allStats[manifestId].writeProgressDownloaded = allStats[manifestId].writeProgressDownloaded / (writeProgressItemsDownloadedLength || 1);\n allStats[manifestId].writeProgress = allStats[manifestId].writeProgressDownloading + allStats[manifestId].writeProgressDownloaded;\n var speed = this._getDiff("downloadingBytes", manifestId, allStats, this._statsPrevious);\n speed += this._getDiff("downloadedBytes", manifestId, allStats, this._statsPrevious);\n speed = speed * 1000 / (now - this._statsTime || 1);\n allStats[manifestId].speed = speed;\n allStats[manifestId].status = this._storage.status.getItem(manifestId, "status");\n allStats[manifestId].details = this._storage.status.getItem(manifestId, "details");\n\n //progress for downloaded\n var leftParts = countParts(allStats[manifestId].leftI);\n var downloadedParts = countParts(allStats[manifestId].downloadedI);\n var downloadingPartsSize = countPartsObj(allStats[manifestId].downloadingI);\n var downloadingParts = countPartsObj(allStats[manifestId].downloadingI, true);\n var errorParts = countPartsObj(allStats[manifestId].errorsI);\n var allParts = leftParts + downloadedParts + downloadingPartsSize + errorParts;\n allStats[manifestId].progress = (downloadedParts + downloadingParts) / (allParts || 1);\n allStats[manifestId].progress = allStats[manifestId].progress * (1 - writeProgressUsage);\n allStats[manifestId].progress += allStats[manifestId].writeProgress * writeProgressUsage;\n allStats[manifestId].downloadedBytesTotal = Math.round(allStats[manifestId].progress * 10000) / 100;\n allStats[manifestId].downloadedBytesTotal += "%";\n\n // progress of each represention\n var reduceFunc = function reduceFunc(map, obj) {\n if (!map[obj.id]) {\n map[obj.id] = [];\n }\n map[obj.id].push(obj);\n return map;\n };\n var downloadedById = allStats[manifestId].downloadedI.reduce(reduceFunc, {});\n var downloadingArray = toArray(allStats[manifestId].downloadingI);\n var downloadingById = downloadingArray.reduce(reduceFunc, {});\n var leftById = allStats[manifestId].leftI.reduce(reduceFunc, {});\n var errorArray = toArray(allStats[manifestId].errorsI);\n var errorsById = errorArray.reduce(reduceFunc, {});\n var extend = function extend(obj, src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n if (!obj[key]) {\n obj[key] = [];\n }\n obj[key] = obj[key].concat(src[key]);\n }\n }\n return obj;\n };\n var allPartsById = {};\n extend(allPartsById, downloadedById);\n extend(allPartsById, downloadingById);\n extend(allPartsById, leftById);\n extend(allPartsById, errorsById);\n\n // compute progres for each id\n var progressById = {};\n var key = void 0;\n for (key in allPartsById) {\n if (allPartsById.hasOwnProperty(key)) {\n progressById[key] = countPartsObj(downloadedById[key]) / (countPartsObj(allPartsById[key]) || 1);\n }\n }\n var progressByIdPercent = {};\n for (key in progressById) {\n if (progressById.hasOwnProperty(key)) {\n progressByIdPercent[key] = Math.round(progressById[key] * 10000) / 100 + "%";\n }\n }\n allStats[manifestId].progressById = progressById;\n allStats[manifestId].progressByIdPercent = progressByIdPercent;\n }\n var showStats = {};\n for (var _i = 0, _j = manifests.length; _i < _j; _i++) {\n var _manifestId = manifests[_i];\n showStats[_manifestId] = {};\n var downloadedBytesTotal = allStats[_manifestId].downloadedBytes + allStats[_manifestId].downloadingAvailableBytes;\n showStats[_manifestId].progress = allStats[_manifestId].progress;\n showStats[_manifestId].progressPercentage = allStats[_manifestId].downloadedBytesTotal;\n showStats[_manifestId].progressById = allStats[_manifestId].progressById;\n showStats[_manifestId].progressByIdPercent = allStats[_manifestId].progressByIdPercent;\n showStats[_manifestId].downloadedBytesTotal = this._convertToBytes(downloadedBytesTotal, 1, 2, 2);\n showStats[_manifestId].downloaded = allStats[_manifestId].downloaded;\n showStats[_manifestId].left = allStats[_manifestId].left;\n showStats[_manifestId].errors = allStats[_manifestId].errors;\n if (allStats[_manifestId].speed < 0) {\n allStats[_manifestId].speed = 0;\n }\n showStats[_manifestId].speed = allStats[_manifestId].speed;\n showStats[_manifestId].speedBytes = this._convertToBytes(allStats[_manifestId].speed, 3, 2);\n showStats[_manifestId].status = allStats[_manifestId].status;\n showStats[_manifestId].details = allStats[_manifestId].details;\n }\n for (var _key in showStats) {\n if (showStats.hasOwnProperty(_key)) {\n this._stats[_key] = showStats[_key];\n }\n }\n if (!refresh) {\n this._statsTime = now;\n for (var _key2 in allStats) {\n if (allStats.hasOwnProperty(_key2)) {\n this._statsPrevious[_key2] = allStats[_key2];\n }\n }\n }\n};\n\n/**\n * @param {string} key - key stats identifier\n * @param {string} manifestId - manifest identifier\n * @param {number} current - current value\n * @param {number} previous - previous value\n * @returns {number} - difference between current and previous value\n * @private\n */\nDownloadStats.prototype._getDiff = function (key, manifestId, current, previous) {\n var currentValue = current[manifestId] && current[manifestId][key] || 0;\n var previousValue = previous[manifestId] && previous[manifestId][key] || 0;\n return currentValue - previousValue;\n};\n\n/**\n *\n * @param {string|array} manifestIds - manifest identifier or array of manifests identifier\n * @returns {*} stats for certain download or array of stats for downloads\n */\nDownloadStats.prototype.getStats = function (manifestIds) {\n var stats;\n if (this._stats) {\n if (typeof manifestIds === \'string\') {\n stats = this._stats[manifestIds];\n } else {\n stats = [];\n for (var i = 0, j = manifestIds.length; i < j; i++) {\n var stat = this._stats[manifestIds[i]];\n if (stat) {\n stats.push(stat);\n }\n }\n }\n }\n return stats;\n};\nDownloadStats.prototype.refresh = function () {\n this._generate(true);\n};\nDownloadStats.prototype.start = function () {\n if (!this._interval) {\n this._interval = setInterval(this._generate, this._STATS_TIME_GENERATION);\n this._generate();\n }\n};\nDownloadStats.prototype.stop = function () {\n clearInterval(this._interval);\n this._interval = null;\n this._generate();\n this._statsPrevious = {};\n};\nmodule.exports = DownloadStats;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTM0LmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiLElBQU1BLENBQUMsR0FBR0MsbUJBQU8sQ0FBQyxJQUFZLENBQUM7O0FBRS9CO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBTUMsa0JBQWtCLEdBQUcsR0FBRzs7QUFFOUI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVNDLGFBQWFBLENBQUVDLE9BQU8sRUFBRTtFQUMvQixJQUFJLENBQUNDLFFBQVEsR0FBR0QsT0FBTztFQUN2QixJQUFJLENBQUNFLE1BQU0sR0FBRyxDQUFDLENBQUM7RUFDaEIsSUFBSSxDQUFDQyxjQUFjLEdBQUcsQ0FBQyxDQUFDO0VBQ3hCL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kIiwiZXJyb3JBcnJheSIsImVycm9yc0J5SWQiLCJleHRlbmQiLCJzcmMiLCJjb25jYXQiLCJhbGxQYXJ0c0J5SWQiLCJwcm9ncmVzc0J5SWQiLCJwcm9ncmVzc0J5SWRQZXJjZW50Iiwic2hvd1N0YXRzIiwicHJvZ3Jlc3NQZXJjZW50YWdlIiwiY3VycmVudCIsInByZXZpb3VzIiwiY3VycmVudFZhbHVlIiwicHJldmlvdXNWYWx1ZSIsImdldFN0YXRzIiwibWFuaWZlc3RJZHMiLCJzdGF0Iiwic3RhcnQiLCJfaW50ZXJ2YWwiLCJzZXRJbnRlcnZhbCIsInN0b3AiLCJjbGVhckludGVydmFsIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///534\n')},1953:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar CODES = __webpack_require__(3740);\nvar translationErrors = {\n downloads: {\n _GENERAL: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Sorry we are unable to process your request - some internal error occurred"\n },\n ALREADY_FINISHED: {\n code: CODES.ERRORS.FINISHED,\n msg: "This download \'%manifestId%\' has been already finished."\n },\n ALREADY_REMOVED_ALL_UNFINISHED: {\n code: CODES.ERRORS.REMOVED,\n msg: "All unfinished downloads have been already removed, nothing left."\n },\n ALREADY_RESUMED: {\n code: CODES.ERRORS.RESUMED,\n msg: "This download \'%manifestId%\' has been already resumed."\n },\n ALREADY_STOPPED: {\n code: CODES.ERRORS.STOPPED,\n msg: "This download \'%manifestId%\' has been already stopped or has been already downloaded."\n },\n ALREADY_STOPPED_ALL: {\n code: CODES.ERRORS.STOPPED,\n msg: "There are no downloads to be stopped."\n },\n ALREADY_STARTED: {\n code: CODES.ERRORS.STARTED,\n msg: "This download \'%manifestId%\' has been already started."\n },\n BROKEN_CANNOT_BE_RESUMED: {\n code: CODES.ERRORS.BROKEN,\n msg: "This download \'%manifestId%\' is broken and cannot be resumed."\n },\n INFO_FAILED: {\n code: CODES.ERRORS.INFO,\n msg: "Gettting info of download \'%manifestId%\' failed."\n },\n REMOVING_ALL_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Removing of all downloads failed."\n },\n REMOVING_ALL_UNFINISHED_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Removing of all unfinished downloads failed."\n },\n REMOVING_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Removing of download \'%manifestId%\' failed."\n },\n RESUMING_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Resuming of download \'%manifestId%\' failed."\n },\n UPDATE_DOWNLOAD_FOLDER_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Updating of download folder for \'%manifestId%\' failed."\n },\n STOPPING_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Stopping of download \'%manifestId%\' failed."\n },\n SAVING_PERSISTENT_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Saving persistent info for download \'%manifestId%\' failed."\n },\n SAVING_DATA_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Saving data for download \'%manifestId%\' failed."\n },\n STOPPING_ALL_FAILED: {\n code: CODES.ERRORS.INTERNAL_ERROR,\n msg: "Stopping all downloads failed."\n },\n UNFINISHED: {\n code: CODES.ERRORS.UNFINISHED,\n msg: "This download is not ready yet."\n }\n },\n manifests: {\n NOT_FOUND: {\n code: CODES.ERRORS.NOT_FOUND,\n msg: "Manifest with id=\'%manifestId%\' not found."\n },\n LOADING_FAILED: {\n code: CODES.ERRORS.LOADING,\n msg: "Could not load manifest from url \'%manifestUrl%\'."\n },\n LIST_LOADING_FAILED: {\n code: CODES.ERRORS.LOADING,\n msg: "Could not load list of manifests."\n },\n FOLDER_ALREADY_EXISTS: {\n code: CODES.ERRORS.EXISTS,\n msg: "Folder for manifest with id =\'%manifestId%\' already exists."\n },\n INVALID_ID: {\n code: CODES.ERRORS.BROKEN,\n msg: "Provided custom id for manifest is not valid: (\'%invalid%\')"\n }\n }\n};\nmodule.exports = translationErrors;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk1My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxLQUFLLEdBQUdDLG1CQUFPLENBQUMsSUFBc0IsQ0FBQztBQUU3QyxJQUFNQyxpQkFBaUIsR0FBRztFQUN4QkMsU0FBUyxFQUFFO0lBQ1RDLFFBQVEsRUFBRTtNQUNSQyxJQUFJLEVBQUVMLEtBQUssQ0FBQ00sTUFBTSxDQUFDQyxjQUFjO01BQ2pDQyxHQUFHLEVBQUU7SUFDUCxDQUFDO0lBQ0RDLGdCQUFnQixFQUFFO01BQ2hCSixJQUFJLEVBQUVMLEtBQUssQ0FBQ00sTUFBTSxDQUFDSSxRQUFRO01BQzNCRixHQUFHLEVBQUU7SUFDUCxDQUFDO0lBQ0RHLDhCQUE4QixFQUFFO01BQzlCTixJQUFJLEVBQUVMLEtBQUssQ0FBQ00sTUFBTSxDQUFDTSxPQUFPO01BQzFCSixHQUFHLEVBQUU7SUFDUCxDQUFDO0lBQ0RLLGVBQWUsRUFBRTtNQUNmUixJQUFJLEVBQUVMLEtBQUssQ0FBQ00sTUFBTSxDQUFDUSxPQUFPO01BQzFCTixHQUFHLEVBQUU7SUFDUCxDQUFDO0lBQ0RPLGVBQWUsRUFBRTtNQUNmVixJQUFJLEVBQUVMLEtBQUssQ0FBQ00sTUFBTSxDQUFDVSxPQUFPO01BQzFCUixHQUFHLEVBQUU7SUFDUCxDQUFDO0lBQ0RTLG1CQUFtQixFQUFFO01BQ25CWixJQUFJLEVBQUVMLEtBQUssQ0FBQ00sTUFBTSxDQUFDVSxPQUFPO01BQzFCUixHQUFHLEVBQUU7SUFDUCxDQUFDO0lBQ0RVLGVBQWUsRUFBRTtNQUNmY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sIkJST0tFTiIsIklORk9fRkFJTEVEIiwiSU5GTyIsIlJFTU9WSU5HX0FMTF9GQUlMRUQiLCJSRU1PVklOR19BTExfVU5GSU5JU0hFRF9GQUlMRUQiLCJSRU1PVklOR19GQUlMRUQiLCJSRVNVTUlOR19GQUlMRUQiLCJVUERBVEVfRE9XTkxPQURfRk9MREVSX0ZBSUxFRCIsIlNUT1BQSU5HX0ZBSUxFRCIsIlNBVklOR19QRVJTSVNURU5UX0ZBSUxFRCIsIlNBVklOR19EQVRBX0ZBSUxFRCIsIlNUT1BQSU5HX0FMTF9GQUlMRUQiLCJVTkZJTklTSEVEIiwibWFuaWZlc3RzIiwiTk9UX0ZPVU5EIiwiTE9BRElOR19GQUlMRUQiLCJMT0FESU5HIiwiTElTVF9MT0FESU5HX0ZBSUxFRCIsIkZPTERFUl9BTFJFQURZX0VYSVNUUyIsIkVYSVNUUyIsIklOVkFMSURfSUQiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1953\n')},5406:module=>{"use strict";eval('\n\nmodule.exports = {\n test: "Hello world"\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTQwNi5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYkEsTUFBTSxDQUFDQyxPQUFPLEdBQUc7RUFDZkMsSUFBSSxFQUFFO0FBQ1IsQ0FBQyIsInNvdXJjZXMiOlsid2VicGFjazovL2Rvd25zdHJlYW0tZWxlY3Ryb24vLi9hcGkvdHJhbnNsYXRpb24vX3RyYW5zbGF0aW9ucy5qcz82ZWIwIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgdGVzdDogXCJIZWxsbyB3b3JsZFwiXG59OyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwidGVzdCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5406\n')},5847:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nfunction _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }\nvar errors = __webpack_require__(1953);\nvar translations = __webpack_require__(5406);\nvar CODES = __webpack_require__(3740);\nvar REGEXP_KEYS = /%[A-Za-z0-9_-]+%/g;\n\n/**\n * @namespace <global>\n * @module util/translation\n * @property {translationErrors} e - {@link translationErrors}\n */\nvar translation = {};\n\n/**\n *\n * @param {object} key - translation object\n * @returns {*} key from translation object\n * @private\n */\nfunction _getCode(key) {\n key = key || {};\n var code = key.code;\n if (!code) {\n code = CODES.GENERAL;\n }\n return code;\n}\n\n/**\n *\n * @param {object} key - translation object\n * @param {array|object|string|number|boolean} values - translation values\n * @returns {*} all key values\n * @private\n */\nfunction _getKeyValues(key, values) {\n var translation = key;\n var keyValues = [];\n if (_typeof(translation) === "object") {\n translation = translation.msg;\n }\n if (translation) {\n if (values instanceof Array) {\n var groups = _getUniqueKeys(translation.match(REGEXP_KEYS));\n for (var i = 0, j = Math.min(groups.length, values.length); i < j; i++) {\n var keyValue = {};\n keyValue[groups[i].replace(/%/g, "")] = values[i];\n keyValues.push(keyValue);\n }\n } else if (_typeof(values) === "object") {\n for (var _key in values) {\n if (values.hasOwnProperty(_key)) {\n var _keyValue = {};\n _keyValue[_key] = values[_key];\n keyValues.push(_keyValue);\n }\n }\n } else if (typeof values === "string" || typeof values === "number" || typeof values === "boolean") {\n var _groups = translation.match(REGEXP_KEYS) || [];\n for (var _i = 0, _j = _groups.length; _i < _j; _i++) {\n var _keyValue2 = {};\n _keyValue2[_groups[_i].replace(/%/g, "")] = values;\n keyValues.push(_keyValue2);\n }\n }\n }\n if (keyValues && !keyValues.length) {\n keyValues = undefined;\n }\n return keyValues;\n}\n\n/**\n *\n * @param {object} key - translation object\n * @param {array|object|string|number|boolean} values - translation values\n * @returns {*} translated message with attached values\n * @private\n */\nfunction _getTranslation(key, values) {\n var translation = key;\n if (_typeof(translation) === "object") {\n translation = translation.msg;\n }\n if (translation) {\n translation = _parseValues(translation, values);\n } else {\n translation = "Internal Error";\n }\n return translation;\n}\n\n/**\n *\n * @param {array} args - arguments\n * @returns {array} array of all values except 1st one\n * @private\n */\nfunction _getValues(args) {\n var values = [];\n for (var i = 1, j = args.length; i < j; i++) {\n values.push(args[i]);\n }\n if (values.length === 0) {\n values = undefined;\n } else if (values.length === 1) {\n values = values[0];\n }\n return values;\n}\n\n/**\n *\n * @param {array} groups - matched groups\n * @returns {array} unique names\n * @private\n */\nfunction _getUniqueKeys(groups) {\n var hashKey = {};\n var uniqueNames = [];\n groups = groups || [];\n for (var i = 0, j = groups.length; i < j; i++) {\n if (!hashKey[groups[i]]) {\n hashKey[groups[i]] = true;\n uniqueNames.push(groups[i]);\n }\n }\n return uniqueNames;\n}\n\n/**\n *\n * @param {string} translation - text to be translated\n * @param {array|object|string|number|boolean} values - values to be parsed with translation\n * @returns {*} translation\n * @private\n */\nfunction _parseValues(translation, values) {\n values = values || \'\';\n if (values instanceof Array) {\n var groups = _getUniqueKeys(translation.match(REGEXP_KEYS));\n for (var i = 0, j = Math.min(groups.length, values.length); i < j; i++) {\n translation = translation.replace(new RegExp(groups[i], "g"), values[i]);\n }\n } else if (_typeof(values) === "object") {\n for (var key in values) {\n if (values.hasOwnProperty(key)) {\n translation = translation.replace(new RegExp("%" + key + "%", "g"), values[key]);\n }\n }\n translation = translation.replace(REGEXP_KEYS, values);\n } else if (typeof values === "string" || typeof values === "number" || typeof values === "boolean") {\n translation = translation.replace(REGEXP_KEYS, values);\n }\n return translation;\n}\n\n/**\n * @alias module:util/translation.getError\n * @param {object} key - translation object\n * @returns {{code: *, msg: *, keys: *}} - error object with code, msg and keys\n */\nfunction getError(key) {\n var values = _getValues(arguments);\n var keyValues = _getKeyValues(key, values);\n var msg = _getTranslation(key, values);\n var code = _getCode(key);\n return {\n code: code,\n msg: msg,\n keys: keyValues\n };\n}\n\n/**\n * @alias module:util/translation.getTranslation\n * @static\n * @param {object} key - translation object\n * @returns {*} - return translated string with correctly applied values\n */\nfunction getTranslation(key) {\n var values = _getValues(arguments);\n return _getTranslation(key, values);\n}\ntranslation.getError = getError;\ntranslation.getTranslation = getTranslation;\ntranslation.e = errors;\ntranslation.t = translations;\nmodule.exports = translation;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTg0Ny5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFBQSxTQUFBQSxRQUFBQyxDQUFBLHNDQUFBRCxPQUFBLHdCQUFBRSxNQUFBLHVCQUFBQSxNQUFBLENBQUFDLFFBQUEsYUFBQUYsQ0FBQSxrQkFBQUEsQ0FBQSxnQkFBQUEsQ0FBQSxXQUFBQSxDQUFBLHlCQUFBQyxNQUFBLElBQUFELENBQUEsQ0FBQUcsV0FBQSxLQUFBRixNQUFBLElBQUFELENBQUEsS0FBQUMsTUFBQSxDQUFBRyxTQUFBLHFCQUFBSixDQUFBLEtBQUFELE9BQUEsQ0FBQUMsQ0FBQTtBQUViLElBQU1LLE1BQU0sR0FBR0MsbUJBQU8sQ0FBQyxJQUFXLENBQUM7QUFDbkMsSUFBTUMsWUFBWSxHQUFHRCxtQkFBTyxDQUFDLElBQWlCLENBQUM7QUFDL0MsSUFBTUUsS0FBSyxHQUFHRixtQkFBTyxDQUFDLElBQXNCLENBQUM7QUFFN0MsSUFBTUcsV0FBVyxHQUFHLG1CQUFtQjs7QUFFdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUlDLFdBQVcsR0FBRyxDQUFDLENBQUM7O0FBR3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Q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lcyIsImtleVZhbHVlcyIsIm1zZyIsIkFycmF5IiwiZ3JvdXBzIiwiX2dldFVuaXF1ZUtleXMiLCJtYXRjaCIsImkiLCJqIiwiTWF0aCIsIm1pbiIsImxlbmd0aCIsImtleVZhbHVlIiwicmVwbGFjZSIsInB1c2giLCJoYXNPd25Qcm9wZXJ0eSIsInVuZGVmaW5lZCIsIl9nZXRUcmFuc2xhdGlvbiIsIl9wYXJzZVZhbHVlcyIsIl9nZXRWYWx1ZXMiLCJhcmdzIiwiaGFzaEtleSIsInVuaXF1ZU5hbWVzIiwiUmVnRXhwIiwiZ2V0RXJyb3IiLCJhcmd1bWVudHMiLCJrZXlzIiwiZ2V0VHJhbnNsYXRpb24iLCJlIiwidCIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///5847\n')},453:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar moment = __webpack_require__(1908);\nvar IsoDurationParser = function () {\n function IsoDurationParser() {}\n IsoDurationParser.getDuration = function (val) {\n var dur = moment.duration(val);\n return dur.asMilliseconds();\n };\n IsoDurationParser.getDurationAsS = function (val) {\n var dur = moment.duration(val);\n return dur.asSeconds();\n };\n IsoDurationParser.getMoment = function () {\n return moment;\n };\n return IsoDurationParser;\n}();\nexports.IsoDurationParser = IsoDurationParser;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiLElBQU1BLE1BQU0sR0FBR0MsbUJBQU8sQ0FBQyxJQUFlLENBQUM7QUFDdkMsSUFBTUMsaUJBQWlCLEdBQUksWUFBWTtFQUNyQyxTQUFTQSxpQkFBaUJBLENBQUEsRUFBSSxDQUM5QjtFQUVBQSxpQkFBaUIsQ0FBQ0MsV0FBVyxHQUFHLFVBQVVDLEdBQUcsRUFBRTtJQUM3QyxJQUFNQ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KSB7XG4gICAgY29uc3QgZHVyID0gbW9tZW50LmR1cmF0aW9uKHZhbCk7XG4gICAgcmV0dXJuIGR1ci5hc1NlY29uZHMoKTtcbiAgfTtcbiAgSXNvRHVyYXRpb25QYXJzZXIuZ2V0TW9tZW50ID0gZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiBtb21lbnQ7XG4gIH07XG4gIHJldHVybiBJc29EdXJhdGlvblBhcnNlcjtcbn0oKSk7XG5leHBvcnRzLklzb0R1cmF0aW9uUGFyc2VyID0gSXNvRHVyYXRpb25QYXJzZXI7XG4iXSwibmFtZXMiOlsibW9tZW50IiwicmVxdWlyZSIsIklzb0R1cmF0aW9uUGFyc2VyIiwiZ2V0RHVyYXRpb24iLCJ2YWwiLCJkdXIiLCJkdXJhdGlvbiIsImFzTWlsbGlzZWNvbmRzIiwiZ2V0RHVyYXRpb25Bc1MiLCJhc1NlY29uZHMiLCJnZXRNb21lbnQiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///453\n")},4692:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar ArrayStorage = __webpack_require__(1730);\nvar createBridgeMethods = __webpack_require__(9273);\n\n/**\n * @param {DownloadsStorageController} parent - reference to parent object\n * @param {string} storageKey - storage key\n * @constructor\n */\nfunction ArrayStorageBridge(parent, storageKey) {\n this._parent = parent;\n this._storageKey = storageKey;\n createBridgeMethods(this, ArrayStorage);\n}\nmodule.exports = ArrayStorageBridge;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDY5Mi5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxZQUFZLEdBQUdDLG1CQUFPLENBQUMsSUFBaUIsQ0FBQztBQUMvQyxJQUFNQyxtQkFBbUIsR0FBR0QsbUJBQU8sQ0FBQyxJQUF5QixDQUFDOztBQUU5RDtBQUNBO0FBQ0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uYW1lcyI6WyJBcnJheVN0b3JhZ2UiLCJyZXF1aXJlIiwiY3JlYXRlQnJpZGdlTWV0aG9kcyIsIkFycmF5U3RvcmFnZUJyaWRnZSIsInBhcmVudCIsInN0b3JhZ2VLZXkiLCJfcGFyZW50IiwiX3N0b3JhZ2VLZXkiLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4692\n")},1730:module=>{"use strict";eval("\n\n/**\n * @constructor\n */\nfunction ArrayStorage() {\n this._items = [];\n}\n\n/**\n * @returns {void}\n */\nArrayStorage.prototype.clear = function () {\n this._items = [];\n};\n\n/**\n *\n * @param {array} items - array items\n * @returns {void}\n */\nArrayStorage.prototype.concat = function (items) {\n this._items = this._items.concat(items);\n};\n\n/**\n *\n * @returns {number} - number of items\n */\nArrayStorage.prototype.count = function () {\n return this._items.length;\n};\n\n/**\n *\n * @returns {array} - items\n */\nArrayStorage.prototype.getItems = function () {\n return this._items;\n};\n\n/**\n *\n * @param {object} item - new item\n * @returns {void}\n */\nArrayStorage.prototype.push = function (item) {\n this._items.push(item);\n};\n\n/**\n * removes first element and returns it\n * @returns {*} - item\n */\nArrayStorage.prototype.shift = function () {\n return this._items.shift();\n};\n\n/**\n * add elements to the beginning of array\n * @returns {*} - new length of an array\n */\nArrayStorage.prototype.unshift = function () {\n return this._items.unshift.apply(this, arguments);\n};\nmodule.exports = ArrayStorage;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTczMC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQSxTQUFTQSxZQUFZQSxDQUFBLEVBQUk7RUFDdkIsSUFBSSxDQUFDQyxNQUFNLEdBQUcsRUFBRTtBQUNsQjs7QUFFQTtBQUNBO0FBQ0E7QUFDQUQsWUFBWSxDQUFDRSxTQUFTLENBQUNDLEtBQUssR0FBRy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HtcbiAgcmV0dXJuIHRoaXMuX2l0ZW1zO1xufTtcblxuLyoqXG4gKlxuICogQHBhcmFtIHtvYmplY3R9IGl0ZW0gLSBuZXcgaXRlbVxuICogQHJldHVybnMge3ZvaWR9XG4gKi9cbkFycmF5U3RvcmFnZS5wcm90b3R5cGUucHVzaCA9IGZ1bmN0aW9uIChpdGVtKSB7XG4gIHRoaXMuX2l0ZW1zLnB1c2goaXRlbSk7XG59O1xuXG4vKipcbiAqIHJlbW92ZXMgZmlyc3QgZWxlbWVudCBhbmQgcmV0dXJucyBpdFxuICogQHJldHVybnMgeyp9IC0gaXRlbVxuICovXG5BcnJheVN0b3JhZ2UucHJvdG90eXBlLnNoaWZ0ID0gZnVuY3Rpb24gKCkge1xuICByZXR1cm4gdGhpcy5faXRlbXMuc2hpZnQoKTtcbn07XG5cbi8qKlxuICogYWRkIGVsZW1lbnRzIHRvIHRoZSBiZWdpbm5pbmcgb2YgYXJyYXlcbiAqIEByZXR1cm5zIHsqfSAtIG5ldyBsZW5ndGggb2YgYW4gYXJyYXlcbiAqL1xuQXJyYXlTdG9yYWdlLnByb3RvdHlwZS51bnNoaWZ0ID0gZnVuY3Rpb24gKCkge1xuICByZXR1cm4gdGhpcy5faXRlbXMudW5zaGlmdC5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBBcnJheVN0b3JhZ2U7Il0sIm5hbWVzIjpbIkFycmF5U3RvcmFnZSIsIl9pdGVtcyIsInByb3RvdHlwZSIsImNsZWFyIiwiY29uY2F0IiwiaXRlbXMiLCJjb3VudCIsImxlbmd0aCIsImdldEl0ZW1zIiwicHVzaCIsIml0ZW0iLCJzaGlmdCIsInVuc2hpZnQiLCJhcHBseSIsImFyZ3VtZW50cyIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1730\n")},1958:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fs = __webpack_require__(7147);\nvar path = __webpack_require__(1017);\nvar appSettings = __webpack_require__(8557);\n\n/**\n *\n * @param {string} manifestId - manifest Id\n * @param {string} downloadFolder - donwload folder\n * @returns {Promise} promise\n */\nmodule.exports = function (manifestId, downloadFolder) {\n var settingsPath = path.resolve(appSettings.getSettings().settingsFolder + "/" + manifestId + "/");\n var moviePath = path.resolve(appSettings.getSettings().downloadsFolderPath + "/" + manifestId + "/");\n if (downloadFolder) {\n moviePath = path.resolve(downloadFolder + "/" + manifestId + "/");\n }\n function dirNotExists(dirToCheck) {\n return new Promise(function (resolve /* , reject */) {\n fs.stat(dirToCheck, function (er, stat) {\n if (er) {\n resolve();\n } else {\n if (stat.isDirectory()) {\n resolve(\'Folder already exists\');\n } else {\n resolve();\n }\n }\n });\n });\n }\n return new Promise(function (resolve, reject) {\n Promise.all([dirNotExists(settingsPath), dirNotExists(moviePath)]).then(function (results) {\n results = results || [];\n var errors = results.filter(function (result) {\n return typeof result !== \'undefined\';\n });\n if (errors.length) {\n reject(results);\n } else {\n resolve();\n }\n }, reject);\n });\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk1OC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxFQUFFLEdBQUdDLG1CQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLElBQU1DLElBQUksR0FBR0QsbUJBQU8sQ0FBQyxJQUFNLENBQUM7QUFDNUIsSUFBTUUsV0FBVyxHQUFHRixtQkFBTyxDQUFDLElBQWlCLENBQUM7O0FBRTlDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBRyxNQUFNLENBQUNDLE9BQU8sR0FBRyxVQUFVQyxVQUFVLEVBQUVDLGNBQWMsRUFBRTtFQUNyRCxJQUFNQyxZQUFZLEdBQUdOLElBQUksQ0FBQ08sT0FBTyxDQUFDTixXQUFXLENBQUN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90RXhpc3RzKG1vdmllUGF0aClcbiAgICBdKS50aGVuKGZ1bmN0aW9uIChyZXN1bHRzKSB7XG4gICAgICByZXN1bHRzID0gcmVzdWx0cyB8fCBbXTtcbiAgICAgIGNvbnN0IGVycm9ycyA9IHJlc3VsdHMuZmlsdGVyKGZ1bmN0aW9uIChyZXN1bHQpIHtcbiAgICAgICAgcmV0dXJuIHR5cGVvZiByZXN1bHQgIT09ICd1bmRlZmluZWQnO1xuICAgICAgfSk7XG4gICAgICBpZiAoZXJyb3JzLmxlbmd0aCkge1xuICAgICAgICByZWplY3QocmVzdWx0cyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXNvbHZlKCk7XG4gICAgICB9XG4gICAgfSwgcmVqZWN0KTtcbiAgfSk7XG59O1xuIl0sIm5hbWVzIjpbImZzIiwicmVxdWlyZSIsInBhdGgiLCJhcHBTZXR0aW5ncyIsIm1vZHVsZSIsImV4cG9ydHMiLCJtYW5pZmVzdElkIiwiZG93bmxvYWRGb2xkZXIiLCJzZXR0aW5nc1BhdGgiLCJyZXNvbHZlIiwiZ2V0U2V0dGluZ3MiLCJzZXR0aW5nc0ZvbGRlciIsIm1vdmllUGF0aCIsImRvd25sb2Fkc0ZvbGRlclBhdGgiLCJkaXJOb3RFeGlzdHMiLCJkaXJUb0NoZWNrIiwiUHJvbWlzZSIsInN0YXQiLCJlciIsImlzRGlyZWN0b3J5IiwicmVqZWN0IiwiYWxsIiwidGhlbiIsInJlc3VsdHMiLCJlcnJvcnMiLCJmaWx0ZXIiLCJyZXN1bHQiLCJsZW5ndGgiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1958\n')},9273:module=>{"use strict";eval('\n\n/**\n * the idea is to copy the methods from storage so that they can be triggered from parent object and then propagated back\n * to the storage object.\n * for example:\n * someController.storage.status.setItem(manifestId, someKey, someValue);\n * someController.storage.downloads.setItem(manifestId, someKey, someValue);\n * @param {object} scope - parent object where the method "From" object will be bridged to\n * @param {object} From - object where the original method was declared\n * @returns {void}\n */\nfunction createBridgeMethods(scope, From) {\n function action() {\n var args = [],\n i,\n j;\n for (i = 0, j = arguments.length; i < j; i++) {\n args.push(arguments[i]);\n }\n args.unshift(this._storageKey);\n return this._parent._itemAction.apply(this._parent, args);\n }\n for (var methodName in From.prototype) {\n if (From.prototype.hasOwnProperty(methodName)) {\n scope[methodName] = action.bind(scope, methodName);\n }\n }\n}\nmodule.exports = createBridgeMethods;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTI3My5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVNBLG1CQUFtQkEsQ0FBRUMsS0FBSyxFQUFFQyxJQUFJLEVBQUU7RUFDekMsU0FBU0MsTUFBTUEsQ0FBQSxFQUFJO0lBQ2pCLElBQUlDLElBQUksR0FBRyxFQUFFO01BQUVDLENBQUM7TUFBRUMsQ0FBQztJQUNuQixLQUFLRCxDQUFDLEdBQUcsQ0FBQyxFQUFFQyxDQUFDLEdBQUdDLFNBQVMsQ0FBQ0MsTUFBTSxFQUFFSCxDQUFDLEdBQUdDLENBQUMsRUFBRUQsQ0FBQyxFQUFFLEVBQUU7TUFDNUNELElBQUksQ0FBQ0ssSUFBSSxDQUFDRixTQUFTLENBQUNGLENBQUMsQ0FBQyxDQUFDO0lBQ3pCO0lBQ0FELElBQUksQ0FBQ00sT0FBTyxDQUFDLElBQUksQ0FBQ0MsV0FBVyxDQUFDO0lBQzlCLE9BQU8sSUFBSSxDQUFDQyxPQUFPLENBQUNDLFdBQVcsQ0FBQ0MsS0FBSyxDQUFDLElBQUksQ0FBQ0YsT0FBTyxFQUFFUixJQUFJLENBQUM7RUFDM0Q7RUFFQSxLQUFLLElBQUlXLFVBQVUsSUFBSWIsSUFBSSxDQUFDYyxT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\n//# sourceURL=webpack-internal:///9273\n')},7182:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar fs = __webpack_require__(7147);\nvar path = __webpack_require__(1017);\n/**\n * @param {string} dir - folder path\n * @param {string} itemName - folder or file name\n * @param {boolean} includeFolders - if folders should be included\n * @param {boolean} includeFiles - if files should be included\n * @returns {Promise} promise\n */\nfunction filterDirItem(dir, itemName, includeFolders, includeFiles) {\n var folderPath = path.resolve(dir + "/" + itemName);\n return new Promise(function (resolve, reject) {\n fs.stat(folderPath, function (err, stat) {\n if (err) {\n reject(err);\n return;\n }\n if (stat.isDirectory()) {\n if (!includeFolders) {\n itemName = undefined;\n }\n resolve(itemName);\n } else {\n if (!includeFiles) {\n itemName = undefined;\n }\n resolve(itemName);\n }\n });\n });\n}\n\n/**\n * @param {string} dir - folder path\n * @param {boolean} includeFolders - if folders should be included\n * @param {boolean} includeFiles - if files should be included\n * @returns {Promise} promise\n */\nfunction dirList(dir, includeFolders, includeFiles) {\n if (typeof includeFolders === "undefined") {\n includeFolders = true;\n }\n if (typeof includeFiles === "undefined") {\n includeFiles = true;\n }\n return new Promise(function (resolve, reject) {\n fs.readdir(dir, function (err, folders) {\n if (err) {\n //not found return empty list, there was another error ENOTDIR but it seems like this is not a valid case anyway\n if (err.code === "ENOENT" || err.code === "ENOTDIR") {\n resolve([]);\n } else {\n reject(err.message);\n }\n } else {\n var foldersPromises = [];\n for (var i = 0, j = folders.length; i < j; i++) {\n foldersPromises.push(filterDirItem(dir, folders[i], includeFolders, includeFiles));\n }\n Promise.all(foldersPromises).then(function (results) {\n resolve(results.filter(function (folderName) {\n return typeof folderName !== "undefined";\n }));\n }, function (promiseError) {\n reject(promiseError);\n });\n }\n });\n });\n}\nmodule.exports = dirList;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzE4Mi5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUF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Blb2YgZm9sZGVyTmFtZSAhPT0gXCJ1bmRlZmluZWRcIlxuICAgICAgICAgIH0pKTtcbiAgICAgICAgfSwgZnVuY3Rpb24gKHByb21pc2VFcnJvcikge1xuICAgICAgICAgIHJlamVjdChwcm9taXNlRXJyb3IpO1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfSk7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gZGlyTGlzdDtcbiJdLCJuYW1lcyI6WyJmcyIsInJlcXVpcmUiLCJwYXRoIiwiZmlsdGVyRGlySXRlbSIsImRpciIsIml0ZW1OYW1lIiwiaW5jbHVkZUZvbGRlcnMiLCJpbmNsdWRlRmlsZXMiLCJmb2xkZXJQYXRoIiwicmVzb2x2ZSIsIlByb21pc2UiLCJyZWplY3QiLCJzdGF0IiwiZXJyIiwiaXNEaXJlY3RvcnkiLCJ1bmRlZmluZWQiLCJkaXJMaXN0IiwicmVhZGRpciIsImZvbGRlcnMiLCJjb2RlIiwibWVzc2FnZSIsImZvbGRlcnNQcm9taXNlcyIsImkiLCJqIiwibGVuZ3RoIiwicHVzaCIsImFsbCIsInRoZW4iLCJyZXN1bHRzIiwiZmlsdGVyIiwiZm9sZGVyTmFtZSIsInByb21pc2VFcnJvciIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///7182\n')},5237:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar constants = __webpack_require__(6557);\nvar utilUrl = __webpack_require__(8167);\n\n/**\n * @module\n * @namespace downloadUtil\n */\nvar downloadUtil = {};\n\n/**\n * @typedef {Link} Link\n * @property {string} id - identifier\n * @property {number} bandwidth - bandwidth\n * @property {string} contentType - content type [video, audio, text]\n * @property {string} remoteUrl - remote url\n * @property {string} localUrl - local url\n */\n\n/**\n * @typedef {Link} Link\n * @property {string} id - identifier\n * @property {number} bandwidth - bandwidth\n * @property {string} contentType - content type [video, audio, text]\n * @property {string} remoteUrl - remote url\n * @property {string} localUrl - local url\n */\n\n/**\n * @param {string} manifestId - manifest identifier\n * @param {string} localPath - local path\n * @param {string} remotePath - remote path\n * @param {Array} userRepresentations - representations chosen by a user\n * @param {Array} manifestRepresentations - all manifest representations\n * @param {object} downloadedHash - download unique identifier\n * @returns {Link[]} array of {@link Link}\n */\ndownloadUtil.getAllLinks = function getAllLinks(manifestId, localPath, remotePath, userRepresentations, manifestRepresentations) {\n return downloadUtil.getDownloadLinks(manifestId, localPath, remotePath, userRepresentations, manifestRepresentations);\n};\n\n/**\n * @param {string} manifestId - manifest identifier\n * @param {string} localPath - local path\n * @param {string} remotePath - remote path\n * @param {Array} userRepresentations - representations chosen by a user\n * @param {Array} manifestRepresentations - all manifest representations\n * @param {object} downloadedHash - download unique identifier\n * @returns {Link[]} array of {@link Link}\n */\ndownloadUtil.getDownloadLinks = function getDownloadLinks(manifestId, localPath, remotePath, userRepresentations, manifestRepresentations, downloadedHash) {\n var chosenRepresentations = downloadUtil.getChosenRepresentations(userRepresentations, manifestRepresentations);\n var bandwidth, contentType, localUrl, i, id, j, k, l, links;\n var mediaFile, mediaBaseUrl, mediaUrls, remoteUrl, segmentInformation;\n links = [];\n downloadedHash = downloadedHash || {};\n for (i = 0, j = chosenRepresentations.length; i < j; i++) {\n contentType = chosenRepresentations[i].attributeList.mimeType;\n bandwidth = +chosenRepresentations[i].attributeList.bandwidth;\n if (contentType.indexOf("video") === 0) {\n contentType = "video";\n } else if (contentType.indexOf("audio") === 0) {\n contentType = "audio";\n } else {\n contentType = "text";\n }\n segmentInformation = chosenRepresentations[i].segmentInformation;\n mediaUrls = segmentInformation.mediaUrls;\n id = segmentInformation.representationID;\n for (k = 0, l = mediaUrls.length; k < l; k++) {\n mediaFile = mediaUrls[k].mediaFile;\n mediaBaseUrl = mediaUrls[k].baseURL;\n mediaBaseUrl = mediaBaseUrl.replace(/\\.\\.\\//g, "");\n mediaBaseUrl = mediaBaseUrl.replace(/\\.\\./g, "");\n if (mediaFile === mediaBaseUrl || remotePath === mediaBaseUrl) {\n mediaBaseUrl = "";\n }\n // remove http and https from mediaBaseUrl, this way it will create a correct folder structure\n if (mediaBaseUrl.match(constants.regexpProtocolRemove)) {\n remoteUrl = utilUrl.joinPathWithFile(mediaBaseUrl, mediaFile);\n localUrl = utilUrl.joinPathWithFile(localPath, mediaBaseUrl.replace(constants.regexpProtocolRemove, ""), mediaFile);\n } else {\n remoteUrl = utilUrl.joinPathWithFile(remotePath, mediaBaseUrl, mediaFile);\n localUrl = utilUrl.joinPathWithFile(localPath, mediaBaseUrl, mediaFile);\n }\n\n // filter query string from localUrl\n var index = localUrl.lastIndexOf(\'?\');\n if (index > -1) {\n localUrl = localUrl.substr(0, index);\n }\n if (!downloadedHash[localUrl] || !downloadedHash[localUrl] && downloadedHash[localUrl].remoteUrl !== remoteUrl) {\n if (!links[k]) {\n links[k] = [];\n }\n links[k].push({\n id: id,\n bandwidth: bandwidth,\n contentType: contentType,\n remoteUrl: remoteUrl,\n localUrl: localUrl\n });\n }\n }\n }\n\n // NOTE: use links.flat() in the future\n return links.reduce(function (acc, val) {\n return acc.concat(val);\n }, []);\n};\n\n/**\n *\n * @param {array} userChosenRepr - array of chosen representations ids by user\n * @param {array} manifestRepr - array of all manifest representations\n * @returns {array} chosen representations from manifest\n */\ndownloadUtil.getChosenRepresentations = function getChosenRepresentations(userChosenRepr, manifestRepr) {\n var chosenRepresentations = [];\n var userChosenReprObj = {};\n userChosenRepr = userChosenRepr || [];\n manifestRepr = manifestRepr || [];\n for (var i = 0, j = userChosenRepr.length; i < j; i++) {\n userChosenReprObj[String(userChosenRepr[i])] = true;\n }\n for (var _i = 0, _j = manifestRepr.length; _i < _j; _i++) {\n var items = manifestRepr[_i].representationColl;\n for (var k = 0, l = items.length; k < l; k++) {\n var item = items[k];\n if (userChosenReprObj[String(item.attributeList.id)]) {\n chosenRepresentations.push(item);\n }\n }\n }\n return chosenRepresentations;\n};\nmodule.exports = downloadUtil;//# sourceUR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9zZW5SZXByIiwibWFuaWZlc3RSZXByIiwidXNlckNob3NlblJlcHJPYmoiLCJTdHJpbmciLCJpdGVtcyIsInJlcHJlc2VudGF0aW9uQ29sbCIsIml0ZW0iLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5237\n')},2759:module=>{"use strict";eval("\n\nfunction isUTF16(data) {\n var i = 0;\n var len = data && data.length;\n var pos = null;\n var b1, b2, next, prev;\n if (len < 2) {\n if (data[0] > 0xFF) {\n return false;\n }\n } else {\n b1 = data[0];\n b2 = data[1];\n if (b1 === 0xFF &&\n // BOM (little-endian)\n b2 === 0xFE) {\n return true;\n }\n if (b1 === 0xFE &&\n // BOM (big-endian)\n b2 === 0xFF) {\n return true;\n }\n for (; i < len; i++) {\n if (data[i] === 0x00) {\n pos = i;\n break;\n } else if (data[i] > 0xFF) {\n return false;\n }\n }\n if (pos === null) {\n return false; // Non ASCII\n }\n next = data[pos + 1]; // BE\n if (next !== void 0 && next > 0x00 && next < 0x80) {\n return true;\n }\n prev = data[pos - 1]; // LE\n if (prev !== void 0 && prev > 0x00 && prev < 0x80) {\n return true;\n }\n }\n return false;\n}\nmodule.exports = {\n isUTF16: isUTF16\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc1OS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixTQUFTQSxPQUFPQSxDQUFFQyxJQUFJLEVBQUU7RUFDdEIsSUFBSUMsQ0FBQyxHQUFHLENBQUM7RUFDVCxJQUFJQyxHQUFHLEdBQUdGLElBQUksSUFBSUEsSUFBSSxDQUFDRyxNQUFNO0VBQzdCLElBQUlDLEdBQUcsR0FBRyxJQUFJO0VBQ2QsSUFBSUMsRUFBRSxFQUFFQyxFQUFFLEVBQUVDLElBQUksRUFBRUMsSUFBSTtFQUV0QixJQUFJTixHQUFHLEdBQUcsQ0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pZiAoZGF0YVtpXSA9PT0gMHgwMCkge1xuICAgICAgICAgICAgICBwb3MgPSBpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2UgaWYgKGRhdGFbaV0gPiAweEZGKSB7XG4gICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChwb3MgPT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7IC8vIE5vbiBBU0NJSVxuICAgICAgfVxuXG4gICAgICBuZXh0ID0gZGF0YVtwb3MgKyAxXTsgLy8gQkVcbiAgICAgIGlmIChuZXh0ICE9PSB2b2lkIDAgJiYgbmV4dCA+IDB4MDAgJiYgbmV4dCA8IDB4ODApIHtcbiAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgcHJldiA9IGRhdGFbcG9zIC0gMV07IC8vIExFXG4gICAgICBpZiAocHJldiAhPT0gdm9pZCAwICYmIHByZXYgPiAweDAwICYmIHByZXYgPCAweDgwKSB7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gIH1cblxuICByZXR1cm4gZmFsc2U7XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBpc1VURjE2OiBpc1VURjE2XG59Il0sIm5hbWVzIjpbImlzVVRGMTYiLCJkYXRhIiwiaSIsImxlbiIsImxlbmd0aCIsInBvcyIsImIxIiwiYjIiLCJuZXh0IiwicHJldiIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///2759\n")},1408:module=>{"use strict";eval('\n\nmodule.exports = function fieldsPicker(obj, fields, attr) {\n if (typeof attr === "undefined") {\n return;\n }\n for (var i = 0, j = fields.length; i < j; i++) {\n var field = fields[i];\n var defaultValue = field.defaultValue;\n var name = field.name || field;\n obj[name] = typeof attr[name] !== "undefined" ? attr[name] : defaultValue;\n }\n};//# source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xuICB9XG4gIGZvciAobGV0IGkgPSAwLCBqID0gZmllbGRzLmxlbmd0aDsgaSA8IGo7IGkrKykge1xuICAgIGNvbnN0IGZpZWxkID0gZmllbGRzW2ldO1xuICAgIGNvbnN0IGRlZmF1bHRWYWx1ZSA9IGZpZWxkLmRlZmF1bHRWYWx1ZTtcbiAgICBjb25zdCBuYW1lID0gZmllbGQubmFtZSB8fCBmaWVsZDtcbiAgICBvYmpbbmFtZV0gPSB0eXBlb2YgYXR0cltuYW1lXSAhPT0gXCJ1bmRlZmluZWRcIiA/IGF0dHJbbmFtZV0gOiBkZWZhdWx0VmFsdWU7XG4gIH1cbn07XG4iXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsImZpZWxkc1BpY2tlciIsIm9iaiIsImZpZWxkcyIsImF0dHIiLCJpIiwiaiIsImxlbmd0aCIsImZpZWxkIiwiZGVmYXVsdFZhbHVlIiwibmFtZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1408\n')},7868:module=>{"use strict";eval('\n\nfunction removeCharacter(text, pos) {\n var newText;\n newText = text.substr(0, pos - 1);\n if (text.length > pos) {\n newText += text.substr(pos, text.length);\n }\n return newText;\n}\nfunction getInvalidDiff(text, regex, openingTag, closingTag) {\n var value = String(text);\n var check = true;\n var i = 1;\n while (check) {\n var valueToCheck = value.substr(0, i);\n if (!valueToCheck.match(regex)) {\n value = removeCharacter(value, i);\n } else {\n i++;\n }\n if (i > value.length) {\n check = false;\n }\n }\n var arrValue = value.split("");\n for (var _i = 0, j = text.length; _i < j; _i++) {\n if (_i >= arrValue.length || text[_i] !== arrValue[_i]) {\n arrValue.splice(_i, 0, openingTag + text[_i] + closingTag);\n }\n }\n return arrValue.join("");\n}\nmodule.exports = getInvalidDiff;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzg2OC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7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pvaW4iLCJtb2R1bGUiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7868\n')},96:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar net = __webpack_require__(1808);\nmodule.exports = function (port, fn) {\n var tester = net.createServer().once('error', function (err) {\n if (err) {\n return fn(err);\n }\n fn(null, true);\n }).once('listening', function () {\n tester.once('close', function () {\n fn(null, false);\n }).close();\n }).listen(port);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTYuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsSUFBTUEsR0FBRyxHQUFHQyxtQkFBTyxDQUFDLElBQUssQ0FBQztBQUUxQkMsTUFBTSxDQUFDQyxPQUFPLEdBQUcsVUFBVUMsSUFBSSxFQUFFQyxFQUFFLEVBQUU7RUFDbkMsSUFBTUMsTUFBTSxHQUFHTixHQUFHLENBQUNPLFlBQVksQ0FBQyxDQUFDLENBQUNDLElBQUksQ0FBQyxPQUFPLEVBQUUsVUFBVUMsR0FBRyxFQUFFO0lBQzdELElBQUlBLEdBQUcsRUFBRTtNQUNQLE9BQU9KLEVBQUUsQ0FBQ0ksR0FBRyxDQUFDO0lBQ2hCO0lBQ0FKLEVBQUUsQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDO0VBQ2hCLENBQUMsQ0FBQyxDQUFDRyxJQUFJLENBQUMsV0FBVyxFQUFFLFlBQVk7SUFDL0JGLE1BQU0sQ0FBQ0UsSUFBSSxDQUFDLE9BQU8sRUFBRSxZQUFZO01BQy9CSCxFQUFFLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQztJQUNqQixDQUFDLENBQUMsQ0FBQ0ssS0FBSyxDQUFDLENBQUM7RUFDWixDQUFDLENBQUMsQ0FBQ0MsTUFBTSxDQUFDUCxJQUFJLENBQUM7QUFDakIsQ0FBQyIsInNvdXJjZXMiOlsid2VicGFjazovL2Rvd25zdHJlYW0tZWxlY3Ryb24vLi9hcGkvdXRpbC9pcy1wb3J0LXRha2VuLmpzP2NkYzciXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmNvbnN0IG5ldCA9IHJlcXVpcmUoJ25ldCcpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChwb3J0LCBmbikge1xuICBjb25zdCB0ZXN0ZXIgPSBuZXQuY3JlYXRlU2VydmVyKCkub25jZSgnZXJyb3InLCBmdW5jdGlvbiAoZXJyKSB7XG4gICAgaWYgKGVycikge1xuICAgICAgcmV0dXJuIGZuKGVycik7XG4gICAgfVxuICAgIGZuKG51bGwsIHRydWUpO1xuICB9KS5vbmNlKCdsaXN0ZW5pbmcnLCBmdW5jdGlvbiAoKSB7XG4gICAgdGVzdGVyLm9uY2UoJ2Nsb3NlJywgZnVuY3Rpb24gKCkge1xuICAgICAgZm4obnVsbCwgZmFsc2UpO1xuICAgIH0pLmNsb3NlKCk7XG4gIH0pLmxpc3Rlbihwb3J0KTtcbn07XG4iXSwibmFtZXMiOlsibmV0IiwicmVxdWlyZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJwb3J0IiwiZm4iLCJ0ZXN0ZXIiLCJjcmVhdGVTZXJ2ZXIiLCJvbmNlIiwiZXJyIiwiY2xvc2UiLCJsaXN0ZW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///96\n")},3064:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar constants = __webpack_require__(6557);\nvar Manifest = (__webpack_require__(7151)/* .Manifest */ .G);\nvar XMLSerializer = (__webpack_require__(2008).XMLSerializer);\nfunction getMimeType(value) {\n if (value.indexOf("video") !== -1) {\n return "video";\n } else if (value.indexOf("audio") !== -1) {\n return "audio";\n } else {\n return "text";\n }\n}\nfunction parseManifestWithChoosenRepresentations(manifest, representations) {\n var manifestId = manifest.id;\n var xmlSerializer = new XMLSerializer();\n var manifestUrl = manifest.getManifestUrl();\n var manifestString = xmlSerializer.serializeToString(manifest.getManifestXML());\n manifest = new Manifest(manifestId);\n manifest.loadFromStr(manifestString, manifestUrl);\n var video = representations.video;\n var audio = representations.audio;\n var text = representations.text;\n var chosenRepresentations = {};\n chosenRepresentations["video"] = {};\n for (var i = 0, j = video.length; i < j; i++) {\n chosenRepresentations["video"][video[i]] = true;\n }\n chosenRepresentations["audio"] = {};\n for (var _i = 0, _j = audio.length; _i < _j; _i++) {\n chosenRepresentations["audio"][audio[_i]] = true;\n }\n chosenRepresentations["text"] = {};\n for (var _i2 = 0, _j2 = text.length; _i2 < _j2; _i2++) {\n chosenRepresentations["text"][text[_i2]] = true;\n }\n function markNodeForDownload(repr) {\n for (var _i3 = 0, _j3 = repr.length; _i3 < _j3; _i3++) {\n for (var k = 0, l = repr[_i3].representationColl.length; k < l; k++) {\n var id = repr[_i3].representationColl[k].attributeList.id;\n var mimeType = getMimeType(repr[_i3].representationColl[k].attributeList.mimeType);\n if (chosenRepresentations[mimeType][id]) {\n repr[_i3].representationColl[k].markNodeForDownload(true);\n }\n }\n }\n }\n\n // fix the baseURL by removing http and https the same is done when saving a file\n // see api/util/downloads.js -> getDownloadLinks\n function fixBaseURL(repr) {\n for (var _i4 = 0, _j4 = repr.length; _i4 < _j4; _i4++) {\n var baseURL = repr[_i4].currentNode.getElementsByTagName("BaseURL")[0];\n if (baseURL && baseURL.textContent.match(constants.regexpProtocolRemove)) {\n baseURL.textContent = baseURL.textContent.replace(constants.regexpProtocolRemove, "");\n }\n }\n }\n markNodeForDownload(manifest.getVideoRepresentations());\n markNodeForDownload(manifest.getAudioRepresentations());\n markNodeForDownload(manifest.getTextRepresentations());\n fixBaseURL(manifest.getVideoRepresentations());\n fixBaseURL(manifest.getAudioRepresentations());\n fixBaseURL(manifest.getTextRepresentations());\n manifest.removeNode();\n return xmlSerializer.serializeToString(manifest.getManifestXML());\n}\nmodule.exports = parseMan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3NlblJlcHJlc2VudGF0aW9ucyIsIm1hbmlmZXN0IiwicmVwcmVzZW50YXRpb25zIiwibWFuaWZlc3RJZCIsImlkIiwieG1sU2VyaWFsaXplciIsIm1hbmlmZXN0VXJsIiwiZ2V0TWFuaWZlc3RVcmwiLCJtYW5pZmVzdFN0cmluZyIsInNlcmlhbGl6ZVRvU3RyaW5nIiwiZ2V0TWFuaWZlc3RYTUwiLCJsb2FkRnJvbVN0ciIsInZpZGVvIiwiYXVkaW8iLCJ0ZXh0IiwiY2hvc2VuUmVwcmVzZW50YXRpb25zIiwiaSIsImoiLCJsZW5ndGgiLCJtYXJrTm9kZUZvckRvd25sb2FkIiwicmVwciIsImsiLCJsIiwicmVwcmVzZW50YXRpb25Db2xsIiwiYXR0cmlidXRlTGlzdCIsIm1pbWVUeXBlIiwiZml4QmFzZVVSTCIsImJhc2VVUkwiLCJjdXJyZW50Tm9kZSIsImdldEVsZW1lbnRzQnlUYWdOYW1lIiwidGV4dENvbnRlbnQiLCJtYXRjaCIsInJlZ2V4cFByb3RvY29sUmVtb3ZlIiwicmVwbGFjZSIsImdldFZpZGVvUmVwcmVzZW50YXRpb25zIiwiZ2V0QXVkaW9SZXByZXNlbnRhdGlvbnMiLCJnZXRUZXh0UmVwcmVzZW50YXRpb25zIiwicmVtb3ZlTm9kZSIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///3064\n')},943:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('/*eslint no-console: ["error", { allow: ["warn", "error", "info"] }] */\n\n\nvar fs = __webpack_require__(7147);\nvar path = __webpack_require__(1017);\nvar downloadFileUtil = __webpack_require__(6003);\nfunction removeDir(dir, cb, ENOTEMPTY_attempts) {\n ENOTEMPTY_attempts = ENOTEMPTY_attempts || 0;\n var ENOTEMPTY_maxAttempts = 10;\n var ENOTEMPTY_TIMEOUT = 500;\n if (typeof dir !== \'string\') {\n throw new Error(\'directory path required\');\n }\n if (cb !== undefined && typeof cb !== \'function\') {\n throw new Error(\'callback must be function\');\n }\n var self = this;\n var called, results;\n downloadFileUtil.checkForLocalFile(dir, function existsCallback(exists) {\n if (!exists) {\n return removeDirCallback(null);\n }\n fs.stat(dir, function statCallback(err, stat) {\n if (err) {\n return removeDirCallback(err);\n }\n if (!stat.isDirectory()) {\n return fs.unlink(dir, removeDirCallback);\n }\n fs.readdir(dir, readdirCallback);\n });\n function readdirCallback(err, files) {\n if (err) {\n return removeDirCallback(err);\n }\n var n = files.length;\n if (n === 0) {\n return fs.rmdir(dir, removeDirCallback);\n }\n files.forEach(function (name) {\n removeDir(path.resolve(dir, name), function (err) {\n if (err) {\n return removeDirCallback(err);\n }\n if (--n === 0) {\n return fs.rmdir(dir, removeDirCallback);\n }\n });\n });\n }\n });\n function removeDirCallback(err) {\n if (err && err.code === "ENOTEMPTY") {\n if (ENOTEMPTY_attempts < ENOTEMPTY_maxAttempts) {\n ENOTEMPTY_attempts++;\n console.error("ERROR ENOTEMPTY", dir, ENOTEMPTY_attempts);\n setTimeout(function () {\n removeDir(dir, cb, ENOTEMPTY_attempts);\n }, ENOTEMPTY_TIMEOUT);\n return;\n }\n }\n if (err && err.code === \'ENOENT\') {\n arguments[0] = null;\n }\n if (!results) {\n results = arguments;\n }\n if (!cb || called) {\n return;\n }\n called = true;\n cb.apply(self, results);\n }\n}\nmodule.exports = removeDir;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTQzLmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ2E7O0FBRWIsSUFBTUEsRUFBRSxHQUFHQyxtQkFBTyxDQUFDLElBQUksQ0FBQztBQUN4QixJQUFNQyxJQUFJLEdBQUdELG1CQUFPLENBQUMsSUFBTSxDQUFDO0FBQzVCLElBQU1FLGdCQUFnQixHQUFHRixtQkFBTyxDQUFDLElBQWlDLENBQUM7QUFFbkUsU0FBU0csU0FBU0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XG4gICAgICB9XG4gICAgICBmcy5yZWFkZGlyKGRpciwgcmVhZGRpckNhbGxiYWNrKTtcbiAgICB9KTtcblxuICAgIGZ1bmN0aW9uIHJlYWRkaXJDYWxsYmFjayAoZXJyLCBmaWxlcykge1xuICAgICAgaWYgKGVycikge1xuICAgICAgICByZXR1cm4gcmVtb3ZlRGlyQ2FsbGJhY2soZXJyKTtcbiAgICAgIH1cblxuICAgICAgbGV0IG4gPSBmaWxlcy5sZW5ndGg7XG4gICAgICBpZiAobiA9PT0gMCkge1xuICAgICAgICByZXR1cm4gZnMucm1kaXIoZGlyLCByZW1vdmVEaXJDYWxsYmFjayk7XG4gICAgICB9XG5cbiAgICAgIGZpbGVzLmZvckVhY2goZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgcmVtb3ZlRGlyKHBhdGgucmVzb2x2ZShkaXIsIG5hbWUpLCBmdW5jdGlvbiAoZXJyKSB7XG4gICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgcmV0dXJuIHJlbW92ZURpckNhbGxiYWNrKGVycik7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICgtLW4gPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiBmcy5ybWRpcihkaXIsIHJlbW92ZURpckNhbGxiYWNrKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgfVxuICB9KTtcblxuICBmdW5jdGlvbiByZW1vdmVEaXJDYWxsYmFjayAoZXJyKSB7XG4gICAgaWYgKGVyciAmJiBlcnIuY29kZSA9PT0gXCJFTk9URU1QVFlcIikge1xuICAgICAgaWYgKEVOT1RFTVBUWV9hdHRlbXB0cyA8IEVOT1RFTVBUWV9tYXhBdHRlbXB0cykge1xuICAgICAgICBFTk9URU1QVFlfYXR0ZW1wdHMrKztcbiAgICAgICAgY29uc29sZS5lcnJvcihcIkVSUk9SIEVOT1RFTVBUWVwiLCBkaXIsIEVOT1RFTVBUWV9hdHRlbXB0cyk7XG4g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wiY29uc29sZSIsImVycm9yIiwic2V0VGltZW91dCIsImFyZ3VtZW50cyIsImFwcGx5IiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///943\n')},6744:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar _require = __webpack_require__(9526),\n mkdirp = _require.mkdirp;\nvar fs = __webpack_require__(7147);\nvar path = __webpack_require__(1017);\nfunction saveFile(filePath, fileName, value, callback) {\n mkdirp(filePath).then(function () {\n var fileUrl = path.resolve(filePath + "/" + fileName);\n fs.writeFile(fileUrl, value, "utf-8", callback);\n }, function (error) {\n callback(error);\n });\n}\nmodule.exports = saveFile;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjc0NC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFBQSxRQUFBLEdBQWlCQyxtQkFBTyxDQUFDLElBQVEsQ0FBQztFQUEzQkMsTUFBTSxHQUFBRixRQUFBLENBQU5FLE1BQU07QUFDYixJQUFNQyxFQUFFLEdBQUdGLG1CQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLElBQU1HLElBQUksR0FBR0gsbUJBQU8sQ0FBQyxJQUFNLENBQUM7QUFFNUIsU0FBU0ksUUFBUUEsQ0FBRUMsUUFBUSxFQUFFQyxRQUFRLEVBQUVDLEtBQUssRUFBRUMsUUFBUSxFQUFFO0VBQ3REUCxNQUFNLENBQUNJLFFBQVEsQ0FBQyxDQUFDSSxJQUFJLENBQUMsWUFBWTtJQUNoQyxJQUFNQyxPQUFPLEdBQUdQLElBQUksQ0FBQ1EsT0FBTyxDQUFDTixRQUFRLEdBQUcsR0FBRyxHQUFHQyxRQUFRLENBQUM7SUFDdkRKLEVBQUUsQ0FBQ1UsU0FBUyxDQUFDRixPQUFPLEVBQUVILEtBQUssRUFBRSxPQUFPLEVBQUVDLFFBQVE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UiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///6744\n')},4576:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval("\n\nvar FlakeIdGen = __webpack_require__(1759);\nvar intFormat = __webpack_require__(1637);\nvar generator = new FlakeIdGen();\nvar SnowflakeId = function () {\n function SnowflakeId() {}\n SnowflakeId.getUUID = function () {\n var id1 = generator.next();\n var id3 = intFormat(id1, 'dec');\n return id3;\n };\n return SnowflakeId;\n}();\nexports.SnowflakeId = SnowflakeId;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU3Ni5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYixJQUFNQSxVQUFVLEdBQUdDLG1CQUFPLENBQUMsSUFBYSxDQUFDO0FBQ3pDLElBQU1DLFNBQVMsR0FBR0QsbUJBQU8sQ0FBQyxJQUFnQixDQUFDO0FBQzNDLElBQU1FLFNBQVMsR0FBRyxJQUFJSCxVQUFVLENBQUQsQ0FBQztBQUNoQyxJQUFNSSxXQUFXLEdBQUksWUFBWTtFQUMvQixTQUFTQSxXQUFXQSxDQUFBLEVBQUksQ0FDeEI7RUFFQUEsV0FBVyxDQUFDQyxPQUFPLEdBQUcsWUFBWTtJQUNoQyxJQUFNQyxHQUFHLEdBQUdILFNBQVMsQ0FBQ0ksSUFBSSxDQUFDLENBQUM7SUFDNUIsSUFBTUMsR0FBRyxHQUFHTixTQUFTLENBQUNJLEdBQUcsRUFBRSxLQUFLLENBQUM7SUFDakMsT0FBT0UsR0FBRztFQUNaLENBQUM7RUFDRCxPQUFPSixXQUFXO0FBQ3BCLENBQUMsQ0FBQyxDQUFFO0FBQ0pLLG1CQUFtQixHQUFHTCxXQUFXIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vZG93bnN0cmVhbS1lbGVjdHJvbi8uL2FwaS91dGlsL3Nub3dmbGFrZS1pZC5qcz9iNjM1Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuY29uc3QgRmxha2VJZEdlbiA9IHJlcXVpcmUoJ2ZsYWtlLWlkZ2VuJyk7XG5jb25zdCBpbnRGb3JtYXQgPSByZXF1aXJlKCdiaWd1aW50LWZvcm1hdCcpO1xuY29uc3QgZ2VuZXJhdG9yID0gbmV3IEZsYWtlSWRHZW47XG5jb25zdCBTbm93Zmxha2VJZCA9IChmdW5jdGlvbiAoKSB7XG4gIGZ1bmN0aW9uIFNub3dmbGFrZUlkICgpIHtcbiAgfVxuXG4gIFNub3dmbGFrZUlkLmdldFVVSUQgPSBmdW5jdGlvbiAoKSB7XG4gICAgY29uc3QgaWQxID0gZ2VuZXJhdG9yLm5leHQoKTtcbiAgICBjb25zdCBpZDMgPSBpbnRGb3JtYXQoaWQxLCAnZGVjJyk7XG4gICAgcmV0dXJuIGlkMztcbiAgfTtcbiAgcmV0dXJuIFNub3dmbGFrZUlkO1xufSgpKTtcbmV4cG9ydHMuU25vd2ZsYWtlSWQgPSBTbm93Zmxha2VJZDtcbiJdLCJuYW1lcyI6WyJGbGFrZUlkR2VuIiwicmVxdWlyZSIsImludEZvcm1hdCIsImdlbmVyYXRvciIsIlNub3dmbGFrZUlkIiwiZ2V0VVVJRCIsImlkMSIsIm5leHQiLCJpZDMiLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4576\n")},3575:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nvar Storage = __webpack_require__(6351);\nvar createBridgeMethods = __webpack_require__(9273);\n\n/**\n * @param {DownloadsStorageController} parent - reference to parent object\n * @param {string} storageKey - storage key\n * @constructor\n */\nfunction StorageBridge(parent, storageKey) {\n this._parent = parent;\n this._storageKey = storageKey;\n createBridgeMethods(this, Storage);\n}\nmodule.exports = StorageBridge;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJza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JlbnQ7XG4gIHRoaXMuX3N0b3JhZ2VLZXkgPSBzdG9yYWdlS2V5O1xuICBjcmVhdGVCcmlkZ2VNZXRob2RzKHRoaXMsIFN0b3JhZ2UpO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IFN0b3JhZ2VCcmlkZ2U7Il0sIm5hbWVzIjpbIlN0b3JhZ2UiLCJyZXF1aXJlIiwiY3JlYXRlQnJpZGdlTWV0aG9kcyIsIlN0b3JhZ2VCcmlkZ2UiLCJwYXJlbnQiLCJzdG9yYWdlS2V5IiwiX3BhcmVudCIsIl9zdG9yYWdlS2V5IiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3575\n")},6351:module=>{"use strict";eval('\n\n/**\n *\n * @constructor\n */\nfunction Storage() {\n this._items = {};\n}\n\n/**\n * @returns {void}\n */\nStorage.prototype.clear = function () {\n this._items = {};\n};\n\n/**\n * @returns {number} number of items\n */\nStorage.prototype.count = function () {\n return this.getKeys().length;\n};\n\n/**\n * @param {string} id - item identifier\n * @returns {void}\n */\nStorage.prototype.decrease = function (id) {\n if (typeof this._items[id] !== "number") {\n this._items[id] = 0;\n }\n this._items[id]--;\n};\n\n/**\n * @param {string} id - item identifier\n * @returns {object} item\n */\nStorage.prototype.getItem = function (id) {\n return this._items[id];\n};\n\n/**\n * @returns {object} items\n */\nStorage.prototype.getItems = function () {\n return this._items;\n};\n\n/**\n * @returns {string[]} keys of all items\n */\nStorage.prototype.getKeys = function () {\n return Object.keys(this._items);\n};\n\n/**\n * @param {string} id - item identifier\n * @returns {void}\n */\nStorage.prototype.increase = function (id) {\n if (typeof this._items[id] !== "number") {\n this._items[id] = 0;\n }\n this._items[id]++;\n};\n\n/**\n * @param {string} id - item identifier\n * @returns {void}\n */\nStorage.prototype.removeItem = function (id) {\n delete this._items[id];\n};\n\n/**\n *\n * @param {string} id - item identifier\n * @param {object} item - item to be saved\n * @returns {void}\n */\nStorage.prototype.setItem = function (id, item) {\n this._items[id] = item;\n};\n\n/**\n *\n * @param {object} items - items to be saved\n * @returns {void}\n */\nStorage.prototype.setItems = function (items) {\n for (var key in items) {\n if (items.hasOwnProperty(key)) {\n this.setItem(key, items[key]);\n }\n }\n};\nmodule.exports = Storage;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjM1MS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVNBLE9BQU9BLENBQUEsRUFBSTtFQUNsQixJQUFJLENBQUNDLE1BQU0sR0FBRyxDQUFDLENBQUM7QUFDbEI7O0FBRUE7QUFDQTtBQUNBO0FBQ0FELE9BQU8sQ0FBQ0UsU0FBUyxDQUFDQyxLQUFLLEdBQUcsWUFBWTtFQUNwQyxJQUFJLENBQUNGLE1BQU0sR0FBRyxDQUFDLENBQUM7QUFDbEIsQ0FBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQUQsT0FBTyxDQUFDRSxTQUFTLENBQUNFLEtBQUssR0FBRyxZQUFZO0VBQ3BDLE9BQU8sSUFBSSxDQUFDQyxPQUFPLENBQUMsQ0FBQyxDQUFDQyxNQUFNO0FBQzlCLENBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQU4sT0FBTyxDQUFDRSxTQUFTLENBQUNLLFFBQVEsR0FBRyxVQUFVQyxFQUFFLEVBQUU7RUFDekMsSUFBSSxPQUFPLElBQUksQ0FBQ1AsTUFBTSxDQUFDTyxFQUFFLENBQUMsS0FBSyxRQUFRLEVBQUU7SUFDdkMsSUFBSSxDQUFDUCxNQUFNLENBQUNPLEVBQUUsQ0FBQyxHQUFHLENBQUM7RUFDckI7RUFDQSxJQUFJLENBQUNQLE1BQU0sQ0FBQ08sRUFBRSxDQUFDLEVBQUU7QUFDbkIsQ0FBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtB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IsInJlbW92ZUl0ZW0iLCJzZXRJdGVtIiwiaXRlbSIsInNldEl0ZW1zIiwiaXRlbXMiLCJrZXkiLCJoYXNPd25Qcm9wZXJ0eSIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6351\n')},2595:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval('\n\nvar Snowflake = __webpack_require__(4576);\nvar _ = __webpack_require__(4952);\n\n/**\n *\n * @param {function} process - function to get the result from\n * @param {function} callback - callback to be invoked when "process" function returns anything\n * @param {number} target - window target id\n * @param {string} manifestId - manifest identifier\n * @param {number} time - time in miliseconds how often the callback should be invoked\n * @param {boolean} onceOnly - if set to true the callback will be invoked once only and subsriber will be removed\n * @constructor\n */\nfunction Subscriber(process, callback, target, manifestId, time, onceOnly) {\n this._process = process;\n this._callback = callback;\n this._manifestId = manifestId;\n this._id = String(Snowflake.SnowflakeId.getUUID());\n this._onceOnly = onceOnly;\n this._target = target;\n this.onInterval = function () {\n var result = this._process();\n var self = this;\n if (result) {\n if (this._onceOnly) {\n this.remove();\n if (typeof this._callbackOnFinish === "function") {\n this._callbackOnFinish(function (err, result) {\n self._callback(self._id, err, result, self._target, true);\n });\n } else {\n this._callback(this._id, null, result, self._target);\n }\n } else {\n this._callback(this._id, null, result, self._target);\n }\n }\n };\n _.bindAll(this, "onInterval");\n this._intervalTimer = setInterval(this.onInterval, time);\n}\n\n/**\n *\n * @returns {string} - subscriber identifier\n */\nSubscriber.prototype.getId = function () {\n return this._id;\n};\n\n/**\n *\n * @returns {string} - manifest identifier\n */\nSubscriber.prototype.getManifestId = function () {\n return this._manifestId;\n};\n\n/**\n * @param {function} callback - function to be invoked when "process" function returns anything\n * and when "onceOnly" is set to true\n * @returns {void}\n */\nSubscriber.prototype.onFinish = function (callback) {\n this._callbackOnFinish = callback;\n};\n\n/**\n * @returns {void}\n */\nSubscriber.prototype.remove = function () {\n clearInterval(this._intervalTimer);\n};\n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GlzLl9jYWxsYmFja09uRmluaXNoID0gY2FsbGJhY2s7XG59O1xuXG4vKipcbiAqIEByZXR1cm5zIHt2b2lkfVxuICovXG5TdWJzY3JpYmVyLnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbiAoKSB7XG4gIGNsZWFySW50ZXJ2YWwodGhpcy5faW50ZXJ2YWxUaW1lcik7XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFN1YnNjcmliZXI7Il0sIm5hbWVzIjpbIlNub3dmbGFrZSIsInJlcXVpcmUiLCJfIiwiU3Vic2NyaWJlciIsInByb2Nlc3MiLCJjYWxsYmFjayIsInRhcmdldCIsIm1hbmlmZXN0SWQiLCJ0aW1lIiwib25jZU9ubHkiLCJfcHJvY2VzcyIsIl9jYWxsYmFjayIsIl9tYW5pZmVzdElkIiwiX2lkIiwiU3RyaW5nIiwiU25vd2ZsYWtlSWQiLCJnZXRVVUlEIiwiX29uY2VPbmx5IiwiX3RhcmdldCIsIm9uSW50ZXJ2YWwiLCJyZXN1bHQiLCJzZWxmIiwicmVtb3ZlIiwiX2NhbGxiYWNrT25GaW5pc2giLCJlcnIiLCJiaW5kQWxsIiwiX2ludGVydmFsVGltZXIiLCJzZXRJbnRlcnZhbCIsInByb3RvdHlwZSIsImdldElkIiwiZ2V0TWFuaWZlc3RJZCIsIm9uRmluaXNoIiwiY2xlYXJJbnRlcnZhbCIsIm1vZHVsZSIsImV4cG9ydHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///2595\n')},8167:module=>{"use strict";eval('\n\nfunction join() {\n var pathString = "",\n arg;\n for (var i = 0, j = arguments.length; i < j; i++) {\n arg = arguments[i].replace(/^\\.\\//g, "/");\n // don\'t add to the last one\n pathString += arg;\n if (i < j - 1) {\n pathString += "/";\n }\n }\n pathString = pathString.replace(/\\/{2,}/g, "/");\n pathString = pathString.replace("https:/", "https://");\n pathString = pathString.replace("http:/", "http://");\n pathString = pathString.replace("file:/", "file://");\n return pathString;\n}\nfunction joinPath() {\n return join.apply(null, arguments) + "/";\n}\nfunction joinPathWithFile() {\n return join.apply(null, arguments);\n}\nmodule.exports = {\n joinPath: joinPath,\n joinPathWithFile: joinPathWithFile\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODE2Ny5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixTQUFTQSxJQUFJQSxDQUFBLEVBQUk7RUFDZixJQUFJQyxVQUFVLEdBQUcsRUFBRTtJQUFFQyxHQUFHO0VBQ3hCLEtBQUssSUFBSUMsQ0FBQyxHQUFHLENBQUMsRUFBRUMsQ0FBQyxHQUFHQyxTQUFTLENBQUNDLE1BQU0sRUFBRUgsQ0FBQyxHQUFHQyxDQUFDLEVBQUVELENBQUMsRUFBRSxFQUFFO0lBQ2hERCxHQUFHLEdBQUdHLFNBQVMsQ0FBQ0YsQ0FBQyxDQUFDLENBQUNJLE9BQU8sQ0FBQyxRQUFRLEVBQUUsR0FBRyxDQUFDO0lBQ3pDO0lBQ0FOLFVBQVUsSUFBSUMsR0FBRztJQUNqQixJQUFJQyxDQUFDLEdBQUdDLENBQUMsR0FBRyxDQUFDLEVBQUU7TUFDYkgsVUFBVSxJQUFJLEdBQUc7SUFDbkI7RUFDRjtFQUNBQSxVQUFVLEdBQUdBLFVBQVUsQ0FBQ00sT0FBTyxDQUFDLFNBQVMsRUFBRSxHQUFHLENBQUM7RUFDL0NOLFVBQVUsR0FBR0EsVUFBVSxDQUFDTSxPQUFPLENBQUMsU0FBUyxFQUFFLFVBQVUsQ0FBQztFQUN0RE4sVUFBVSxHQUFHQSxVQUFVLENBQUNNLE9BQU8sQ0FBQyxRQUFRLEVBQUUsU0FBUyxDQUFDO0VBQ3BETixVQUFVLEdBQUdBLFVBQVUsQ0FBQ00sT0FBTyxDQUFDLFFBQVEsRUFBRSxTQUFTLENBQUM7RUFDcEQsT0FBT04sVUFBVTtBQUNuQ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odHRwOi9cIiwgXCJodHRwOi8vXCIpO1xuICBwYXRoU3RyaW5nID0gcGF0aFN0cmluZy5yZXBsYWNlKFwiZmlsZTovXCIsIFwiZmlsZTovL1wiKTtcbiAgcmV0dXJuIHBhdGhTdHJpbmc7XG59XG5cbmZ1bmN0aW9uIGpvaW5QYXRoICgpIHtcbiAgcmV0dXJuIGpvaW4uYXBwbHkobnVsbCwgYXJndW1lbnRzKSArIFwiL1wiO1xufVxuXG5mdW5jdGlvbiBqb2luUGF0aFdpdGhGaWxlICgpIHtcbiAgcmV0dXJuIGpvaW4uYXBwbHkobnVsbCwgYXJndW1lbnRzKTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGpvaW5QYXRoOiBqb2luUGF0aCxcbiAgam9pblBhdGhXaXRoRmlsZTogam9pblBhdGhXaXRoRmlsZVxufTtcbiJdLCJuYW1lcyI6WyJqb2luIiwicGF0aFN0cmluZyIsImFyZyIsImkiLCJqIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwicmVwbGFjZSIsImpvaW5QYXRoIiwiYXBwbHkiLCJqb2luUGF0aFdpdGhGaWxlIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8167\n')},7074:(__unused_webpack_module,exports)=>{"use strict";eval("\n\nvar ZeroPadding = function () {\n function ZeroPadding() {}\n ZeroPadding.addPadding = function (num, howManyZeros) {\n var result;\n var numArr = num.toString().split('');\n while (numArr.length < howManyZeros) {\n numArr.unshift('0');\n }\n result = numArr.join('');\n return result;\n };\n ZeroPadding.getPaddingAmount = function (inputStr) {\n var startIndex = inputStr.indexOf('%');\n var endIndex = inputStr.lastIndexOf('$');\n var numPadding = parseInt(inputStr.substring(startIndex + 1, endIndex - 1));\n numPadding = isNaN(numPadding) ? 0 : numPadding;\n return numPadding;\n };\n return ZeroPadding;\n}();\nexports.ZeroPadding = ZeroPadding;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json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VybiBaZXJvUGFkZGluZztcbn0oKSk7XG5leHBvcnRzLlplcm9QYWRkaW5nID0gWmVyb1BhZGRpbmc7XG4iXSwibmFtZXMiOlsiWmVyb1BhZGRpbmciLCJhZGRQYWRkaW5nIiwibnVtIiwiaG93TWFueVplcm9zIiwicmVzdWx0IiwibnVtQXJyIiwidG9TdHJpbmciLCJzcGxpdCIsImxlbmd0aCIsInVuc2hpZnQiLCJqb2luIiwiZ2V0UGFkZGluZ0Ftb3VudCIsImlucHV0U3RyIiwic3RhcnRJbmRleCIsImluZGV4T2YiLCJlbmRJbmRleCIsImxhc3RJbmRleE9mIiwibnVtUGFkZGluZyIsInBhcnNlSW50Iiwic3Vic3RyaW5nIiwiaXNOYU4iLCJleHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7074\n")}},__webpack_module_cache__={};function __webpack_require__(Q){var U=__webpack_module_cache__[Q];if(void 0!==U)return U.exports;var F=__webpack_module_cache__[Q]={exports:{}};return __webpack_modules__[Q].call(F.exports,F,F.exports,__webpack_require__),F.exports}var __webpack_exports__=__webpack_require__(1630);return __webpack_exports__})()));