From bc71097a6b4782b205b9db21a1c3e119c4e31a32 Mon Sep 17 00:00:00 2001 From: jenkinsopenvidu Date: Fri, 11 May 2018 08:43:01 +0000 Subject: [PATCH] Update to version v2.0.0 --- openvidu-browser/package.json | 100 +-- .../static/js/openvidu-browser-2.0.0.js | 700 ++++++++---------- .../static/js/openvidu-browser-2.0.0.min.js | 2 +- .../js/openvidu-browser-2.0.0.min.js.map | 2 +- openvidu-server/pom.xml | 2 +- .../src/angular/frontend/package.json | 2 +- .../resources/static/inline.bundle.js.map | 2 +- .../src/main/resources/static/main.bundle.js | 195 ++--- .../main/resources/static/main.bundle.js.map | 2 +- openvidu-testapp/package.json | 4 +- 10 files changed, 412 insertions(+), 599 deletions(-) diff --git a/openvidu-browser/package.json b/openvidu-browser/package.json index 6c51af84bb..d5cbe5c13e 100644 --- a/openvidu-browser/package.json +++ b/openvidu-browser/package.json @@ -1,52 +1,52 @@ { - "author": "OpenVidu", - "name": "openvidu-browser", - "description": "OpenVidu Browser", - "version": "1.9.0", - "main": "lib/index.js", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "git://github.com/OpenVidu/openvidu" - }, - "scripts": { - "browserify": "VERSION=${VERSION:-}; cd src && browserify Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v", - "browserify-prod": "VERSION=${VERSION:-}; cd src && browserify --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | uglifyjs --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js", - "test": "echo \"Error: no test specified\" && exit 1", - "build": "cd src/OpenVidu && tsc && cd ../.. && tsc --declaration src/index.ts --outDir ./lib --sourceMap --lib dom,es5,es2015.promise,scripthost", - "docs": "grunt --gruntfile config/typedoc/custom-theme/gruntfile.js && typedoc --options ./config/typedoc/typedoc.js --out ./docs ./src && rm -rf ../../openvidu.io/api/openvidu-browser/* && cp -R ./docs/. ../../openvidu.io/api/openvidu-browser" - }, - "types": "lib/index.d.ts", - "dependencies": { - "@types/platform": "^1.3.1", - "@types/node": "^9.6.7", - "freeice": "2.2.0", - "hark": "1.2.0", - "inherits": "2.0.3", - "merge": "1.2.0", - "platform": "^1.3.5", - "sdp-translator": "0.1.24", - "ua-parser-js": "0.7.17", - "uuid": "3.2.1", - "webrtc-adapter": "6.1.4", - "wolfy87-eventemitter": "5.2.4" - }, - "devDependencies": { - "browserify": "16.1.1", - "tsify": "4.0.0", - "tslint": "^5.9.1", - "typedoc": "^0.11.1", - "typedoc-plugin-sourcefile-url": "^1.0.3", - "typescript": "2.8.3", - "uglify-js": "3.3.20", - "grunt": "^1.0.1", - "grunt-autoprefixer": "^3.0.4", - "grunt-cli": "^1.2.0", - "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-sass": "^1.0.0", - "grunt-contrib-uglify": "^2.3.0", - "grunt-contrib-watch": "~1.0.0", - "grunt-string-replace": "^1.0.0", - "grunt-ts": "^5.5.1" - } + "author": "OpenVidu", + "dependencies": { + "@types/node": "^9.6.7", + "@types/platform": "^1.3.1", + "freeice": "2.2.0", + "hark": "1.2.0", + "inherits": "2.0.3", + "merge": "1.2.0", + "platform": "^1.3.5", + "sdp-translator": "0.1.24", + "ua-parser-js": "0.7.17", + "uuid": "3.2.1", + "webrtc-adapter": "6.1.4", + "wolfy87-eventemitter": "5.2.4" + }, + "description": "OpenVidu Browser", + "devDependencies": { + "browserify": "16.1.1", + "grunt": "^1.0.1", + "grunt-autoprefixer": "^3.0.4", + "grunt-cli": "^1.2.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-sass": "^1.0.0", + "grunt-contrib-uglify": "^2.3.0", + "grunt-contrib-watch": "~1.0.0", + "grunt-string-replace": "^1.0.0", + "grunt-ts": "^5.5.1", + "tsify": "4.0.0", + "tslint": "^5.9.1", + "typedoc": "^0.11.1", + "typedoc-plugin-sourcefile-url": "^1.0.3", + "typescript": "2.8.3", + "uglify-js": "3.3.20" + }, + "license": "Apache-2.0", + "main": "lib/index.js", + "name": "openvidu-browser", + "repository": { + "type": "git", + "url": "git://github.com/OpenVidu/openvidu" + }, + "scripts": { + "browserify": "VERSION=${VERSION:-}; cd src && browserify Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v", + "browserify-prod": "VERSION=${VERSION:-}; cd src && browserify --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | uglifyjs --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js", + "build": "cd src/OpenVidu && tsc && cd ../.. && tsc --declaration src/index.ts --outDir ./lib --sourceMap --lib dom,es5,es2015.promise,scripthost", + "docs": "grunt --gruntfile config/typedoc/custom-theme/gruntfile.js && typedoc --options ./config/typedoc/typedoc.js --out ./docs ./src && rm -rf ../../openvidu.io/api/openvidu-browser/* && cp -R ./docs/. ../../openvidu.io/api/openvidu-browser", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "types": "lib/index.d.ts", + "version": "2.0.0" } \ No newline at end of file diff --git a/openvidu-browser/static/js/openvidu-browser-2.0.0.js b/openvidu-browser/static/js/openvidu-browser-2.0.0.js index 0b6a478626..ce9f1e57fe 100644 --- a/openvidu-browser/static/js/openvidu-browser-2.0.0.js +++ b/openvidu-browser/static/js/openvidu-browser-2.0.0.js @@ -5757,7 +5757,7 @@ if (window) { },{"./OpenVidu/OpenVidu":29}],27:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var __1 = require(".."); +var Stream_1 = require("./Stream"); var Connection = (function () { function Connection(session, opts) { this.session = session; @@ -5807,7 +5807,7 @@ var Connection = (function () { recvVideo: opts.videoActive, typeOfVideo: opts.typeOfVideo }; - var stream = new __1.Stream(_this.session, streamOptions); + var stream = new Stream_1.Stream(_this.session, streamOptions); _this.addStream(stream); }); console.info("Remote 'Connection' with 'connectionId' [" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts); @@ -5829,7 +5829,7 @@ var Connection = (function () { }()); exports.Connection = Connection; -},{"..":60}],28:[function(require,module,exports){ +},{"./Stream":32}],28:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var LocalRecorderState_1 = require("../OpenViduInternal/Enums/LocalRecorderState"); @@ -5840,7 +5840,7 @@ var LocalRecorder = (function () { this.count = 0; this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection'; this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord'; - this.state = LocalRecorderState_1.LocalRecoderState.READY; + this.state = LocalRecorderState_1.LocalRecorderState.READY; } LocalRecorder.prototype.record = function () { var _this = this; @@ -5850,7 +5850,7 @@ var LocalRecorder = (function () { console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'); throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder')); } - if (_this.state !== LocalRecorderState_1.LocalRecoderState.READY) { + if (_this.state !== LocalRecorderState_1.LocalRecorderState.READY) { throw (Error('\'LocalRecord.record()\' needs \'LocalRecord.state\' to be \'READY\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.clean()\' or init a new LocalRecorder before')); } console.log("Starting local recording of stream '" + _this.stream.streamId + "' of connection '" + _this.connectionId + "'"); @@ -5898,7 +5898,7 @@ var LocalRecorder = (function () { _this.mediaRecorder.onwarning = function (e) { console.log('MediaRecorder warning: ' + e); }; - _this.state = LocalRecorderState_1.LocalRecoderState.RECORDING; + _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING; resolve(); }); }; @@ -5906,7 +5906,7 @@ var LocalRecorder = (function () { var _this = this; return new Promise(function (resolve, reject) { try { - if (_this.state === LocalRecorderState_1.LocalRecoderState.READY || _this.state === LocalRecorderState_1.LocalRecoderState.FINISHED) { + if (_this.state === LocalRecorderState_1.LocalRecorderState.READY || _this.state === LocalRecorderState_1.LocalRecorderState.FINISHED) { throw (Error('\'LocalRecord.stop()\' needs \'LocalRecord.state\' to be \'RECORDING\' or \'PAUSED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.start()\' before')); } _this.mediaRecorder.onstop = function () { @@ -5924,11 +5924,11 @@ var LocalRecorder = (function () { var _this = this; return new Promise(function (resolve, reject) { try { - if (_this.state !== LocalRecorderState_1.LocalRecoderState.RECORDING) { + if (_this.state !== LocalRecorderState_1.LocalRecorderState.RECORDING) { reject(Error('\'LocalRecord.pause()\' needs \'LocalRecord.state\' to be \'RECORDING\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.start()\' or \'LocalRecorder.resume()\' before')); } _this.mediaRecorder.pause(); - _this.state = LocalRecorderState_1.LocalRecoderState.PAUSED; + _this.state = LocalRecorderState_1.LocalRecorderState.PAUSED; } catch (error) { reject(error); @@ -5939,11 +5939,11 @@ var LocalRecorder = (function () { var _this = this; return new Promise(function (resolve, reject) { try { - if (_this.state !== LocalRecorderState_1.LocalRecoderState.PAUSED) { + if (_this.state !== LocalRecorderState_1.LocalRecorderState.PAUSED) { throw (Error('\'LocalRecord.resume()\' needs \'LocalRecord.state\' to be \'PAUSED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.pause()\' before')); } _this.mediaRecorder.resume(); - _this.state = LocalRecorderState_1.LocalRecoderState.RECORDING; + _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING; } catch (error) { reject(error); @@ -5951,7 +5951,7 @@ var LocalRecorder = (function () { }); }; LocalRecorder.prototype.preview = function (parentElement) { - if (this.state !== LocalRecorderState_1.LocalRecoderState.FINISHED) { + if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { throw (Error('\'LocalRecord.preview()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + this.state + '\'). Call \'LocalRecorder.stop()\' before')); } this.videoPreview = document.createElement('video'); @@ -5978,9 +5978,9 @@ var LocalRecorder = (function () { _this.chunks = []; _this.count = 0; delete _this.mediaRecorder; - _this.state = LocalRecorderState_1.LocalRecoderState.READY; + _this.state = LocalRecorderState_1.LocalRecorderState.READY; }; - if (this.state === LocalRecorderState_1.LocalRecoderState.RECORDING || this.state === LocalRecorderState_1.LocalRecoderState.PAUSED) { + if (this.state === LocalRecorderState_1.LocalRecorderState.RECORDING || this.state === LocalRecorderState_1.LocalRecorderState.PAUSED) { this.stop().then(function () { return f(); }).catch(function () { return f(); }); } else { @@ -5988,7 +5988,7 @@ var LocalRecorder = (function () { } }; LocalRecorder.prototype.download = function () { - if (this.state !== LocalRecorderState_1.LocalRecoderState.FINISHED) { + if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { throw (Error('\'LocalRecord.download()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + this.state + '\'). Call \'LocalRecorder.stop()\' before')); } else { @@ -6004,7 +6004,7 @@ var LocalRecorder = (function () { } }; LocalRecorder.prototype.getBlob = function () { - if (this.state !== LocalRecorderState_1.LocalRecoderState.FINISHED) { + if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { throw (Error('Call \'LocalRecord.stop()\' before getting Blob file')); } else { @@ -6014,7 +6014,7 @@ var LocalRecorder = (function () { LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) { var _this = this; return new Promise(function (resolve, reject) { - if (_this.state !== LocalRecorderState_1.LocalRecoderState.FINISHED) { + if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { reject(Error('\'LocalRecord.uploadAsBinary()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.stop()\' before')); } else { @@ -6043,7 +6043,7 @@ var LocalRecorder = (function () { LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) { var _this = this; return new Promise(function (resolve, reject) { - if (_this.state !== LocalRecorderState_1.LocalRecoderState.FINISHED) { + if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) { reject(Error('\'LocalRecord.uploadAsMultipartfile()\' needs \'LocalRecord.state\' to be \'FINISHED\' (current value: \'' + _this.state + '\'). Call \'LocalRecorder.stop()\' before')); } else { @@ -6076,7 +6076,7 @@ var LocalRecorder = (function () { this.blob = new Blob(this.chunks, { type: 'video/webm' }); this.chunks = []; this.videoPreviewSrc = window.URL.createObjectURL(this.blob); - this.state = LocalRecorderState_1.LocalRecoderState.FINISHED; + this.state = LocalRecorderState_1.LocalRecorderState.FINISHED; }; return LocalRecorder; }()); @@ -6085,16 +6085,15 @@ exports.LocalRecorder = LocalRecorder; },{"../OpenViduInternal/Enums/LocalRecorderState":34}],29:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var __1 = require(".."); +var LocalRecorder_1 = require("./LocalRecorder"); +var Publisher_1 = require("./Publisher"); +var Session_1 = require("./Session"); var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError"); var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode"); -var VersionAdapter_1 = require("../OpenViduInternal/VersionAdapter"); var RpcBuilder = require("../OpenViduInternal/KurentoUtils/kurento-jsonrpc"); var screenSharingAuto = require("../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto"); var screenSharing = require("../OpenViduInternal/ScreenSharing/Screen-Capturing"); var platform = require("platform"); -var SECRET_PARAM = '?secret='; -var RECORDER_PARAM = '&recorder='; var OpenVidu = (function () { function OpenVidu() { this.secret = ''; @@ -6102,19 +6101,18 @@ var OpenVidu = (function () { this.advancedConfiguration = {}; console.info("'OpenVidu' initialized"); } - OpenVidu.prototype.initSession = function (sessionId) { - this.session = new __1.Session(sessionId, this); + OpenVidu.prototype.initSession = function () { + this.session = new Session_1.Session(this); return this.session; }; OpenVidu.prototype.initPublisher = function (targetElement, param2, param3) { var properties; if (!!param2 && (typeof param2 !== 'function')) { properties = param2; - properties = VersionAdapter_1.adaptPublisherProperties(properties); properties = { audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined, frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined), - insertMode: (typeof properties.insertMode !== 'undefined') ? properties.insertMode : VideoInsertMode_1.VideoInsertMode.APPEND, + insertMode: (typeof properties.insertMode !== 'undefined') ? ((typeof properties.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[properties.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND, mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true, publishAudio: (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true, publishVideo: (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true, @@ -6131,7 +6129,7 @@ var OpenVidu = (function () { resolution: '640x480' }; } - var publisher = new __1.Publisher(targetElement, properties, this); + var publisher = new Publisher_1.Publisher(targetElement, properties, this); var completionHandler; if (!!param2 && (typeof param2 === 'function')) { completionHandler = param2; @@ -6174,7 +6172,7 @@ var OpenVidu = (function () { }); }; OpenVidu.prototype.initLocalRecorder = function (stream) { - return new __1.LocalRecorder(stream); + return new LocalRecorder_1.LocalRecorder(stream); }; OpenVidu.prototype.checkSystemRequirements = function () { var browser = platform.name; @@ -6244,76 +6242,6 @@ var OpenVidu = (function () { OpenVidu.prototype.setAdvancedConfiguration = function (configuration) { this.advancedConfiguration = configuration; }; - OpenVidu.prototype.disconnectCallback = function () { - console.warn('Websocket connection lost'); - if (this.isRoomAvailable()) { - this.session.onLostConnection(); - } - else { - alert('Connection error. Please reload page.'); - } - }; - OpenVidu.prototype.reconnectingCallback = function () { - console.warn('Websocket connection lost (reconnecting)'); - if (this.isRoomAvailable()) { - this.session.onLostConnection(); - } - else { - alert('Connection error. Please reload page.'); - } - }; - OpenVidu.prototype.reconnectedCallback = function () { - console.warn('Websocket reconnected'); - }; - OpenVidu.prototype.isRoomAvailable = function () { - if (this.session !== undefined && this.session instanceof __1.Session) { - return true; - } - else { - console.warn('Session instance not found'); - return false; - } - }; - OpenVidu.prototype.getSecretFromUrl = function (url) { - var secret = ''; - if (url.indexOf(SECRET_PARAM) !== -1) { - var endOfSecret = url.lastIndexOf(RECORDER_PARAM); - if (endOfSecret !== -1) { - secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, endOfSecret); - } - else { - secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, url.length); - } - } - return secret; - }; - OpenVidu.prototype.getRecorderFromUrl = function (url) { - var recorder = ''; - if (url.indexOf(RECORDER_PARAM) !== -1) { - recorder = url.substring(url.lastIndexOf(RECORDER_PARAM) + RECORDER_PARAM.length, url.length); - } - return Boolean(recorder).valueOf(); - }; - OpenVidu.prototype.getFinalWsUrl = function (url) { - url = this.getUrlWithoutSecret(url).substring(0, url.lastIndexOf('/')) + '/room'; - if (url.indexOf('.ngrok.io') !== -1) { - url = url.replace('ws://', 'wss://'); - var regex = /\.ngrok\.io:\d+/; - url = url.replace(regex, '.ngrok.io'); - } - else if ((url.indexOf('localhost') !== -1) || (url.indexOf('127.0.0.1') !== -1)) { - } - return url; - }; - OpenVidu.prototype.getUrlWithoutSecret = function (url) { - if (!url) { - console.error('sessionId is not defined'); - } - if (url.indexOf(SECRET_PARAM) !== -1) { - url = url.substring(0, url.lastIndexOf(SECRET_PARAM)); - } - return url; - }; OpenVidu.prototype.generateMediaConstraints = function (publisherProperties) { var _this = this; return new Promise(function (resolve, reject) { @@ -6360,60 +6288,67 @@ var OpenVidu = (function () { } if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') { if (publisherProperties.videoSource === 'screen') { - if (!!_this.advancedConfiguration.screenShareChromeExtension) { - var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim(); - screenSharing.getChromeExtensionStatus(extensionId, function (status) { - if (status === 'installed-enabled') { - screenSharing.getScreenConstraints(function (error, screenConstraints) { - if (!!error && error === 'permission-denied') { - var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); - console.error(error_1); - reject(error_1); - } - else { - mediaConstraints.video = screenConstraints; - resolve(mediaConstraints); - } - }); - } - if (status === 'installed-disabled') { - var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); - console.error(error); - reject(error); - } - if (status === 'not-installed') { - var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension); - console.error(error); - reject(error); - } - }); + if (platform.name !== 'Chrome' && platform.name !== 'Firefox') { + var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform.name); + console.error(error); + reject(error); } else { - screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) { - if (!!error) { - if (error === 'not-installed') { - var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk'); - console.error(error_2); - reject(error_2); + if (!!_this.advancedConfiguration.screenShareChromeExtension) { + var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim(); + screenSharing.getChromeExtensionStatus(extensionId, function (status) { + if (status === 'installed-enabled') { + screenSharing.getScreenConstraints(function (error, screenConstraints) { + if (!!error && error === 'permission-denied') { + var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); + console.error(error_1); + reject(error_1); + } + else { + mediaConstraints.video = screenConstraints; + resolve(mediaConstraints); + } + }); } - else if (error === 'installed-disabled') { - var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); - console.error(error_3); - reject(error_3); + if (status === 'installed-disabled') { + var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); + console.error(error); + reject(error); } - else if (error === 'permission-denied') { - var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); - console.error(error_4); - reject(error_4); + if (status === 'not-installed') { + var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension); + console.error(error); + reject(error); } - } - else { - mediaConstraints.video = screenConstraints.video; - resolve(mediaConstraints); - } - }); + }); + } + else { + screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) { + if (!!error) { + if (error === 'not-installed') { + var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk'); + console.error(error_2); + reject(error_2); + } + else if (error === 'installed-disabled') { + var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension'); + console.error(error_3); + reject(error_3); + } + else if (error === 'permission-denied') { + var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop'); + console.error(error_4); + reject(error_4); + } + } + else { + mediaConstraints.video = screenConstraints.video; + resolve(mediaConstraints); + } + }); + } + publisherProperties.videoSource = 'screen'; } - publisherProperties.videoSource = 'screen'; } else { mediaConstraints.video['deviceId'] = { exact: publisherProperties.videoSource }; @@ -6460,17 +6395,6 @@ var OpenVidu = (function () { OpenVidu.prototype.closeWs = function () { this.jsonRpcClient.close(); }; - OpenVidu.prototype.processOpenViduUrl = function (url) { - var secret = this.getSecretFromUrl(url); - var recorder = this.getRecorderFromUrl(url); - if (!!secret) { - this.secret = secret; - } - if (!!recorder) { - this.recorder = recorder; - } - this.wsUri = this.getFinalWsUrl(url); - }; OpenVidu.prototype.sendRequest = function (method, params, callback) { if (params && params instanceof Function) { callback = params; @@ -6498,14 +6422,44 @@ var OpenVidu = (function () { OpenVidu.prototype.getRecorder = function () { return this.recorder; }; + OpenVidu.prototype.disconnectCallback = function () { + console.warn('Websocket connection lost'); + if (this.isRoomAvailable()) { + this.session.onLostConnection(); + } + else { + alert('Connection error. Please reload page.'); + } + }; + OpenVidu.prototype.reconnectingCallback = function () { + console.warn('Websocket connection lost (reconnecting)'); + if (this.isRoomAvailable()) { + this.session.onLostConnection(); + } + else { + alert('Connection error. Please reload page.'); + } + }; + OpenVidu.prototype.reconnectedCallback = function () { + console.warn('Websocket reconnected'); + }; + OpenVidu.prototype.isRoomAvailable = function () { + if (this.session !== undefined && this.session instanceof Session_1.Session) { + return true; + } + else { + console.warn('Session instance not found'); + return false; + } + }; return OpenVidu; }()); exports.OpenVidu = OpenVidu; -},{"..":60,"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/KurentoUtils/kurento-jsonrpc":50,"../OpenViduInternal/ScreenSharing/Screen-Capturing":57,"../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto":56,"../OpenViduInternal/VersionAdapter":58,"platform":9}],30:[function(require,module,exports){ +},{"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/KurentoUtils/kurento-jsonrpc":50,"../OpenViduInternal/ScreenSharing/Screen-Capturing":57,"../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto":56,"./LocalRecorder":28,"./Publisher":30,"./Session":31,"platform":9}],30:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var __1 = require(".."); +var Stream_1 = require("./Stream"); var StreamEvent_1 = require("../OpenViduInternal/Events/StreamEvent"); var VideoElementEvent_1 = require("../OpenViduInternal/Events/VideoElementEvent"); var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError"); @@ -6517,7 +6471,7 @@ var Publisher = (function () { this.accessAllowed = false; this.ee = new EventEmitter(); this.properties = properties; - this.stream = new __1.Stream(this.session, { publisherProperties: properties, mediaConstraints: {} }); + this.stream = new Stream_1.Stream(this.session, { publisherProperties: properties, mediaConstraints: {} }); this.stream.on('video-removed', function (element) { _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementDestroyed')]); }); @@ -6707,39 +6661,6 @@ var Publisher = (function () { } return this; }; - Publisher.prototype.userMediaHasVideo = function (callback) { - var _this = this; - return new Promise(function (resolve, reject) { - if ((typeof _this.properties.videoSource === 'string') && _this.properties.videoSource === 'screen') { - resolve(true); - } - else { - _this.openvidu.getDevices() - .then(function (devices) { - resolve(!!(devices.filter(function (device) { - return device.kind === 'videoinput'; - })[0])); - }) - .catch(function (error) { - reject(error); - }); - } - }); - }; - Publisher.prototype.userMediaHasAudio = function (callback) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.openvidu.getDevices() - .then(function (devices) { - resolve(!!(devices.filter(function (device) { - return device.kind === 'audioinput'; - })[0])); - }) - .catch(function (error) { - reject(error); - }); - }); - }; Publisher.prototype.initialize = function () { var _this = this; return new Promise(function (resolve, reject) { @@ -6777,7 +6698,7 @@ var Publisher = (function () { }; _this.stream.setOutboundStreamOptions(outboundStreamOptions); var constraintsAux = {}; - var timeForDialogEvent = 1000; + var timeForDialogEvent = 1250; if (_this.stream.isSendVideo()) { constraintsAux.audio = false; constraintsAux.video = constraints.video; @@ -6920,37 +6841,69 @@ var Publisher = (function () { this.ee.emitEvent('accessDialogClosed', []); } }; + Publisher.prototype.userMediaHasVideo = function (callback) { + var _this = this; + return new Promise(function (resolve, reject) { + if ((typeof _this.properties.videoSource === 'string') && _this.properties.videoSource === 'screen') { + resolve(true); + } + else { + _this.openvidu.getDevices() + .then(function (devices) { + resolve(!!(devices.filter(function (device) { + return device.kind === 'videoinput'; + })[0])); + }) + .catch(function (error) { + reject(error); + }); + } + }); + }; + Publisher.prototype.userMediaHasAudio = function (callback) { + var _this = this; + return new Promise(function (resolve, reject) { + _this.openvidu.getDevices() + .then(function (devices) { + resolve(!!(devices.filter(function (device) { + return device.kind === 'audioinput'; + })[0])); + }) + .catch(function (error) { + reject(error); + }); + }); + }; return Publisher; }()); exports.Publisher = Publisher; -},{"..":60,"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Events/StreamEvent":43,"../OpenViduInternal/Events/VideoElementEvent":44,"wolfy87-eventemitter":25}],31:[function(require,module,exports){ +},{"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Events/StreamEvent":43,"../OpenViduInternal/Events/VideoElementEvent":44,"./Stream":32,"wolfy87-eventemitter":25}],31:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var __1 = require(".."); -var StreamEvent_1 = require("../OpenViduInternal/Events/StreamEvent"); +var Connection_1 = require("./Connection"); +var Subscriber_1 = require("./Subscriber"); var ConnectionEvent_1 = require("../OpenViduInternal/Events/ConnectionEvent"); +var RecordingEvent_1 = require("../OpenViduInternal/Events/RecordingEvent"); var SessionDisconnectedEvent_1 = require("../OpenViduInternal/Events/SessionDisconnectedEvent"); var SignalEvent_1 = require("../OpenViduInternal/Events/SignalEvent"); -var RecordingEvent_1 = require("../OpenViduInternal/Events/RecordingEvent"); +var StreamEvent_1 = require("../OpenViduInternal/Events/StreamEvent"); var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError"); var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode"); -var VersionAdapter_1 = require("../OpenViduInternal/VersionAdapter"); var platform = require("platform"); var EventEmitter = require("wolfy87-eventemitter"); var Session = (function () { - function Session(sessionId, openvidu) { - this.ee = new EventEmitter(); + function Session(openvidu) { this.remoteStreamsCreated = {}; this.remoteConnections = {}; this.speakingEventsEnabled = false; + this.ee = new EventEmitter(); this.openvidu = openvidu; - this.sessionId = this.openvidu.getUrlWithoutSecret(sessionId); - this.openvidu.processOpenViduUrl(sessionId); } - Session.prototype.connect = function (token, metadata, param3) { + Session.prototype.connect = function (token, metadata) { var _this = this; - return VersionAdapter_1.solveIfCallback('Session.connect', (!!param3 && (typeof param3 === 'function')) ? param3 : ((typeof metadata === 'function') ? metadata : ''), new Promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { + _this.processToken(token); if (_this.openvidu.checkSystemRequirements()) { _this.options = { sessionId: _this.sessionId, @@ -6966,7 +6919,7 @@ var Session = (function () { else { reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu')); } - })); + }); }; Session.prototype.disconnect = function () { this.leave(false, 'disconnect'); @@ -6975,7 +6928,7 @@ var Session = (function () { var properties = {}; if (!!param3 && typeof param3 !== 'function') { properties = { - insertMode: (typeof param3.insertMode !== 'undefined') ? param3.insertMode : VideoInsertMode_1.VideoInsertMode.APPEND, + insertMode: (typeof param3.insertMode !== 'undefined') ? ((typeof param3.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[param3.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND, subscribeToAudio: (typeof param3.subscribeToAudio !== 'undefined') ? param3.subscribeToAudio : true, subscribeToVideo: (typeof param3.subscribeToVideo !== 'undefined') ? param3.subscribeToVideo : true }; @@ -7007,7 +6960,7 @@ var Session = (function () { completionHandler(error); } }); - var subscriber = new __1.Subscriber(stream, targetElement, properties); + var subscriber = new Subscriber_1.Subscriber(stream, targetElement, properties); stream.insertVideo(subscriber.element, properties.insertMode); return subscriber; }; @@ -7196,89 +7149,6 @@ var Session = (function () { } return this; }; - Session.prototype.connectAux = function (token) { - var _this = this; - return new Promise(function (resolve, reject) { - _this.openvidu.startWs(function (error) { - if (!!error) { - reject(error); - } - else { - var joinParams = { - token: (!!token) ? token : '', - session: _this.sessionId, - metadata: !!_this.options.metadata ? _this.options.metadata : '', - secret: _this.openvidu.getSecret(), - recorder: _this.openvidu.getRecorder(), - }; - _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) { - _this.connection = new __1.Connection(_this); - _this.connection.connectionId = response.id; - _this.connection.data = response.metadata; - var events = { - connections: new Array(), - streams: new Array() - }; - var existingParticipants = response.value; - existingParticipants.forEach(function (participant) { - var connection = new __1.Connection(_this, participant); - _this.remoteConnections[connection.connectionId] = connection; - events.connections.push(connection); - if (!!connection.stream) { - _this.remoteStreamsCreated[connection.stream.streamId] = true; - events.streams.push(connection.stream); - } - }); - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]); - events.connections.forEach(function (connection) { - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); - }); - events.streams.forEach(function (stream) { - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]); - }); - resolve(); - }); - } - }); - }); - }; - Session.prototype.stringClientMetadata = function (metadata) { - if (typeof metadata !== 'string') { - return JSON.stringify(metadata); - } - else { - return metadata; - } - }; - Session.prototype.getConnection = function (connectionId, errorMessage) { - var _this = this; - return new Promise(function (resolve, reject) { - var connection = _this.remoteConnections[connectionId]; - if (!!connection) { - resolve(connection); - } - else { - if (_this.connection.connectionId === connectionId) { - resolve(_this.connection); - } - else { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); - } - } - }); - }; - Session.prototype.getRemoteConnection = function (connectionId, errorMessage) { - var _this = this; - return new Promise(function (resolve, reject) { - var connection = _this.remoteConnections[connectionId]; - if (!!connection) { - resolve(connection); - } - else { - reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); - } - }); - }; Session.prototype.onParticipantJoined = function (response) { var _this = this; this.getConnection(response.id, '') @@ -7286,7 +7156,7 @@ var Session = (function () { console.warn('Connection ' + response.id + ' already exists in connections list'); }) .catch(function (openViduError) { - var connection = new __1.Connection(_this, response); + var connection = new Connection_1.Connection(_this, response); _this.remoteConnections[response.id] = connection; _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); }); @@ -7330,7 +7200,7 @@ var Session = (function () { afterConnectionFound(connection); }) .catch(function (openViduError) { - connection = new __1.Connection(_this, response); + connection = new Connection_1.Connection(_this, response); afterConnectionFound(connection); }); }; @@ -7400,7 +7270,7 @@ var Session = (function () { Session.prototype.onLostConnection = function () { if (!this.connection) { console.warn('Not connected to session: if you are not debugging, this is probably a certificate error'); - var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/room')[0]; + var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0]; if (window.confirm('If you are not debugging, this is probably a certificate error at \"' + url + '\"\n\nClick OK to navigate and accept it')) { location.assign(url + '/accept-certificate'); } @@ -7436,32 +7306,138 @@ var Session = (function () { var _this = this; forced = !!forced; console.info('Leaving Session (forced=' + forced + ')'); - if (!!this.connection && !this.connection.disposed && !forced) { - this.openvidu.sendRequest('leaveRoom', function (error, response) { - if (error) { - console.error(error); + if (!!this.connection) { + if (!this.connection.disposed && !forced) { + this.openvidu.sendRequest('leaveRoom', function (error, response) { + if (error) { + console.error(error); + } + _this.openvidu.closeWs(); + }); + } + else { + this.openvidu.closeWs(); + } + if (!!this.connection.stream) { + this.connection.stream.disposeWebRtcPeer(); + this.connection.stream.emitEvent('stream-destroyed-by-disconnect', [reason]); + } + if (!this.connection.disposed) { + var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason); + this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]); + sessionDisconnectEvent.callDefaultBehaviour(); + } + } + else { + console.warn('You were not connected to the session ' + this.sessionId); + } + }; + Session.prototype.connectAux = function (token) { + var _this = this; + return new Promise(function (resolve, reject) { + _this.openvidu.startWs(function (error) { + if (!!error) { + reject(error); + } + else { + var joinParams = { + token: (!!token) ? token : '', + session: _this.sessionId, + metadata: !!_this.options.metadata ? _this.options.metadata : '', + secret: _this.openvidu.getSecret(), + recorder: _this.openvidu.getRecorder(), + }; + _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) { + if (!!error) { + reject(error); + } + else { + _this.connection = new Connection_1.Connection(_this); + _this.connection.connectionId = response.id; + _this.connection.data = response.metadata; + var events_1 = { + connections: new Array(), + streams: new Array() + }; + var existingParticipants = response.value; + existingParticipants.forEach(function (participant) { + var connection = new Connection_1.Connection(_this, participant); + _this.remoteConnections[connection.connectionId] = connection; + events_1.connections.push(connection); + if (!!connection.stream) { + _this.remoteStreamsCreated[connection.stream.streamId] = true; + events_1.streams.push(connection.stream); + } + }); + _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]); + events_1.connections.forEach(function (connection) { + _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); + }); + events_1.streams.forEach(function (stream) { + _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]); + }); + resolve(); + } + }); } - _this.openvidu.closeWs(); }); + }); + }; + Session.prototype.stringClientMetadata = function (metadata) { + if (typeof metadata !== 'string') { + return JSON.stringify(metadata); } else { - this.openvidu.closeWs(); + return metadata; } - if (!!this.connection.stream) { - this.connection.stream.disposeWebRtcPeer(); - this.connection.stream.emitEvent('stream-destroyed-by-disconnect', [reason]); + }; + Session.prototype.getConnection = function (connectionId, errorMessage) { + var _this = this; + return new Promise(function (resolve, reject) { + var connection = _this.remoteConnections[connectionId]; + if (!!connection) { + resolve(connection); + } + else { + if (_this.connection.connectionId === connectionId) { + resolve(_this.connection); + } + else { + reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); + } + } + }); + }; + Session.prototype.getRemoteConnection = function (connectionId, errorMessage) { + var _this = this; + return new Promise(function (resolve, reject) { + var connection = _this.remoteConnections[connectionId]; + if (!!connection) { + resolve(connection); + } + else { + reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage)); + } + }); + }; + Session.prototype.processToken = function (token) { + var url = new URL(token); + this.sessionId = url.searchParams.get('sessionId'); + var secret = url.searchParams.get('secret'); + var recorder = url.searchParams.get('recorder'); + if (!!secret) { + this.openvidu.secret = secret; } - if (!this.connection.disposed) { - var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason); - this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]); - sessionDisconnectEvent.callDefaultBehaviour(); + if (!!recorder) { + this.openvidu.recorder = true; } + this.openvidu.wsUri = 'wss://' + url.host + '/openvidu'; }; return Session; }()); exports.Session = Session; -},{"..":60,"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/ConnectionEvent":37,"../OpenViduInternal/Events/RecordingEvent":40,"../OpenViduInternal/Events/SessionDisconnectedEvent":41,"../OpenViduInternal/Events/SignalEvent":42,"../OpenViduInternal/Events/StreamEvent":43,"../OpenViduInternal/VersionAdapter":58,"platform":9,"wolfy87-eventemitter":25}],32:[function(require,module,exports){ +},{"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/ConnectionEvent":37,"../OpenViduInternal/Events/RecordingEvent":40,"../OpenViduInternal/Events/SessionDisconnectedEvent":41,"../OpenViduInternal/Events/SignalEvent":42,"../OpenViduInternal/Events/StreamEvent":43,"./Connection":27,"./Subscriber":33,"platform":9,"wolfy87-eventemitter":25}],32:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var WebRtcStats_1 = require("../OpenViduInternal/WebRtcStats/WebRtcStats"); @@ -7628,8 +7604,8 @@ var Stream = (function () { } this.targetElement = targetElement; this.parentId = targetElement.id; - insertMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND; - this.insertElementWithMode(this.video, insertMode); + var insMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND; + this.insertElementWithMode(this.video, insMode); this.ee.emitEvent('video-element-created-by-stream', [{ element: this.video }]); @@ -7893,7 +7869,7 @@ var Stream = (function () { }()); exports.Stream = Stream; -},{"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/PublisherSpeakingEvent":39,"../OpenViduInternal/KurentoUtils/kurento-utils-js":55,"../OpenViduInternal/WebRtcStats/WebRtcStats":59,"wolfy87-eventemitter":25}],33:[function(require,module,exports){ +},{"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/PublisherSpeakingEvent":39,"../OpenViduInternal/KurentoUtils/kurento-utils-js":55,"../OpenViduInternal/WebRtcStats/WebRtcStats":58,"wolfy87-eventemitter":25}],33:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var VideoElementEvent_1 = require("../OpenViduInternal/Events/VideoElementEvent"); @@ -8021,13 +7997,13 @@ exports.Subscriber = Subscriber; },{"../OpenViduInternal/Events/VideoElementEvent":44,"wolfy87-eventemitter":25}],34:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var LocalRecoderState; -(function (LocalRecoderState) { - LocalRecoderState["READY"] = "READY"; - LocalRecoderState["RECORDING"] = "RECORDING"; - LocalRecoderState["PAUSED"] = "PAUSED"; - LocalRecoderState["FINISHED"] = "FINISHED"; -})(LocalRecoderState = exports.LocalRecoderState || (exports.LocalRecoderState = {})); +var LocalRecorderState; +(function (LocalRecorderState) { + LocalRecorderState["READY"] = "READY"; + LocalRecorderState["RECORDING"] = "RECORDING"; + LocalRecorderState["PAUSED"] = "PAUSED"; + LocalRecorderState["FINISHED"] = "FINISHED"; +})(LocalRecorderState = exports.LocalRecorderState || (exports.LocalRecorderState = {})); },{}],35:[function(require,module,exports){ "use strict"; @@ -8256,7 +8232,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var Event_1 = require("./Event"); -var __1 = require("../.."); +var Publisher_1 = require("../../OpenVidu/Publisher"); +var Session_1 = require("../../OpenVidu/Session"); var StreamEvent = (function (_super) { __extends(StreamEvent, _super); function StreamEvent(cancelable, target, type, stream, reason) { @@ -8267,13 +8244,13 @@ var StreamEvent = (function (_super) { } StreamEvent.prototype.callDefaultBehaviour = function () { if (this.type === 'streamDestroyed') { - if (this.target instanceof __1.Session) { + if (this.target instanceof Session_1.Session) { console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Session'"); this.stream.disposeWebRtcPeer(); this.stream.disposeMediaStream(); this.stream.removeVideo(); } - else if (this.target instanceof __1.Publisher) { + else if (this.target instanceof Publisher_1.Publisher) { console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Publisher'"); this.stream.disposeMediaStream(); this.stream.removeVideo(); @@ -8295,7 +8272,7 @@ var StreamEvent = (function (_super) { }(Event_1.Event)); exports.StreamEvent = StreamEvent; -},{"../..":60,"./Event":38}],44:[function(require,module,exports){ +},{"../../OpenVidu/Publisher":30,"../../OpenVidu/Session":31,"./Event":38}],44:[function(require,module,exports){ "use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || @@ -10023,61 +10000,6 @@ exports.getSourceId = getSourceId; },{}],58:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var VideoInsertMode_1 = require("./Enums/VideoInsertMode"); -function solveIfCallback(methodName, completionHandler, promise) { - console.warn("DEPRECATION WANING: In future releases the 'completionHandler' parameter will be removed from method '" + methodName + "'. Please, refactor your callbacks to Promise API"); - return new Promise(function (resolve, reject) { - if (!!completionHandler && typeof completionHandler === 'function') { - promise.then(function () { - completionHandler(undefined); - }).catch(function (error) { - completionHandler(error); - }); - } - else { - promise.then(function () { - return resolve(); - }).catch(function (error) { - return reject(error); - }); - } - }); -} -exports.solveIfCallback = solveIfCallback; -function adaptPublisherProperties(properties) { - console.warn("DEPRECATION WANING: In future releases the properties passed to 'OpenVidu.initPublisher' method must match PublisherProperties interface"); - var scr = (typeof properties.screen !== 'undefined' && properties.screen === true); - var res = ''; - if (typeof properties.quality === 'string') { - switch (properties.quality) { - case 'LOW': - res = '320x240'; - break; - case 'MEDIUM': - res = '640x480'; - break; - case 'HIGH': - res = '1280x720'; - break; - } - } - var publisherProperties = { - audioSource: (typeof properties.audio !== 'undefined' && properties.audio === false) ? false : ((typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined), - frameRate: (typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined, - insertMode: (typeof properties.insertMode !== 'undefined') ? properties.insertMode : VideoInsertMode_1.VideoInsertMode.APPEND, - mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true, - publishAudio: (typeof properties.audioActive !== 'undefined' && properties.audioActive === false) ? false : (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true, - publishVideo: (typeof properties.videoActive !== 'undefined' && properties.videoActive === false) ? false : (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true, - resolution: !!res ? res : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'), - videoSource: scr ? 'screen' : ((typeof properties.video !== 'undefined' && properties.video === false) ? false : ((typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined)) - }; - return publisherProperties; -} -exports.adaptPublisherProperties = adaptPublisherProperties; - -},{"./Enums/VideoInsertMode":36}],59:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); var platform = require("platform"); var WebRtcStats = (function () { function WebRtcStats(stream) { @@ -10347,23 +10269,5 @@ var WebRtcStats = (function () { }()); exports.WebRtcStats = WebRtcStats; -},{"platform":9}],60:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var OpenVidu_1 = require("./OpenVidu/OpenVidu"); -exports.OpenVidu = OpenVidu_1.OpenVidu; -var Session_1 = require("./OpenVidu/Session"); -exports.Session = Session_1.Session; -var Publisher_1 = require("./OpenVidu/Publisher"); -exports.Publisher = Publisher_1.Publisher; -var Subscriber_1 = require("./OpenVidu/Subscriber"); -exports.Subscriber = Subscriber_1.Subscriber; -var Stream_1 = require("./OpenVidu/Stream"); -exports.Stream = Stream_1.Stream; -var Connection_1 = require("./OpenVidu/Connection"); -exports.Connection = Connection_1.Connection; -var LocalRecorder_1 = require("./OpenVidu/LocalRecorder"); -exports.LocalRecorder = LocalRecorder_1.LocalRecorder; - -},{"./OpenVidu/Connection":27,"./OpenVidu/LocalRecorder":28,"./OpenVidu/OpenVidu":29,"./OpenVidu/Publisher":30,"./OpenVidu/Session":31,"./OpenVidu/Stream":32,"./OpenVidu/Subscriber":33}]},{},[26]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIuLi9ub2RlX21vZHVsZXMvZXZlbnRzL2V2ZW50cy5qcyIsIi4uL25vZGVfbW9kdWxlcy9mcmVlaWNlL2luZGV4LmpzIiwiLi4vbm9kZV9tb2R1bGVzL2ZyZWVpY2Uvc3R1bi5qc29uIiwiLi4vbm9kZV9tb2R1bGVzL2ZyZWVpY2UvdHVybi5qc29uIiwiLi4vbm9kZV9tb2R1bGVzL2hhcmsvaGFyay5qcyIsIi4uL25vZGVfbW9kdWxlcy9pbmhlcml0cy9pbmhlcml0c19icm93c2VyLmpzIiwiLi4vbm9kZV9tb2R1bGVzL21lcmdlL21lcmdlLmpzIiwiLi4vbm9kZV9tb2R1bGVzL25vcm1hbGljZS9pbmRleC5qcyIsIi4uL25vZGVfbW9kdWxlcy9wbGF0Zm9ybS9wbGF0Zm9ybS5qcyIsIi4uL25vZGVfbW9kdWx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tZScpICsgJyAnICsgZGF0YS5nZXRQcm9wZXJ0eSgnb3MudmVyc2lvbicpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyaGlubykge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICB2ZXJzaW9uID0gY29udGV4dC5yZXF1aXJlKCdyaW5nby9lbmdpbmUnKS52ZXJzaW9uLmpvaW4oJy4nKTtcbiAgICAgICAgICAgIG5hbWUgPSAnUmluZ29KUyc7XG4gICAgICAgICAgfSBjYXRjaChlKSB7XG4gICAgICAgICAgICBpZiAoKGRhdGEgPSBjb250ZXh0LnN5c3RlbSkgJiYgZGF0YS5nbG9iYWwuc3lzdGVtID09IGNvbnRleHQuc3lzdGVtKSB7XG4gICAgICAgICAgICAgIG5hbWUgPSAnTmFyd2hhbCc7XG4gICAgICAgICAgICAgIG9zIHx8IChvcyA9IGRhdGFbMF0ub3MgfHwgbnVsbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghbmFtZSkge1xuICAgICAgICAgICAgbmFtZSA9ICdSaGlubyc7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKFxuICAgICAgICAgIHR5cGVvZiBjb250ZXh0LnByb2Nlc3MgPT0gJ29iamVjdCcgJiYgIWNvbnRleHQucHJvY2Vzcy5icm93c2VyICYmXG4gICAgICAgICAgKGRhdGEgPSBjb250ZXh0LnByb2Nlc3MpXG4gICAgICAgICkge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YS52ZXJzaW9ucyA9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBkYXRhLnZlcnNpb25zLmVsZWN0cm9uID09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIGRlc2NyaXB0aW9uLnB1c2goJ05vZGUgJyArIGRhdGEudmVyc2lvbnMubm9kZSk7XG4gICAgICAgICAgICAgIG5hbWUgPSAnRWxlY3Ryb24nO1xuICAgICAgICAgICAgICB2ZXJzaW9uID0gZGF0YS52ZXJzaW9ucy5lbGVjdHJvbjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGRhdGEudmVyc2lvbnMubncgPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgZGVzY3JpcHRpb24ucHVzaCgnQ2hyb21pdW0gJyArIHZlcnNpb24sICdOb2RlICcgKyBkYXRhLnZlcnNpb25zLm5vZGUpO1xuICAgICAgICAgICAgICBuYW1lID0gJ05XLmpzJztcbiAgICAgICAgICAgICAgdmVyc2lvbiA9IGRhdGEudmVyc2lvbnMubnc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghbmFtZSkge1xuICAgICAgICAgICAgbmFtZSA9ICdOb2RlLmpzJztcbiAgICAgICAgICAgIGFyY2ggPSBkYXRhLmFyY2g7XG4gICAgICAgICAgICBvcyA9IGRhdGEucGxhdGZvcm07XG4gICAgICAgICAgICB2ZXJzaW9uID0gL1tcXGQuXSsvLmV4ZWMoZGF0YS52ZXJzaW9uKTtcbiAgICAgICAgICAgIHZlcnNpb24gPSB2ZXJzaW9uID8gdmVyc2lvblswXSA6IG51bGw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICAvLyBEZXRlY3QgQWRvYmUgQUlSLlxuICAgICAgZWxzZSBpZiAoZ2V0Q2xhc3NPZigoZGF0YSA9IGNvbnRleHQucnVudGltZSkpID09IGFpclJ1bnRpbWVDbGFzcykge1xuICAgICAgICBuYW1lID0gJ0Fkb2JlIEFJUic7XG4gICAgICAgIG9zID0gZGF0YS5mbGFzaC5zeXN0ZW0uQ2FwYWJpbGl0aWVzLm9zO1xuICAgICAgfVxuICAgICAgLy8gRGV0ZWN0IFBoYW50b21KUy5cbiAgICAgIGVsc2UgaWYgKGdldENsYXNzT2YoKGRhdGEgPSBjb250ZXh0LnBoYW50b20pKSA9PSBwaGFudG9tQ2xhc3MpIHtcbiAgICAgICA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EucHVzaCh1TGluZSk7XG4gICAgICAgICAgICB0eXBlcy5wdXNoKHVMaW5lLm1pZCk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBBZGQgc291cmNlcyB0byB0aGUgY2hhbm5lbCBhbmQgaGFuZGxlIGE9bXNpZC5cbiAgICAgICAgaWYgKHR5cGVvZiB1TGluZS5zb3VyY2VzID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgT2JqZWN0LmtleXModUxpbmUuc291cmNlcykuZm9yRWFjaChmdW5jdGlvbihzc3JjKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0eXBlMmJsW3VMaW5lLnR5cGVdLnNvdXJjZXMgIT09ICdvYmplY3QnKVxuICAgICAgICAgICAgICAgICAgICB0eXBlMmJsW3VMaW5lLnR5cGVdLnNvdXJjZXMgPSB7fTtcblxuICAgICAgICAgICAgICAgIC8vIEFzc2lnbiB0aGUgc291cmNlcyB0byB0aGUgY2hhbm5lbC5cbiAgICAgICAgICAgICAgICB0eXBlMmJsW3VMaW5lLnR5cGVdLnNvdXJjZXNbc3NyY10gPVxuICAgICAgICAgICAgICAgICAgICB1TGluZS5zb3VyY2VzW3NzcmNdO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB1TGluZS5tc2lkICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgICAvLyBJbiBQbGFuIEIgdGhlIG1zaWQgaXMgYW4gU1NSQyBhdHRyaWJ1dGUuIEFsc28sIHdlIGRvbid0XG4gICAgICAgICAgICAgICAgICAgIC8vIGNhcmUgYWJvdXQgdGhlIG9ic29sZXRlIGxhYmVsIGFuZCBtc2xhYmVsIGF0dHJpYnV0ZXMuXG4gICAgICAgICAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAgICAgICAgIC8vIE5vdGUgdGhhdCBpdCBpcyBub3QgZ3VhcmFudGVlZCB0aGF0IHRoZSB1TGluZSB3aWxsXG4gICAgICAgICAgICAgICAgICAgIC8vIGhhdmUgYW4gbXNpZC4gcmVjdm9ubHkgY2hhbm5lbHMgaW4gcGFydGljdWxhciBkb24ndCBoYXZlXG4gICAgICAgICAgICAgICAgICAgIC8vIG9uZS5cbiAgICAgICAgICAgICAgICAgICAgdHlwZTJibFt1TGluZS50eXBlXS5zb3VyY2VzW3NzcmNdLm1zaWQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgdUxpbmUubXNpZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gTk9URSBzc3JjcyBpbiBzc3JjIGdyb3VwcyB3aWxsIHNoYXJlIG1zaWRzLCBhc1xuICAgICAgICAgICAgICAgIC8vIGRyYWZ0LXViZXJ0aS1ydGN3ZWItcGxhbi0wMCBtYW5kYXRlcy5cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQWRkIHNzcmMgZ3JvdXBzIHRvIHRoZSBjaGFubmVsLlxuICAgICAgICBpZiAodHlwZW9mIHVMaW5lLnNzcmNHcm91cHMgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheSh1TGluZS5zc3JjR3JvdXBzKSkge1xuXG4gICAgICAgICAgICAvLyBDcmVhdGUgdGhlIHNzcmNHcm91cHMgYXJyYXksIGlmIGl0J3Mgbm90IGRlZmluZWQuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHR5cGUyYmxbdUxpbmUudHlwZV0uc3NyY0dyb3VwcyA9PT0gJ3VuZGVmaW5lZCcgfHxcbiAgICAgICAgICAgICAgICAgICAgIUFycmF5LmlzQXJyYXkodHlwZTJibFt1TGluZS50eXBlXS5zc3JjR3JvdXBzKSkge1xuICAgICAgICAgICAgICAgIHR5cGUyYmxbdUxpbmUudHlwZV0uc3NyY0dyb3VwcyA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0eXBlMmJsW3VMaW5lLnR5cGVdLnN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VZnJhZyAhPSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIGljZVVmcmFnID0gYkxpbmUuaWNlVWZyYWc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoKHR5cGVvZiBpY2VQd2QgIT0gJ3VuZGVmaW5lZCcpICYmICh0eXBlb2YgYkxpbmUuaWNlUHdkICE9ICd1bmRlZmluZWQnKSAmJiAoaWNlUHdkICE9IGJMaW5lLmljZVB3ZCkpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIk9ubHkgQlVORExFIHN1cHBvcnRlZCwgaWNlUHdkIG11c3QgYmUgdGhlIHNhbWUgZm9yIGFsbCBtLWxpbmVzLlxcblwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxcdExhc3QgaWNlUHdkOiBcIiArIGljZVB3ZCArIFwiXFxuXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXFx0TmV3IGljZVB3ZDogXCIgKyBiTGluZS5pY2VQd2RcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGJMaW5lLmljZVB3ZCAhPSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIGljZVB3ZCA9IGJMaW5lLmljZVB3ZDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICgodHlwZW9mIGZpbmdlcnByaW50ICE9ICd1bmRlZmluZWQnKSAmJiAodHlwZW9mIGJMaW5lLmZpbmdlcnByaW50ICE9ICd1bmRlZmluZWQnKSAmJlxuICAgICAgICAgICAgKGZpbmdlcnByaW50LnR5cGUgIT0gYkxpbmUuZmluZ2VycHJpbnQudHlwZSB8fCBmaW5nZXJwcmludC5oYXNoICE9IGJMaW5lLmZpbmdlcnByaW50Lmhhc2gpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJPbmx5IEJVTkRMRSBzdXBwb3J0ZWQsIGZpbmdlcnByaW50IG11c3QgYmUgdGhlIHNhbWUgZm9yIGFsbCBtLWxpbmVzLlxcblwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxcdExhc3QgZmluZ2VycHJpbnQ6IFwiICsgSlNPTi5zdHJpbmdpZnkoZmluZ2VycHJpbnQpICsgXCJcXG5cIiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJcXHROZXcgZmluZ2VycHJpbnQ6IFwiICsgSlNPTi5zdHJpbmdpZnkoYkxpbmUuZmluZ2VycHJpbnQpXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHR5cGVvZiBiTGluZS5maW5nZXJwcmludCAhPSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIGZpbmdlcnByaW50ID0gYkxpbmUuZmluZ2VycHJpbnQ7XG4gICAgICAgIH1cblxuICAgICAgICBwYXlsb2Fkc1tiTGluZS50eXBlXSA9IGJMaW5lLnBheWxvYWRzO1xuICAgICAgICBydGNwRmJbYkxpbmUudHlwZV0gPSBiTGluZS5ydGNwRmI7XG4gICAgICAgIHJ0cFtiTGluZS50eXBlXSA9IGJMaW5lLnJ0cDtcblxuICAgICAgICAvLyBpbnZlcnRlZCBzc3JjIGdyb3VwIG1hcFxuICAgICAgICB2YXIgc3NyYzJncm91cCA9IHt9O1xuICAgICAgICBpZiAodHlwZW9mIHNzcmNHcm91cHMgIT09ICd1bmRlZmluZWQnICYmIEFycmF5LmlzQXJyYXkoc3NyY0dyb3VwcykpIHtcbiAgICAgICAgICAgIHNzcmNHcm91cHMuZm9yRWFjaChmdW5jdGlvbiAoc3NyY0dyb3VwKSB7XG4gICAgICAgICAgICAgICAgLy8gWFhYIFRoaXMgbWlnaHQgYnJha2UgaWYgYW4gU1NSQyBpcyBpbiBtb3JlIHRoYW4gb25lIGdyb3VwXG4gICAgICAgICAgICAgICAgLy8gZm9yIHNvbWUgcmVhc29uLlxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3NyY0dyb3VwLnNzcmNzICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KHNzcmNHcm91cC5zc3JjcykpIHtcbiAgICAgICAgICAgICAgICAgICAgc3NyY0dyb3VwLnNzcmNzLmZvckVhY2goZnVuY3Rpb24gKHNzcmMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3NyYzJncm91cFtzc3JjXSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzc3JjMmdyb3VwW3NzcmNdID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNzcmMyZ3JvdXBbc3NyY10ucHVzaChzc3JjR3JvdXApO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNzcmMgdG8gbS1saW5lIGluZGV4LlxuICAgICAgICB2YXIgc3NyYzJtbCA9IHt9O1xuXG4gICAgICAgIGlmICh0eXBlb2Ygc291cmNlcyA9PT0gJ29iamVjdCcpIHtcblxuICAgICAgICAgICAgLy8gV2UnbGwgdXNlIHRoZSBcImJMaW5lXCIgb2JqZWN0IGFzIGEgcHJvdG90eXBlIGZvciBlYWNoIG5ldyBcIm1MaW5lXCJcbiAgICAgICAgICAgIC8vIHRoYXQgd2UgY3JlYXRlLCBidXQgZmlyc3Qgd2UgbmVlZCB0byBjbGVhbiBpdCB1cCBhIGJpdC5cbiAgICAgICAgICAgIGRlbGV0ZSBiTGluZS5zb3VyY2VzO1xuICAgICAgICAgICAgZGVsZXRlIGJMaW5lLnNzcmNHcm91cHM7XG4gICAgICAgICAgICBkZWxldGUgYkxpbmUuY2FuZGlkYXRlcztcbiAgICAgICAgICAgIGRlbGV0ZSBiTGluZS5pY2VVZnJhZztcbiAgICAgICAgICAgIGRlbG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XZlLW9ubHkgU1NSQ3MgbXVzdCBub3QgY3JlYXRlIG5ldyBtLWxpbmVzLiBXZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2lsbCBhc3NpZ24gdGhlbSB0byBhbiBleGlzdGluZyBtLWxpbmUgbGF0ZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNzcmMyZ3JvdXBbc3NyY10gIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkoc3NyYzJncm91cFtzc3JjXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgc3NyYzJncm91cFtzc3JjXS5zb21lKGZ1bmN0aW9uIChzc3JjR3JvdXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNzcmNHcm91cC5zc3JjcyAqaXMqIGFuIEFycmF5LCBubyBuZWVkIHRvIGNoZWNrXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhZ2FpbiBoZXJlLlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNzcmNHcm91cC5zc3Jjcy5zb21lKGZ1bmN0aW9uIChyZWxhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzc3JjMm1sW3JlbGF0ZWRdID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1TGluZSA9IHNzcmMybWxbcmVsYXRlZF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHVMaW5lID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICAvLyB0aGUgbS1saW5lIGFscmVhZHkgZXhpc3RzLiBKdXN0IGFkZCB0aGUgc291cmNlLlxuICAgICAgICAgICAgICAgICAgICB1TGluZS5zb3VyY2VzW3NzcmNdID0gc291cmNlc1tzc3JjXTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHNvdXJjZXNbc3NyY10ubXNpZDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBVc2UgdGhlIFwiYkxpbmVcIiBhcyBhIHByb3RvdHlwZSBmb3IgdGhlIFwidUxpbmVcIi5cbiAgICAgICAgICAgICAgICAgICAgdUxpbmUgPSBPYmplY3QuY3JlYXRlKGJMaW5lKTtcbiAgICAgICAgICAgICAgICAgICAgc3NyYzJtbFtzc3JjXSA9IHVMaW5lO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlc1tzc3JjXS5tc2lkICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXNzaWduIHRoZSBtc2lkIG9mIHRoZSBzb3VyY2UgdG8gdGhlIG0tbGluZS4gTm90ZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhhdCBpdCBpcyBub3QgZ3VhcmFudGVlZCB0aGF0IHRoZSBzb3VyY2Ugd2lsbCBoYXZlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBtc2lkLiBJbiBwYXJ0aWN1bGFyIFwicmVjdm9ubHlcIiBzb3VyY2VzIGRvbid0IGhhdmUgYW5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1zaWQuIE5vdGUgdGhhdCBcInJlY3Zvbmx5XCIgaXMgYSB0ZXJtIG9ubHkgZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9yIG0tbGluZXMuXG4gICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5tc2lkID0gc291cmNlc1tzc3JjXS5tc2lkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHNvdXJjZXNbc3NyY10ubXNpZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIFdlIGFzc2lnbiBvbmUgU1NSQyBwZXIgbWVkaWEgbGluZS5cbiAgICAgICAgICAgICAgICAgICAgdUxpbmUuc291cmNlcyA9IHt9O1xuICAgICAgICAgICAgICAgICAgICB1TGluZS5zb3VyY2VzW3NzcmNdID0gc291cmNlc1tzc3JjXTtcbiAgICAgICAgICAgICAgICAgICAgdUxpbmUuc3NyY0dyb3VwcyA9IHNzcmMyZ3JvdXBbc3NyY107XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gVXNlIHRoZSBjYWNoZWQgVW5pZmllZCBQbGFuIFNEUCAoaWYgaXQgZXhpc3RzKSB0byBhc3NpZ25cbiAgICAgICAgICAgICAgICAgICAgLy8gU1NSQ3MgdG8gbWlkcy5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjYWNoZWQgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2YgY2FjaGVkLm1lZGlhICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShjYWNoZWQubWVkaWEpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlZC5tZWRpYS5mb3JFYWNoKGZ1bmN0aW9uIChtKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBtLnNvdXJjZXMgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKG0uc291cmNlcykuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHMgPT09IHNzcmMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5taWQgPSBtLm1pZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHVMaW5lLm1pZCA9PT0gJ3VuZGVmaW5lZCcpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBpcyBhbiBTU1JDIHRoYXQgd2Ugc2VlIGZvciB0aGUgZmlyc3QgdGltZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYXNzaWduIGl0IGEgbmV3IG1pZC4gVGhpcyBpcyB0eXBpY2FsbHkgdGhlIGNhc2Ugd2hlblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyBtZXRob2QgaXMgY2FsbGVkIHRvIHRyYW5zZm9ybSBhIHJlbW90ZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZGVzY3JpcHRpb24gZm9yIHRoZSBmaXJzdCB0aW1lIG9yIHdoZW4gdGhlcmUgaXMgYVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmV3IFNTUkMgaW4gdGhlIHJlbW90ZSBkZXNjcmlwdGlvbiBiZWNhdXNlIGEgbmV3XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwZWVyIGhhcyBqb2luZWQgdGhlIGNvbmZlcmVuY2UuIExvY2FsIFNTUkNzIHNob3VsZFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaGF2ZSBhbHJlYWR5IGJlZW4gYWRkZWQgdG8gdGhlIG1hcCBpbiB0aGUgdG9QbGFuQlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWV0aG9kLlxuICAgICAgICAgICAgICAgICAgICAgICAgLy9cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJlY2F1c2UgRkYgZ2VuZXJhdGVzIGFuc3dlcnMgaW4gVW5pZmllZCBQbGFuIHN0eWxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2UgTVVTVCBhbHJlYWR5IGhhdmUgYSBjYWNoZWQgYW5zd2VyIHdpdGggYWxsIHRoZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9jYWwgU1NSQ3MgbWFwcGVkIHRvIHNvbWUgbS1saW5lL21pZC5cblxuICAgICAgICAgICAgICAgICAgICAgICAgdUxpbmUubWlkID0gW2JMaW5lLnR5cGUsICctJywgc3NyY10uam9pbignJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBJbmNsdWRlIHRoZSBjYW5kaWRhdGVzIGluIHRoZSAxc3QgbWVkaWEgbGluZS5cbiAgICAgICAgICAgICAgICAgICAgdUxpbmUuY2FuZGlkYXRlcyA9IGNhbmRpZGF0ZXM7XG4gICAgICAgICAgICAgICAgICAgIHVMaW5lLmljZVVmcmFnID0gaWNlVWZyYWc7XG4gICAgICAgICAgICAgICAgICAgIHVMaW5lLmljZVB3ZCA9IGljZVB3ZDtcbiAgICAgICAgICAgICAgICAgICAgdUxpbmUuZmluZ2VycHJpbnQgPSBmaW5nZXJwcmludDtcbiAgICAgICAgICAgICAgICAgICAgdUxpbmUucG9ydCA9IHBvcnQ7XG5cbiAgICAgICAgICAgICAgICAgICAgbWlkMnVsW3VMaW5lLm1pZF0gPSB1TGluZTtcbiAgICAgICAgICAgICAgICAgICAgc291cmNlczJ1bFt1SWR4XSA9IHVMaW5lLnNvdXJjZXM7XG5cbiAgICAgICAgICAgICAgICAgICAgc2VsZi5jYWNoZS5tbFUyQk1hcFt1SWR4XSA9IGJJZHg7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc2VsZi5jYWNoZS5tbEIyVU1hcFtiSWR4XSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzZWxmLmNhY2hlLm1sQjJVTWFwW2JJZHhdID0gdUlkeDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB1SWR4Kys7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHVMaW5lID0gYkxpbmU7XG5cbiAgICAgICAgICB1TGluZS5jYW5kaWRhdGVzID0gY2FuZGlkYXRlcztcbiAgICAgICAgICB1TGluZS5pY2VVZnJhZyA9IGljZVVmcmFnO1xuICAgICAgICAgIHVMaW5lLmljZVB3ZCA9IGljZVB3ZDtcbiAgICAgICAgICB1TGluZS5maW5nZXJwcmludCA9IGZpbmdlcnByaW50O1xuICAgICAgICAgIHVMaW5lLnBvcnQgPSBwb3J0O1xuXG4gICAgICAgICAgbWlkMnVsW3VMaW5lLm1pZF0gPSB1TGluZTtcblxuICAgICAgICAgIHNlbGYuY2FjaGUubWxVMkJNYXBbdUlkeF0gPSBiSWR4O1xuICAgICAgICAgIGlmICh0eXBlb2Ygc2VsZi5jYWNoZS5tbEIyVU1hcFtiSWR4XSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIHNlbGYuY2FjaGUubWxCMlVNYXBbYklkeF0gPSB1SWR4O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGJJZHgrKztcbiAgICB9KTtcblxuICAgIC8vIFJlYnVpbGQgdGhlIG1lZGlhIGFycmF5IGluIHRoZSByaWdodCBvcmRlciBhbmQgYWRkIHRoZSBtaXNzaW5nIG1MaW5lc1xuICAgIC8vIChtaXNzaW5nIGZyb20gdGhlIFBsYW4gQiBTRFApLlxuICAgIHNlc3Npb24ubWVkaWEgPSBbXTtcbiAgICBtaWRzID0gW107IC8vIHJldXNlXG5cbiAg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cmVjb25zdHJ1Y3RlZCBhbnN3ZXIuXG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjYWNoZWQubWVkaWEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciB1TGluZSA9IGNhY2hlZC5tZWRpYVtpXTtcblxuICAgICAgICAgICAgZGVsZXRlIHVMaW5lLm1zaWQ7XG4gICAgICAgICAgICBkZWxldGUgdUxpbmUuc291cmNlcztcbiAgICAgICAgICAgIGRlbGV0ZSB1TGluZS5zc3JjR3JvdXBzO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNvdXJjZXMydWxbaV0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgIGlmICghdUxpbmUuZGlyZWN0aW9uXG4gICAgICAgICAgICAgICAgICB8fCB1TGluZS5kaXJlY3Rpb24gPT09ICdzZW5kcmVjdicpXG4gICAgICAgICAgICAgICAgICB1TGluZS5kaXJlY3Rpb24gPSAncmVjdm9ubHknO1xuICAgICAgICAgICAgICBlbHNlIGlmICh1TGluZS5kaXJlY3Rpb24gPT09ICdzZW5kb25seScpXG4gICAgICAgICAgICAgICAgICB1TGluZS5kaXJlY3Rpb24gPSAnaW5hY3RpdmUnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKCF1TGluZS5kaXJlY3Rpb25cbiAgICAgICAgICAgICAgICAgIHx8IHVMaW5lLmRpcmVjdGlvbiA9PT0gJ3NlbmRyZWN2JylcbiAgICAgICAgICAgICAgICAgIHVMaW5lLmRpcmVjdGlvbiA9ICdzZW5kcmVjdic7XG4gICAgICAgICAgICAgIGVsc2UgaWYgKHVMaW5lLmRpcmVjdGlvbiA9PT0gJ3JlY3Zvbmx5JylcbiAgICAgICAgICAgICAgICAgIHVMaW5lLmRpcmVjdGlvbiA9ICdzZW5kb25seSc7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHVMaW5lLnNvdXJjZXMgPSBzb3VyY2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kgKGFzIHRoZSByZW9mZmVyZXIsIHdlIG11c3QgdXNlIHJlY3Zvbmx5IGlmIHRoZVxuICAgICAgICAvLyBvdGhlciBzaWRlIHdhcyBwcmV2aW91c2x5IHNlbmRpbmcgb24gdGhlIG0tc2VjdGlvbiwgYnV0IHdlIGNhbiBhbHNvXG4gICAgICAgIC8vIGxlYXZlIHRoZSBwb3NzaWJpbGl0eSBvcGVuIGlmIGl0IHdhc24ndCBwcmV2aW91c2x5IGluIHVzZSksIG9yXG4gICAgICAgIC8vIGE9aW5hY3RpdmUuXG5cbiAgICAgICAgaWYgKHR5cGVvZiBjYWNoZWQgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICB0eXBlb2YgY2FjaGVkLm1lZGlhICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICAgICAgQXJyYXkuaXNBcnJheShjYWNoZWQubWVkaWEpKSB7XG4gICAgICAgICAgICBjYWNoZWQubWVkaWEuZm9yRWFjaChmdW5jdGlvbih1TGluZSkge1xuICAgICAgICAgICAgICAgIG1pZHMucHVzaCh1TGluZS5taWQpO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbWlkMnVsW3VMaW5lLm1pZF0gIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb24ubWVkaWEucHVzaChtaWQydWxbdUxpbmUubWlkXSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHVMaW5lLm1zaWQ7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB1TGluZS5zb3VyY2VzO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgdUxpbmUuc3NyY0dyb3VwcztcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIXVMaW5lLmRpcmVjdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgfHwgdUxpbmUuZGlyZWN0aW9uID09PSAnc2VuZHJlY3YnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5kaXJlY3Rpb24gPSAnc2VuZG9ubHknO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghdUxpbmUuZGlyZWN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICB8fCB1TGluZS5kaXJlY3Rpb24gPT09ICdyZWN2b25seScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVMaW5lLmRpcmVjdGlvbiA9ICdpbmFjdGl2ZSc7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBhZGRTZXR1cEF0dHIgKHVMaW5lKTtcbiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbi5tZWRpYS5wdXNoKHVMaW5lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFkZCBhbGwgdGhlIHJlbWFpbmluZyAobmV3KSBtLWxpbmVzIG9mIHRoZSB0cmFuc2Zvcm1lZCBTRFAuXG4gICAgICAgIE9iamVjdC5rZXlzKG1pZDJ1bCkuZm9yRWFjaChmdW5jdGlvbihtaWQpIHtcbiAgICAgICAgICAgIGlmIChtaWRzLmluZGV4T2YobWlkKSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICBtaWRzLnB1c2gobWlkKTtcbiAgICAgICAgICAgICAgICBpZiAobWlkMnVsW21pZF0uZGlyZWN0aW9uID09PSAncmVjdm9ubHknKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgYSByZW1vdGUgcmVjdm9ubHkgY2hhbm5lbC4gQWRkIGl0cyBTU1JDIHRvIHRoZVxuICAgICAgICAgICAgICAgICAgICAvLyBhcHByb3ByaWF0ZSBzZW5kcmVjdiBvciBzZW5kb25seSBjaGFubmVsLlxuICAgICAgICAgICAgICAgICAgICAvLyBUT0RPKGdwKSB3aGF0IGlmIHdlIGRvbid0IGhhdmUgc2VuZHJlY3Yvc2VuZG9ubHlcbiAgICAgICAgICAgICAgICAgICAgLy8gY2hhbm5lbD9cblxuICAgICAgICAgICAgICAgICAgICB2YXIgZG9uZSA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb24ubWVkaWEuc29tZShmdW5jdGlvbiAodUxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodUxpbmUuZGlyZWN0aW9uID09PSAnc2VuZHJlY3YnIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdUxpbmUuZGlyZWN0aW9uID09PSAnc2VuZG9ubHknKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVMaW5lLnR5cGUgPT09IG1pZDJ1bFttaWRdLnR5cGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtaWQydWxbbWlkXSBzaG91bGRuJ3QgaGF2ZSBhbnkgc3NyYy1ncm91cHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhtaWQydWxbbWlkXS5zb3VyY2VzKS5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoc3NyYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5zb3VyY2VzW3NzcmNdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pZDJ1bFttaWRdLnNvdXJjZXNbc3NyY107XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXNzaW9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H1cbiAgICB9O1xuXG5cbiAgICAvLy8vLy8vLy8vLy8vLy9cbiAgICAvLyBNYXAgaGVscGVyXG4gICAgLy8vLy8vLy8vLy8vLy9cblxuXG4gICAgdmFyIG1hcHBlciA9IHtcblxuICAgICAgICByZ3ggOiBmdW5jdGlvbiAodWEsIGFycmF5cykge1xuXG4gICAgICAgICAgICAvL3ZhciByZXN1bHQgPSB7fSxcbiAgICAgICAgICAgIHZhciBpID0gMCwgaiwgaywgcCwgcSwgbWF0Y2hlcywgbWF0Y2g7Ly8sIGFyZ3MgPSBhcmd1bWVudHM7XG5cbiAgICAgICAgICAgIC8qLy8gY29uc3RydWN0IG9iamVjdCBiYXJlYm9uZXNcbiAgICAgICAgICAgIGZvciAocCA9IDA7IHAgPCBhcmdzWzFdLmxlbmd0aDsgcCsrKSB7XG4gICAgICAgICAgICAgICAgcSA9IGFyZ3NbMV1bcF07XG4gICAgICAgICAgICAgICAgcmVzdWx0W3R5cGVvZiBxID09PSBPQkpfVFlQRSA/IHFbMF0gOiBxXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0qL1xuXG4gICAgICAgICAgICAvLyBsb29wIHRocm91Z2ggYWxsIHJlZ2V4ZXMgbWFwc1xuICAgICAgICAgICAgd2hpbGUgKGkgPCBhcnJheXMubGVuZ3RoICYmICFtYXRjaGVzKSB7XG5cbiAgICAgICAgICAgICAgICB2YXIgcmVnZXggPSBhcnJheXNbaV0sICAgICAgIC8vIGV2ZW4gc2VxdWVuY2UgKDAsMiw0LC4uKVxuICAgICAgICAgICAgICAgICAgICBwcm9wcyA9IGFycmF5c1tpICsgMV07ICAgLy8gb2RkIHNlcXVlbmNlICgxLDMsNSwuLilcbiAgICAgICAgICAgICAgICBqID0gayA9IDA7XG5cbiAgICAgICAgICAgICAgICAvLyB0cnkgbWF0Y2hpbmcgdWFzdHJpbmcgd2l0aCByZWdleGVzXG4gICAgICAgICAgICAgICAgd2hpbGUgKGogPCByZWdleC5sZW5ndGggJiYgIW1hdGNoZXMpIHtcblxuICAgICAgICAgICAgICAgICAgICBtYXRjaGVzID0gcmVnZXhbaisrXS5leGVjKHVhKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoISFtYXRjaGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHAgPSAwOyBwIDwgcHJvcHMubGVuZ3RoOyBwKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRjaCA9IG1hdGNoZXNbKytrXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gcHJvcHNbcF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgZ2l2ZW4gcHJvcGVydHkgaXMgYWN0dWFsbHkgYXJyYXlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHEgPT09IE9CSl9UWVBFICYmIHEubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocS5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBxWzFdID09IEZVTkNfVFlQRSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFzc2lnbiBtb2RpZmllZCBtYXRjaFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbcVswXV0gPSBxWzFdLmNhbGwodGhpcywgbWF0Y2gpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhc3NpZ24gZ2l2ZW4gdmFsdWUsIGlnbm9yZSByZWdleCBtYXRjaFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbcVswXV0gPSBxWzFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHEubGVuZ3RoID09IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIHdoZXRoZXIgZnVuY3Rpb24gb3IgcmVnZXhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcVsxXSA9PT0gRlVOQ19UWVBFICYmICEocVsxXS5leGVjICYmIHFbMV0udGVzdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjYWxsIGZ1bmN0aW9uICh1c3VhbGx5IHN0cmluZyBtYXBwZXIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1txWzBdXSA9IG1hdGNoID8gcVsxXS5jYWxsKHRoaXMsIG1hdGNoLCBxWzJdKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2FuaXRpemUgbWF0Y2ggdXNpbmcgZ2l2ZW4gcmVnZXhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3FbMF1dID0gbWF0Y2ggPyBtYXRjaC5yZXBsYWNlKHFbMV0sIHFbMl0pIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHEubGVuZ3RoID09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3FbMF1dID0gbWF0Y2ggPyBxWzNdLmNhbGwodGhpcywgbWF0Y2gucmVwbGFjZShxWzFdLCBxWzJdKSkgOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3FdID0gbWF0Y2ggPyBtYXRjaCA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaSArPSAyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gY29uc29sZS5sb2codGhpcyk7XG4gICAgICAgICAgICAvL3JldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIHN0ciA6IGZ1bmN0aW9uIChzdHIsIG1hcCkge1xuXG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIG1hcCkge1xuICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIGFycmF5XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBtYXBbaV0gPT09IE9CSl9UWVBFICYmIG1hcFtpXS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgbWFwW2ldLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodXRpbC5oYXMobWFwW2ldW2pdLCBzdHIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChpID09PSBVTktOT1dOKSA/IHVuZGVmaW5lZCA6IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHV0aWwuaGFzKG1hcFtpXSwgc3RyKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKGkgPT09IFVOS05PV04pID8gdW5kZWZpbmVkIDogaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RyO1xuICAgICAgICB9XG4gICAgfTtcblxuXG4gICAgLy8vLy8vLy8vLy8vLy8vXG4gICAgLy8gU3RyaW5nIG1hcFxuICAgIC8vLy8vLy8vLy8vLy8vXG5cblxuICAgIHZhciBtYXBzID0ge1xuXG4gICAgICAgIGJyb3dzZXIgOiB7XG4gICAgICAgICAgICBvbGRzYWZhcmkgOiB7XG4gICAgICAgICAgICAgICAgdmVyc2lvbiA6IHtcbiAgICAgICAgICAgICAgICAgICAgJzEuMCcgICA6ICcvOCcsXG4gICAgICAgICAgICAgICAgICAgICcxLjInICAgOiAnLzEnLFxuICAgICAgICAgICAgICAgICAgICAnMS4zJyAgIDogJy8zJyxcbiAgICAgICAgICAgICAgICAgICAgJzIuMCcgICA6ICcvNDEyJyxcbiAgICAgICAgICAgICAgICAgICAgJzIuMC4yJyA6ICcvNDE2JyxcbiAgICAgICAgICAgICAgICAgICAgJzIuMC4zJyA6ICcvNDE3JyxcbiAgICAgICAgICAgICAgICAgICAgJzIuMC40JyA6ICcvNDE5JyxcbiAgICAgICAgICAgICAgICAgICAgJz8nICAgICA6ICcvJ1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBkZXZpY2UgOiB7XG4gICAgICAgICAgICBhbWF6b24gOiB7XG4gICAgICAgICAgICAgICAgbW9kZWwgOiB7XG4gICAgICAgICAgICAgICAgICAgICdGaXJlIFBob25lJyA6IFsnU0QnLCAnS0YnXVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzcHJpbnQgOiB7XG4gICAgICAgICAgICAgICAgbW9kZWwgOiB7XG4gICAgICAgICAgICAgICAgICAgICdFdm8gU2hpZnQgNEcnIDogJzczNzNLVCdcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHZlbmRvciA6IHtcbiAgICAgICAgICAgICAgICAgICAgJ0hUQycgICAgICAgOiAnQVBBJyxcbiAgICAgICAgICAgICAgICAgICAgJ1NwcmludCcgICAgOiAnU3ByaW50J1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBvcyA6IHtcbiAgICAgICAgICAgIHdpbmRvd3MgOiB7XG4gICAgICAgICAgICAgICAgdmVyc2lvbiA6IHtcbiAgICAgICAgICAgICAgICAgICAgJ01FJyAgICAgICAgOiAnNC45MCcsXG4gICAgICAgICAgICAgICAgICAgICdOVCAzLjExJyAgIDogJ05UMy41MScsXG4gICAgICAgICAgICAgICAgICAgICdOVCA0LjAnICAgIDogJ05UNC4wJyxcbiAgICAgICAgICAgICAgICAgICAgJzIwMDAnICAgICAgOiAnTlQgNS4wJyxcbiAgICAgICAgICAgICAgICAgICAgJ1hQJyAgICAgICAgOiBbJ05UIDUuMScsICdOVCA1LjInXSxcbiAgICAgICAgICAgICAgICAgICAgJ1Zpc3RhJyAgICAgOiAnTlQgNi4wJyxcbiAgICAgICAgICAgICAgICAgICAgJzcnICAgICAgICAgOiAnTlQgNi4xJyxcbiAgICAgICAgICAgICAgICAgICAgJzgnICAgICAgICAgOiAnTlQgNi4yJyxcbiAgICAgICAgICAgICAgICAgICAgJzguMScgICAgICAgOiAnTlQgNi4zJyxcbiAgICAgICAgICAgICAgICAgICAgJzEwJyAgICAgICAgOiBbJ05UIDYuNCcsICdOVCAxMC4wJ10sXG4gICAgICAgICAgICAgICAgICAgICdSVCcgICAgICAgIDogJ0FSTSdcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuXG5cbiAgICAvLy8vLy8vLy8vLy8vL1xuICAgIC8vIFJlZ2V4IG1hcFxuICAgIC8vLy8vLy8vLy8vLy9cblxuXG4gICAgdmFyIHJlZ2V4ZXMgPSB7XG5cbiAgICAgICAgYnJvd3NlciA6IFtbXG5cbiAgICAgICAgICAgIC8vIFByZXN0byBiYXNlZFxuICAgICAgICAgICAgLyhvcGVyYVxcc21pbmkpXFwvKFtcXHdcXC4tXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT3BlcmEgTWluaVxuICAgICAgICAgICAgLyhvcGVyYVxcc1ttb2JpbGV0YWJdKykuK3ZlcnNpb25cXC8oW1xcd1xcLi1dKykvaSwgICAgICAgICAgICAgICAgICAgICAgLy8gT3BlcmEgTW9iaS9UYWJsZXRcbiAgICAgICAgICAgIC8ob3BlcmEpLit2ZXJzaW9uXFwvKFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT3BlcmEgPiA5LjgwXG4gICAgICAgICAgICAvKG9wZXJhKVtcXC9cXHNdKyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSA8IDkuODBcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKG9waW9zKVtcXC9cXHNdKyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSBtaW5pIG9uIGlwaG9uZSA+PSA4LjBcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ09wZXJhIE1pbmknXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgL1xccyhvcHIpXFwvKFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT3BlcmEgV2Via2l0XG4gICAgICAgICAgICBdLCBbW05BTUUsICdPcGVyYSddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvLyBNaXhlZFxuICAgICAgICAgICAgLyhraW5kbGUpXFwvKFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBLaW5kbGVcbiAgICAgICAgICAgIC8obHVuYXNjYXBlfG1heHRob258bmV0ZnJvbnR8amFzbWluZXxibGF6ZXIpW1xcL1xcc10/KFtcXHdcXC5dKykqL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEx1bmFzY2FwZS9NYXh0aG9uL05ldGZyb250L0phc21pbmUvQmxhemVyXG5cbiAgICAgICAgICAgIC8vIFRyaWRlbnQgYmFzZWRcbiAgICAgICAgICAgIC8oYXZhbnRcXHN8aWVtb2JpbGV8c2xpbXxiYWlkdSkoPzpicm93c2VyKT9bXFwvXFxzXT8oW1xcd1xcLl0qKS9pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBdmFudC9JRU1vYmlsZS9TbGltQnJvd3Nlci9CYWlkdVxuICAgICAgICAgICAgLyg/Om1zfFxcKCkoaWUpXFxzKFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW50ZXJuZXQgRXhwbG9yZXJcblxuICAgICAgICAgICAgLy8gV2Via2l0L0tIVE1MIGJhc2VkXG4gICAgICAgICAgICAvKHJla29ucSlcXC8oW1xcd1xcLl0rKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJla29ucVxuICAgICAgICAgICAgLyhjaHJvbWl1bXxmbG9ja3xyb2NrbWVsdHxtaWRvcml8ZXBpcGhhbnl8c2lsa3xza3lmaXJlfG92aWJyb3dzZXJ8Ym9sdHxpcm9ufHZpdmFsZGl8aXJpZGl1bXxwaGFudG9tanN8Ym93c2VyKVxcLyhbXFx3XFwuLV0rKS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENocm9taXVtL0Zsb2NrL1JvY2tNZWx0L01pZG9yaS9FcGlwaGFueS9TaWxrL1NreWZpcmUvQm9sdC9Jcm9uL0lyaWRpdW0vUGhhbnRvbUpTL0Jvd3NlclxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8odHJpZGVudCkuK3J2WzpcXHNdKFtcXHdcXC5dKykuK2xpa2VcXHNnZWNrby9pICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElFMTFcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ0lFJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oZWRnZSlcXC8oKFxcZCspP1tcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1pY3Jvc29mdCBFZGdlXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyh5YWJyb3dzZXIpXFwvKFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBZYW5kZXhcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ1lhbmRleCddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKHB1ZmZpbilcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFB1ZmZpblxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnUHVmZmluJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oKD86W1xcc1xcL10pdWM/XFxzP2Jyb3dzZXJ8KD86anVjLispdWN3ZWIpW1xcL1xcc10/KFtcXHdcXC5dKykvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVQ0Jyb3dzZXJcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ1VDQnJvd3NlciddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGNvbW9kb19kcmFnb24pXFwvKFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENvbW9kbyBEcmFnb25cbiAgICAgICAgICAgIF0sIFtbTkFNRSwgL18vZywgJyAnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhtaWNyb21lc3NlbmdlcilcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXZUNoYXRcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ1dlQ2hhdCddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKFFRKVxcLyhbXFxkXFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFFRLCBha2EgU2hvdVFcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvbT8ocXFicm93c2VyKVtcXC9cXHNdPyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBRUUJyb3dzZXJcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAveGlhb21pXFwvbWl1aWJyb3dzZXJcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNSVVJIEJyb3dzZXJcbiAgICAgICAgICAgIF0sIFtWRVJTSU9OLCBbTkFNRSwgJ01JVUkgQnJvd3NlciddXSwgW1xuXG4gICAgICAgICAgICAvO2ZiYXZcXC8oW1xcd1xcLl0rKTsvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZhY2Vib29rIEFwcCBmb3IgaU9TICYgQW5kcm9pZFxuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIFtOQU1FLCAnRmFjZWJvb2snXV0sIFtcblxuICAgICAgICAgICAgL2hlYWRsZXNzY2hyb21lKD86XFwvKFtcXHdcXC5dKyl8XFxzKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hyb21lIEhlYWRsZXNzXG4gICAgICAgICAgICBdLCBbVkVSU0lPTiwgW05BTUUsICdDaHJvbWUgSGVhZGxlc3MnXV0sIFtcblxuICAgICAgICAgICAgL1xcc3d2XFwpLisoY2hyb21lKVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENocm9tZSBXZWJWaWV3XG4gICAgICAgICAgICBdLCBbW05BTUUsIC8oLispLywgJyQxIFdlYlZpZXcnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLygoPzpvY3VsdXN8c2Ftc3VuZylicm93c2VyKVxcLyhbXFx3XFwuXSspL2lcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgLyguKyg/Omd8dXMpKSguKykvLCAnJDEgJDInXSwgVkVSU0lPTl0sIFsgICAgICAgICAgICAgICAgLy8gT2N1bHVzIC8gU2Ftc3VuZyBCcm93c2VyXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLit2ZXJzaW9uXFwvKFtcXHdcXC5dKylcXHMrKD86bW9iaWxlXFxzP3NhZmFyaXxzYWZhcmkpKi9pICAgICAgICAvLyBBbmRyb2lkIEJyb3dzZXJcbiAgICAgICAgICAgIF0sIFtWRVJTSU9OLCBbTkFNRSwgJ0FuZHJvaWQgQnJvd3NlciddXSwgW1xuXG4gICAgICAgICAgICAvKGNocm9tZXxvbW5pd2VifGFyb3JhfFt0aXplbm9rYV17NX1cXHM/YnJvd3NlcilcXC92PyhbXFx3XFwuXSspL2lcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hyb21lL09tbmlXZWIvQXJvcmEvVGl6ZW4vTm9raWFcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGRvbGZpbilcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIERvbHBoaW5cbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ0RvbHBoaW4nXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLygoPzphbmRyb2lkLispY3Jtb3xjcmlvcylcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaHJvbWUgZm9yIEFuZHJvaWQvaU9TXG4gICAgICAgICAgICBdLCBbW05BTUUsICdDaHJvbWUnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhjb2FzdClcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSBDb2FzdFxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnT3BlcmEgQ29hc3QnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgL2Z4aW9zXFwvKFtcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGaXJlZm94IGZvciBpT1NcbiAgICAgICAgICAgIF0sIFtWRVJTSU9OLCBbTkFNRSwgJ0ZpcmVmb3gnXV0sIFtcblxuICAgICAgICAgICAgL3ZlcnNpb25cXC8oW1xcd1xcLl0rKS4rP21vYmlsZVxcL1xcdytcXHMoc2FmYXJpKS9pICAgICAgICAgICAgICAgICAgICAgICAvLyBNb2JpbGUgU2FmYXJpXG4gICAgICAgICAgICBdLCBbVkVSU0lPTiwgW05BTUUsICdNb2JpbGUgU2FmYX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NhcGUnXSwgVkVSU0lPTl0sIFtcbiAgICAgICAgICAgIC8oc3dpZnRmb3gpL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3dpZnRmb3hcbiAgICAgICAgICAgIC8oaWNlZHJhZ29ufGljZXdlYXNlbHxjYW1pbm98Y2hpbWVyYXxmZW5uZWN8bWFlbW9cXHNicm93c2VyfG1pbmltb3xjb25rZXJvcilbXFwvXFxzXT8oW1xcd1xcLlxcK10rKS9pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJY2VEcmFnb24vSWNld2Vhc2VsL0NhbWluby9DaGltZXJhL0Zlbm5lYy9NYWVtby9NaW5pbW8vQ29ua2Vyb3JcbiAgICAgICAgICAgIC8oZmlyZWZveHxzZWFtb25rZXl8ay1tZWxlb258aWNlY2F0fGljZWFwZXxmaXJlYmlyZHxwaG9lbml4KVxcLyhbXFx3XFwuLV0rKS9pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGaXJlZm94L1NlYU1vbmtleS9LLU1lbGVvbi9JY2VDYXQvSWNlQXBlL0ZpcmViaXJkL1Bob2VuaXhcbiAgICAgICAgICAgIC8obW96aWxsYSlcXC8oW1xcd1xcLl0rKS4rcnZcXDouK2dlY2tvXFwvXFxkKy9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW96aWxsYVxuXG4gICAgICAgICAgICAvLyBPdGhlclxuICAgICAgICAgICAgLyhwb2xhcmlzfGx5bnh8ZGlsbG98aWNhYnxkb3Jpc3xhbWF5YXx3M218bmV0c3VyZnxzbGVpcG5pcilbXFwvXFxzXT8oW1xcd1xcLl0rKS9pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQb2xhcmlzL0x5bngvRGlsbG8vaUNhYi9Eb3Jpcy9BbWF5YS93M20vTmV0U3VyZi9TbGVpcG5pclxuICAgICAgICAgICAgLyhsaW5rcylcXHNcXCgoW1xcd1xcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTGlua3NcbiAgICAgICAgICAgIC8oZ29icm93c2VyKVxcLz8oW1xcd1xcLl0rKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR29Ccm93c2VyXG4gICAgICAgICAgICAvKGljZVxccz9icm93c2VyKVxcL3Y/KFtcXHdcXC5fXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJQ0UgQnJvd3NlclxuICAgICAgICAgICAgLyhtb3NhaWMpW1xcL1xcc10oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW9zYWljXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl1cblxuICAgICAgICAgICAgLyogLy8vLy8vLy8vLy8vLy8vLy8vLy8vXG4gICAgICAgICAgICAvLyBNZWRpYSBwbGF5ZXJzIEJFR0lOXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cblxuICAgICAgICAgICAgLCBbXG5cbiAgICAgICAgICAgIC8oYXBwbGUoPzpjb3JlbWVkaWF8KSlcXC8oKFxcZCspW1xcd1xcLl9dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdlbmVyaWMgQXBwbGUgQ29yZU1lZGlhXG4gICAgICAgICAgICAvKGNvcmVtZWRpYSkgdigoXFxkKylbXFx3XFwuX10rKS9pXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhhcXVhbHVuZ3xseXNzbmF8YnNwbGF5ZXIpXFwvKChcXGQrKT9bXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgLy8gQXF1YWx1bmcvTHlzc25hL0JTUGxheWVyXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhhcmVzfG9zc3Byb3h5KVxccygoXFxkKylbXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXJlcy9PU1NQcm94eVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oYXVkYWNpb3VzfGF1ZGltdXNpY3N0cmVhbXxhbWFyb2t8YmFzc3xjb3JlfGRhbHZpa3xnbm9tZW1wbGF5ZXJ8bXVzaWMgb24gY29uc29sZXxuc3BsYXllcnxwc3AtaW50ZXJuZXRyYWRpb3BsYXllcnx2aWRlb3MpXFwvKChcXGQrKVtcXHdcXC4tXSspL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEF1ZGFjaW91cy9BdWRpTXVzaWNTdHJlYW0vQW1hcm9rL0JBU1MvT3BlbkNPUkUvRGFsdmlrL0dub21lTXBsYXllci9Nb0NcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTlNQbGF5ZXIvUFNQLUludGVybmV0UmFkaW9QbGF5ZXIvVmlkZW9zXG4gICAgICAgICAgICAvKGNsZW1lbnRpbmV8bXVzaWMgcGxheWVyIGRhZW1vbilcXHMoKFxcZCspW1xcd1xcLi1dKykvaSwgICAgICAgICAgICAgICAvLyBDbGVtZW50aW5lL01QRFxuICAgICAgICAgICAgLyhsZyBwbGF5ZXJ8bmV4cGxheWVyKVxccygoXFxkKylbXFxkXFwuXSspL2ksXG4gICAgICAgICAgICAvcGxheWVyXFwvKG5leHBsYXllcnxsZyBwbGF5ZXIpXFxzKChcXGQrKVtcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgLy8gTmV4UGxheWVyL0xHIFBsYXllclxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG4gICAgICAgICAgICAvKG5leHBsYXllcilcXHMoKFxcZCspW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOZXhwbGF5ZXJcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGZscnApXFwvKChcXGQrKVtcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGbGlwIFBsYXllclxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnRmxpcCBQbGF5ZXInXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhmc3RyZWFtfG5hdGl2ZWhvc3R8cXVlcnlzZWVrc3BpZGVyfGlhLWFyY2hpdmVyfGZhY2Vib29rZXh0ZXJuYWxoaXQpL2lcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRlN0cmVhbS9OYXRpdmVIb3N0L1F1ZXJ5U2Vla1NwaWRlci9JQSBBcmNoaXZlci9mYWNlYm9va2V4dGVybmFsaGl0XG4gICAgICAgICAgICBdLCBbTkFNRV0sIFtcblxuICAgICAgICAgICAgLyhnc3RyZWFtZXIpIHNvdXBodHRwc3JjICg/OlxcKFteXFwpXStcXCkpezAsMX0gbGlic291cFxcLygoXFxkKylbXFx3XFwuLV0rKS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdzdHJlYW1lclxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oaHRjIHN0cmVhbWluZyBwbGF5ZXIpXFxzW1xcd19dK1xcc1xcL1xccygoXFxkKylbXFxkXFwuXSspL2ksICAgICAgICAgICAgICAvLyBIVEMgU3RyZWFtaW5nIFBsYXllclxuICAgICAgICAgICAgLyhqYXZhfHB5dGhvbi11cmxsaWJ8cHl0aG9uLXJlcXVlc3RzfHdnZXR8bGliY3VybClcXC8oKFxcZCspW1xcd1xcLi1fXSspL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEphdmEvdXJsbGliL3JlcXVlc3RzL3dnZXQvY1VSTFxuICAgICAgICAgICAgLyhsYXZmKSgoXFxkKylbXFxkXFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMYXZmIChGRk1QRUcpXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhodGNfb25lX3MpXFwvKChcXGQrKVtcXGRcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSFRDIE9uZSBTXG4gICAgICAgICAgICBdLCBbW05BTUUsIC9fL2csICcgJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8obXBsYXllcikoPzpcXHN8XFwvKSg/Oig/OnNoZXJweWEtKXswLDF9c3ZuKSg/Oi18XFxzKShyXFxkKyg/Oi1cXGQrW1xcd1xcLi1dKyl7MCwxfSkvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNUGxheWVyIFNWTlxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8obXBsYXllcikoPzpcXHN8XFwvfFt1bmtvdy1dKykoKFxcZCspW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAgICAvLyBNUGxheWVyXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhtcGxheWVyKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNUGxheWVyIChubyBvdGhlciBpbmZvKVxuICAgICAgICAgICAgLyh5b3VybXV6ZSkvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBZb3VyTXV6ZVxuICAgICAgICAgICAgLyhtZWRpYSBwbGF5ZXIgY2xhc3NpY3xuZXJvIHNob3d0aW1lKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNZWRpYSBQbGF5ZXIgQ2xhc3NpYy9OZXJvIFNob3dUaW1lXG4gICAgICAgICAgICBdLCBbTkFNRV0sIFtcblxuICAgICAgICAgICAgLyhuZXJvICg/OmhvbWV8c2NvdXQpKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTmVybyBIb21lL05lcm8gU2NvdXRcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKG5va2lhXFxkKylcXC8oKFxcZCspW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm9raWFcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvXFxzKHNvbmdiaXJkKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU29uZ2JpcmQvUGhpbGlwcy1Tb25nYmlyZFxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8od2luYW1wKTMgdmVyc2lvbiAoKFxcZCspW1xcd1xcLi1dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2luYW1wXG4gICAgICAgICAgICAvKHdpbmFtcClcXHMoKFxcZCspW1xcd1xcLi1dKykvaSxcbiAgICAgICAgICAgIC8od2luYW1wKW1wZWdcXC8oKFxcZCspW1xcd1xcLi1dKykvaVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8ob2Ntcy1ib3R8dGFwaW5yYWRpb3x0dW5laW4gcmFkaW98dW5rbm93bnx3aW5hbXB8aW5saWdodCByYWRpbykvaSAgLy8gT0NNUy1ib3QvdGFwIGluIHJhZGlvL3R1bmVpbi91bmtub3duL3dpbmFtcCAobm8gb3RoZXIgaW5mbylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW5saWdodCByYWRpb1xuICAgICAgICAgICAgXSwgW05BTUVdLCBbXG5cbiAgICAgICAgICAgIC8ocXVpY2t0aW1lfHJtYXxyYWRpb2FwcHxyYWRpb2NsaWVudGFwcGxpY2F0aW9ufHNvdW5kdGFwfHRvdGVtfHN0YWdlZnJpZ2h0fHN0cmVhbWl1bSlcXC8oKFxcZCspW1xcd1xcLi1dKykvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBRdWlja1RpbWUvUmVhbE1lZGlhL1JhZGlvQXBwL1JhZGlvQ2xpZW50QXBwbGljYXRpb24vXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNvdW5kVGFwL1RvdGVtL1N0YWdlZnJpZ2h0L1N0cmVhbWl1bVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oc21wKSgoXFxkKylbXFxkXFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU01QXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyh2bGMpIG1lZGlhIHBsYXllciAtIHZlcnNpb24gKChcXGQrKVtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAvLyBWTEMgVmlkZW9sYW5cbiAgICAgICAgICAgIC8odmxjKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pLFxuICAgICAgICAgICAgLyh4Ym1jfGd2ZnN8eGluZXx4bW1zfGlyYXBwKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pLCAgICAgICAgICAgICAgICAgICAgLy8gWEJNQy9ndmZzL1hpbmUvWE1NUy9pcmFwcFxuICAgICAgICAgICAgLyhmb29iYXIyMDAwKVxcLygoXFxkKylbXFxkXFwuXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRm9vYmFyMjAwMFxuICAgICAgICAgICAgLyhpdHVuZXMpXFwvKChcXGQrKVtcXGRcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaVR1bmVzXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyh3bXBsYXllcilcXC8oKFxcZCspW1xcd1xcLi1dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2luZG93cyBNZWRpYSBQbGF5ZXJcbiAgICAgICAgICAgIC8od2luZG93cy1tZWRpYS1wbGF5ZXIpXFwvKChcXGQrKVtcXHdcXC4tXSspL2lcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgLy0vZywgJyAnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgL3dpbmRvd3NcXC8oKFxcZCspW1xcd1xcLi1dKykgdXBucFxcL1tcXGRcXC5dKyBkbG5hZG9jXFwvW1xcZFxcLl0rIChob21lIG1lZGlhIHNlcnZlcikvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaW5kb3dzIE1lZGlhIFNlcnZlclxuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIFtOQU1FLCAnV2luZG93cyddXSwgW1xuXG4gICAgICAgICAgICAvKGNvbVxcLnJpc2V1cHJhZGlvYWxhcm0pXFwvKChcXGQrKVtcXGRcXC5dKikvaSAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmlzZVVQIFJhZGlvIEFsYXJtXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhyYWQuaW8pXFxzKChcXGQrKVtcXGRcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmFkLmlvXG4gICAgICAgICAgICAvKHJhZGlvLig/OmRlfGF0fGZyKSlcXHMoKFxcZCspW1xcZFxcLl0rKS9pXG4gICAgICAgICAgICBdLCBbW05BTUUsICdyYWQuaW8nXSwgVkVSU0lPTl1cblxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xuICAgICAgICAgICAgLy8gTWVkaWEgcGxheWVycyBFTkRcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vKi9cblxuICAgICAgICBdLFxuXG4gICAgICAgIGNwdSA6IFtbXG5cbiAgICAgICAgICAgIC8oPzooYW1kfHgoPzooPzo4Nnw2NClbXy1dKT98d293fHdpbik2NClbO1xcKV0vaSAgICAgICAgICAgICAgICAgICAgIC8vIEFNRDY0XG4gICAgICAgICAgICBdLCBbW0FSQ0hJVEVDVFVSRSwgJ2FtZDY0J11dLCBbXG5cbiAgICAgICAgICAgIC8oaWEzMig/PTspKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSUEzMiAocXVpY2t0aW1lKVxuICAgICAgICAgICAgXSwgW1tBUkNISVRFQ1RVUkUsIHV0aWwubG93ZXJpemVdXSwgW1xuXG4gICAgICAgICAgICAvKCg/OmlbMzQ2XXx4KTg2KVs7XFwpXS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJQTMyXG4gICAgICAgICAgICBdLCBbW0FSQ0hJVEVDVFVSRSwgJ2lhMzInXV0sIFtcblxuICAgICAgICAgICAgLy8gUG9ja2V0UEMgbWlzdGFrZW5seSBpZGVudGlmaWVkIGFzIFBvd2VyUENcbiAgICAgICAgICAgIC93aW5kb3dzXFxzKGNlfG1vYmlsZSk7XFxzcHBjOy9pXG4gICAgICAgICAgICBdLCBbW0FSQ0hJVEVDVFVSRSwgJ2FybSddXSwgW1xuXG4gICAgICAgICAgICAvKCg/OnBwY3xwb3dlcnBjKSg/OjY0KT8pKD86XFxzbWFjfDt8XFwpKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG93ZXJQQ1xuICAgICAgICAgICAgXSwgW1tBUkNISVRFQ1RVUkUsIC9vd2VyLywgJycsIHV0aWwubG93ZXJpemVdXSwgW1xuXG4gICAgICAgICAgICAvKHN1bjRcXHcpWztcXCldL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU1BBUkNcbiAgICAgICAgICAgIF0sIFtbQVJDSElURUNUVVJFLCAnc3BhcmMnXV0sIFtcblxuICAgICAgICAgICAgLygoPzphdnIzMnxpYTY0KD89OykpfDY4ayg/PVxcKSl8YXJtKD86NjR8KD89dlxcZCs7KSl8KD89YXRtZWxcXHMpYXZyfCg/OmlyaXh8bWlwc3xzcGFyYykoPzo2NCk/KD89Oyl8cGEtcmlzYykvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJQTY0LCA2OEssIEFSTS82NCwgQVZSLzMyLCBJUklYLzY0LCBNSVBTLzY0LCBTUEFSQy82NCwgUEEtUklTQ1xuICAgICAgICAgICAgXSwgW1tBUkNISVRFQ1RVUkUsIHV0aWwubG93ZXJpemVdXVxuICAgICAgICBdLFxuXG4gICAgICAgIGRldmljZSA6IFtbXG5cbiAgICAgICAgICAgIC9cXCgoaXBhZHxwbGF5Ym9vayk7W1xcd1xcc1xcKTstXSsocmltfGFwcGxlKS9pICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlQYWQvUGxheUJvb2tcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgVkVORE9SLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FwcGxlY29yZW1lZGlhXFwvW1xcd1xcLl0rIFxcKChpcGFkKS8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaVBhZFxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnQXBwbGUnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC8oYXBwbGVcXHN7MCwxfXR2KS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFwcGxlIFRWXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnQXBwbGUgVFYnXSwgW1ZFTkRPUiwgJ0FwcGxlJ11dLCBbXG5cbiAgICAgICAgICAgIC8oYXJjaG9zKVxccyhnYW1lcGFkMj8pL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFyY2hvc1xuICAgICAgICAgICAgLyhocCkuKyh0b3VjaHBhZCkvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIUCBUb3VjaFBhZFxuICAgICAgICAgICAgLyhocCkuKyh0YWJsZXQpL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIUCBUYWJsZXRcbiAgICAgICAgICAgIC8oa2luZGxlKVxcLyhbXFx3XFwuXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gS2luZGxlXG4gICAgICAgICAgICAvXFxzKG5vb2spW1xcd1xcc10rYnVpbGRcXC8oXFx3KykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm9va1xuICAgICAgICAgICAgLyhkZWxsKVxccyhzdHJlYVtrcHJcXHNcXGRdKltcXGRrb10pL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRGVsbCBTdHJlYWtcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgLyhrZltBLXpdKylcXHNidWlsZFxcL1tcXHdcXC5dKy4qc2lsa1xcLy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEtpbmRsZSBGaXJlIEhEXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdBbWF6b24nXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG4gICAgICAgICAgICAvKHNkfGtmKVswMzQ5aGlqb3JzdHV3XStcXHNidWlsZFxcL1tcXHdcXC5dKy4qc2lsa1xcLy9pICAgICAgICAgICAgICAgICAgLy8gRmlyZSBQaG9uZVxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgbWFwcGVyLnN0ciwgbWFwcy5kZXZpY2UuYW1hem9uLm1vZGVsXSwgW1ZFTkRPUiwgJ0FtYXpvbiddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL1xcKChpcFtob25lZHxcXHNcXHcqXSspOy4rKGFwcGxlKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpUG9kL2lQaG9uZVxuICAgICAgICAgICAgXSwgW01PREVMLCBWRU5ET1IsIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgL1xcKChpcFtob25lZHxcXHNcXHcqXSspOy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpUG9kL2lQaG9uZVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnQXBwbGUnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8oYmxhY2tiZXJyeSlbXFxzLV0/KFxcdyspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCbGFja0JlcnJ5XG4gICAgICAgICAgICAvKGJsYWNrYmVycnl8YmVucXxwYWxtKD89XFwtKXxzb255ZXJpY3Nzb258YWNlcnxhc3VzfGRlbGx8bWVpenV8bW90b3JvbGF8cG9seXRyb24pW1xcc18tXT8oW1xcdy1dKykqL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJlblEvUGFsbS9Tb255LUVyaWNzc29uL0FjZXIvQXN1cy9EZWxsL01laXp1L01vdG9yb2xhL1BvbHl0cm9uXG4gICAgICAgICAgICAvKGhwKVxccyhbXFx3XFxzXStcXHcpL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIUCBpUEFRXG4gICAgICAgICAgICAvKGFzdXMpLT8oXFx3KykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBc3VzXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvXFwoYmIxMDtcXHMoXFx3KykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJsYWNrQmVycnkgMTBcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0JsYWNrQmVycnknXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFzdXMgVGFibGV0c1xuICAgICAgICAgICAgL2FuZHJvaWQuKyh0cmFuc2ZvW3ByaW1lXFxzXXs0LDEwfVxcc1xcdyt8ZWVlcGN8c2xpZGVyXFxzXFx3K3xuZXh1cyA3fHBhZGZvbmUpL2lcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0FzdXMnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC8oc29ueSlcXHModGFibGV0XFxzW3BzXSlcXHNidWlsZFxcLy9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb255XG4gICAgICAgICAgICAvKHNvbnkpPyg/OnNncC4rKVxcc2J1aWxkXFwvL2lcbiAgICAgICAgICAgIF0sIFtbVkVORE9SLCAnU29ueSddLCBbTU9ERUwsICdYcGVyaWEgVGFibGV0J10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuICAgICAgICAgICAgL2FuZHJvaWQuK1xccyhbYy1nXVxcZHs0fXxzb1stbF1cXHcrKVxcc2J1aWxkXFwvL2lcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1NvbnknXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC9cXHMob3V5YSlcXHMvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPdXlhXG4gICAgICAgICAgICAvKG5pbnRlbmRvKVxccyhbd2lkczN1XSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOaW50ZW5kb1xuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBDT05TT0xFXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuKztcXHMoc2hpZWxkKVxcc2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE52aWRpYVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTnZpZGlhJ10sIFtUWVBFLCBDT05TT0xFXV0sIFtcblxuICAgICAgICAgICAgLyhwbGF5c3RhdGlvblxcc1szNHBvcnRhYmxldmldKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUGxheXN0YXRpb25cbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1NvbnknXSwgW1RZUEUsIENPTlNPTEVdXSwgW1xuXG4gICAgICAgICAgICAvKHNwcmludFxccyhcXHcrKSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3ByaW50IFBob25lc1xuICAgICAgICAgICAgXSwgW1tWRU5ET1IsIG1hcHBlci5zdHIsIG1hcHMuZGV2aWNlLnNwcmludC52ZW5kb3JdLCBbTU9ERUwsIG1hcHBlci5zdHIsIG1hcHMuZGV2aWNlLnNwcmludC5tb2RlbF0sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvKGxlbm92bylcXHM/KFMoPzo1MDAwfDYwMDApKyg/OlstXVtcXHcrXSkpL2kgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTGVub3ZvIHRhYmxldHNcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgLyhodGMpWztfXFxzLV0rKFtcXHdcXHNdKyg/PVxcKSl8XFx3KykqL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhUQ1xuICAgICAgICAgICAgLyh6dGUpLShcXHcrKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gWlRFXG4gICAgICAgICAgICAvKGFsY2F0ZWx8Z2Vla3NwaG9uZXxsZW5vdm98bmV4aWFufHBhbmFzb25pY3woPz07XFxzKXNvbnkpW19cXHMtXT8oW1xcdy1dKykqL2lcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWxjYXRlbC9HZWVrc1Bob25lL0xlbm92by9OZXhpYW4vUGFuYXNvbmljL1NvbnlcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIFtNT0RFTCwgL18vZywgJyAnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8obmV4dXNcXHM5KS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhUQyBOZXh1cyA5XG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdIVEMnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9kXFwvaHVhd2VpKFtcXHdcXHMtXSspWztcXCldL2ksXG4gICAgICAgICAgICAvKG5leHVzXFxzNnApL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIdWF3ZWlcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0h1YXdlaSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgLyhtaWNyb3NvZnQpO1xccyhsdW1pYVtcXHNcXHddKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNaWNyb3NvZnQgTHVtaWFcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL1tcXHNcXCg7XSh4Ym94KD86XFxzb25lKT8pW1xcc1xcKTtdL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1pY3Jvc29mdCBYYm94XG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdNaWNyb3NvZnQnXSwgW1RZUEUsIENPTlNPTEVdXSwgW1xuICAgICAgICAgICAgLyhraW5cXC5bb25ldHddezN9KS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTWljcm9zb2Z0IEtpblxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgL1xcLi9nLCAnICddLCBbVkVORE9SLCAnTWljcm9zb2Z0J10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1vdG9yb2xhXG4gICAgICAgICAgICAvXFxzKG1pbGVzdG9uZXxkcm9pZCg/OlsyLTR4XXxcXHMoPzpiaW9uaWN8eDJ8cHJvfHJhenIpKT8oOj9cXHM0Zyk/KVtcXHdcXHNdK2J1aWxkXFwvL2ksXG4gICAgICAgICAgICAvbW90W1xccy1dPyhcXHcrKSovaSxcbiAgICAgICAgICAgIC8oWFRcXGR7Myw0fSkgYnVpbGRcXC8vaSxcbiAgICAgICAgICAgIC8obmV4dXNcXHM2KS9pXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdNb3Rvcm9sYSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC9hbmRyb2lkLitcXHMobXo2MFxcZHx4b29tW1xcczJdezAsMn0pXFxzYnVpbGRcXC8vaVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTW90b3JvbGEnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9oYmJ0dlxcL1xcZCtcXC5cXGQrXFwuXFxkK1xccytcXChbXFx3XFxzXSo7XFxzKihcXHdbXjtdKik7KFteO10qKS9pICAgICAgICAgICAgLy8gSGJiVFYgZGV2aWNlc1xuICAgICAgICAgICAgXSwgW1tWRU5ET1IsIHV0aWwudHJpbV0sIFtNT0RFTCwgdXRpbC50cmltXSwgW1RZUEUsIFNNQVJUVFZdXSwgW1xuXG4gICAgICAgICAgICAvaGJidHYuK21hcGxlOyhcXGQrKS9pXG4gICAgICAgICAgICBdLCBbW01PREVMLCAvXi8sICdTbWFydFRWJ10sIFtWRU5ET1IsICdTYW1zdW5nJ10sIFtUWVBFLCBTTUFSVFRWXV0sIFtcblxuICAgICAgICAgICAgL1xcKGR0dltcXCk7XS4rKGFxdW9zKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNoYXJwXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdTaGFycCddLCBbVFlQRSwgU01BUlRUVl1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLisoKHNjaC1pWzg5XTBcXGR8c2h3LW0zODBzfGd0LXBcXGR7NH18Z3QtblxcZCt8c2doLXQ4WzU2XTl8bmV4dXMgMTApKS9pLFxuICAgICAgICAgICAgLygoU00tVFxcdyspKS9pXG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgTU9ERUwsIFtUWVBFLCBUQUJMRVRdXSwgWyAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmdcbiAgICAgICAgICAgIC9zbWFydC10di4rKHNhbXN1bmcpL2lcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIFtUWVBFLCBTTUFSVFRWXSwgTU9ERUxdLCBbXG4gICAgICAgICAgICAvKChzW2NncF1oLVxcdyt8Z3QtXFx3K3xnYWxheHlcXHNuZXh1c3xzbS1cXHdbXFx3XFxkXSspKS9pLFxuICAgICAgICAgICAgLyhzYW1bc3VuZ10qKVtcXHMtXSooXFx3Ky0/W1xcdy1dKikqL2ksXG4gICAgICAgICAgICAvc2VjLSgoc2doXFx3KykpL2lcbiAgICAgICAgICAgIF0sIFtbVkVORE9SLCAnU2Ftc3VuZyddLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC9zaWUtKFxcdyspKi9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNpZW1lbnNcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1NpZW1lbnMnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8obWFlbW98bm9raWEpLioobjkwMHxsdW1pYVxcc1xcZCspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOb2tpYVxuICAgICAgICAgICAgLyhub2tpYSlbXFxzXy1dPyhbXFx3LV0rKSovaVxuICAgICAgICAgICAgXSwgW1tWRU5ET1IsICdOb2tpYSddLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkXFxzM1xcLltcXHNcXHc7LV17MTB9KGFcXGR7M30pL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBY2VyXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdBY2VyJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rKFt2bF1rXFwtP1xcZHszfSlcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIExHIFRhYmxldFxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTEcnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG4gICAgICAgICAgICAvYW5kcm9pZFxcczNcXC5bXFxzXFx3Oy1dezEwfShsZz8pLShbMDZjdjldezMsNH0pL2kgICAgICAgICAgICAgICAgICAgICAvLyBMRyBUYWJsZXRcbiAgICAgICAgICAgIF0sIFtbVkVORE9SLCAnTEcnXSwgTU9ERUwsIFtUWVBFLCBUQUJMRVRdXSwgW1xuICAgICAgICAgICAgLyhsZykgbmV0Y2FzdFxcLnR2L2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTEcgU21hcnRUVlxuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBTTUFSVFRWXV0sIFtcbiAgICAgICAgICAgIC8obmV4dXNcXHNbNDVdKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIExHXG4gICAgICAgICAgICAvbGdbZTtcXHNcXC8tXSsoXFx3KykqL2ksXG4gICAgICAgICAgICAvYW5kcm9pZC4rbGcoXFwtP1tcXGRcXHddKylcXHMrYnVpbGQvaVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTEcnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLisoaWRlYXRhYlthLXowLTlcXC1cXHNdKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMZW5vdm9cbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0xlbm92byddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2xpbnV4Oy4rKChqb2xsYSkpOy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBKb2xsYVxuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvKChwZWJibGUpKWFwcFxcL1tcXGRcXC5dK1xccy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQZWJibGVcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgV0VBUkFCTEVdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rO1xccyhvcHBvKVxccz8oW1xcd1xcc10rKVxcc2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT1BQT1xuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvY3JrZXkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdvb2dsZSBDaHJvbWVjYXN0XG4gICAgICAgICAgICBdLCBbW01PREVMLCAnQ2hyb21lY2FzdCddLCBbVkVORE9SLCAnR29vZ2xlJ11dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLis7XFxzKGdsYXNzKVxcc1xcZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR29vZ2xlIEdsYXNzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdHb29nbGUnXSwgW1RZUEUsIFdFQVJBQkxFXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuKztcXHMocGl4ZWwgYylcXHMvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdvb2dsZSBQaXhlbCBDXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdHb29nbGUnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLis7XFxzKHBpeGVsIHhsfHBpeGVsKVxccy9pICAgICAgICAgICAgICAgICAgICAgICAgICA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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTWVpenUgVGFibGV0XG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdNZWl6dSddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK2EwMDAoMSlcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25lUGx1c1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnT25lUGx1cyddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooUkNUW1xcZFxcd10rKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJDQSBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdSQ0EnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKFZlbnVlW1xcZFxcc10qKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBEZWxsIFZlbnVlIFRhYmxldHNcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0RlbGwnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKFFbVHxNXVtcXGRcXHddKylcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAvLyBWZXJpem9uIFRhYmxldFxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnVmVyaXpvbiddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccysoQmFybmVzWyZcXHNdK05vYmxlXFxzK3xCTltSVF0pKFY/LiopXFxzK2J1aWxkL2kgICAgIC8vIE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xkL2kgICAgICAgICAgICAgICAgICAgICAgICAgLy8gWmVraSBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdaZWtpJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvKGFuZHJvaWQpLitbO1xcL11cXHMrKFtZUl1cXGR7Mn14Py4qKVxccytidWlsZC9pLFxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccysoRHJhZ29uW1xcLVxcc10rVG91Y2hcXHMrfERUKSguKylcXHMrYnVpbGQvaSAgICAgICAgICAvLyBEcmFnb24gVG91Y2ggVGFibGV0XG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgJ0RyYWdvbiBUb3VjaCddLCBNT0RFTCwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKE5TLT8uKylcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW5zaWduaWEgVGFibGV0c1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnSW5zaWduaWEnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKChOWHxOZXh0KS0/LispXFxzK2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTmV4dEJvb2sgVGFibGV0c1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTmV4dEJvb2snXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKFh0cmVtZVxcXz8pPyhWKDFbMDQ1XXwyWzAxNV18MzB8NDB8NjB8N1swNV18OTApKVxccytidWlsZC9pXG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgJ1ZvaWNlJ10sIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFsgICAgICAgICAgICAgICAgICAgIC8vIFZvaWNlIFh0cmVtZSBQaG9uZXNcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooTFZURUxcXC0/KT8oVjFbMTJdKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgLy8gTHZUZWwgUGhvbmVzXG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgJ0x2VGVsJ10sIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooVigxMDBNRHw3MDBOQXw3MDExfDkxN0cpLipcXGIpXFxzK2J1aWxkL2kgICAgICAgICAgLy8gRW52aXplbiBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdFbnZpemVuJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rWztcXC9dXFxzKihMZVtcXHNcXC1dK1BhbilbXFxzXFwtXSsoLipcXGIpXFxzK2J1aWxkL2kgICAgICAgICAgICAgLy8gTGUgUGFuIFRhYmxldHNcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooVHJpb1tcXHNcXC1dKi4qKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1hY2hTcGVlZCBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdNYWNoU3BlZWQnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKFRyaW5pdHkpW1xcLVxcc10qKFRcXGR7M30pXFxzK2J1aWxkL2kgICAgICAgICAgICAgICAgLy8gVHJpbml0eSBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqVFVfKDE0OTEpXFxzK2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUm90b3IgVGFibGV0c1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnUm90b3InXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLisoS1MoLispKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFtYXpvbiBLaW5kbGUgVGFibGV0c1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnQW1hem9uJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rKEdpZ2FzZXQpW1xcc1xcLV0rKFEuKylcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdpZ2FzZXQgVGFibGV0c1xuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvXFxzKHRhYmxldHx0YWIpWztcXC9dL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVW5pZGVudGlmaWFibGUgVGFibGV0XG4gICAgICAgICAgICAvXFxzKG1vYmlsZSkoPzpbO1xcL118XFxzc2FmYXJpKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVuaWRlbnRpZmlhYmxlIE1vYmlsZVxuICAgICAgICAgICAgXSwgW1tUWVBFLCB1dGlsLmxvd2VyaXplXSwgVkVORE9SLCBNT0RFTF0sIFtcblxuICAgICAgICAgICAgLyhhbmRyb2lkLispWztcXC9dLitidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2VuZXJpYyBBbmRyb2lkIERldmljZVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnR2VuZXJpYyddXVxuXG5cbiAgICAgICAgLyovLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xuICAgICAgICAgICAgLy8gVE9ETzogbW92ZSB0byBzdHJpbmcgbWFwXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXG5cbiAgICAgICAgICAgIC8oQzY2MDMpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU29ueSBYcGVyaWEgWiBDNjYwM1xuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ1hwZXJpYSBaIEM2NjAzJ10sIFtWRU5ET1IsICdTb255J10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgLyhDNjkwMykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb255IFhwZXJpYSBaIDFcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdYcGVyaWEgWiAxJ10sIFtWRU5ET1IsICdTb255J10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvKFNNLUc5MDBbRnxIXSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmcgR2FsYXh5IFM1XG4gICAgICAgICAgICBdLCBbW01PREVMLCAnR2FsYXh5IFM1J10sIFtWRU5ET1IsICdTYW1zdW5nJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgLyhTTS1HNzEwMikvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTYW1zdW5nIEdhbGF4eSBHcmFuZCAyXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnR2FsYXh5IEdyYW5kIDInXSwgW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKFNNLUc1MzBIKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmcgR2FsYXh5IEdyYW5kIFByaW1lXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnR2FsYXh5IEdyYW5kIFByaW1lJ10sIFtWRU5ET1IsICdTYW1zdW5nJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgLyhTTS1HMzEzSFopL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTYW1zdW5nIEdhbGF4eSBWXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnR2FsYXh5IFYnXSwgW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKFNNLVQ4MDUpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmcgR2FsYXh5IFRhYiBTIDEwLjVcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdHYWxheHkgVGFiIFMgMTAuNSddLCBbVkVORE9SLCAnU2Ftc3VuZyddLCBbVFlQRSwgVEFCTEVUXV0sIFtcbiAgICAgICAgICAgIC8oU00tRzgwMEYpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2Ftc3VuZyBHYWxheHkgUzUgTWluaVxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ0dhbGF4eSBTNSBNaW5pJ10sIFtWRU5ET1IsICdTYW1zdW5nJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgLyhTTS1UMzExKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTYW1zdW5nIEdhbGF4eSBUYWIgMyA4LjBcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdHYWxheHkgVGFiIDMgOC4wJ10sIFtWRU5ET1IsICdTYW1zdW5nJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvKFQzQykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkdmFuIFZhbmRyb2lkIFQzQ1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnQWR2YW4nXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG4gICAgICAgICAgICAvKEFEVkFOIFQxSlxcKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBZHZhbiBWYW5kcm9pZCBUMUorXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnVmFuZHJvaWQgVDFKKyddLCBbVkVORE9SLCAnQWR2YW4nXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG4gICAgICAgICAgICAvKEFEVkFOIFM0QSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkdmFuIFZhbmRyb2lkIFM0QVxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ1ZhbmRyb2lkIFM0QSddLCBbVkVORE9SLCAnQWR2YW4nXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8oVjk3Mk0pL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gWlRFIFY5NzJNXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdaVEUnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8oaS1tb2JpbGUpXFxzKElRXFxzW1xcZFxcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGktbW9iaWxlIElRXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKElRNi4zKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGktbW9iaWxlIElRIElRIDYuM1xuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ0lRIDYuMyddLCBbVkVORE9SLCAnaS1tb2JpbGUnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKGktbW9iaWxlKVxccyhpLXN0eWxlXFxzW1xcZFxcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpLW1vYmlsZSBpLVNUWUxFXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKGktU1RZTEUyLjEpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGktbW9iaWxlIGktU1RZTEUgMi4xXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnaS1TVFlMRSAyLjEnXSwgW1ZFTkRPUiwgJ2ktbW9iaWxlJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvKG1vYmlpc3RhciB0b3VjaCBMQUkgNTEyKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1vYmlpc3RhciB0b3VjaCBMQUkgNTEyXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnVG91Y2ggTEFJIDUxMiddLCBbVkVORE9SLCAnbW9iaWlzdGFyJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vXG4gICAgICAgICAgICAvLyBFTkQgVE9ET1xuICAgICAgICAgICAgLy8vLy8vLy8vLy8qL1xuXG4gICAgICAgIF0sXG5cbiAgICAgICAgZW5naW5lIDogW1tcblxuICAgICAgICAgICAgL3dpbmRvd3MuK1xcc2VkZ2VcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRWRnZUhUTUxcbiAgICAgICAgICAgIF0sIFtWRVJTSU9OLCBbTkFNRSwgJ0VkZ2VIVE1MJ11dLCBbXG5cbiAgICAgICAgICAgIC8ocHJlc3RvKVxcLyhbXFx3XFwuXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUHJlc3RvXG4gICAgICAgICAgICAvKHdlYmtpdHx0cmlkZW50fG5ldGZyb250fG5ldHN1cmZ8YW1heWF8bHlueHx3M20pXFwvKFtcXHdcXC5dKykvaSwgICAgIC8vIFdlYktpdC9UcmlkZW50L05ldEZyb250L05ldFN1cmYvQW1heWEvTHlueC93M21cbiAgICAgICAgICAgIC8oa2h0bWx8dGFzbWFufGxpbmtzKVtcXC9cXHNdXFwoPyhbXFx3XFwuXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBLSFRNTC9UYXNtYW4vTGlua3NcbiAgICAgICAgICAgIC8oaWNhYilbXFwvXFxzXShbMjNdXFwuW1xcZFxcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpQ2FiXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgL3J2XFw6KFtcXHdcXC5dKykuKihnZWNrbykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHZWNrb1xuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIE5BTUVdXG4gICAgICAgIF0sXG5cbiAgICAgICAgb3MgOiBbW1xuXG4gICAgICAgICAgICAvLyBXaW5kb3dzIGJhc2VkXG4gICAgICAgICAgICAvbWljcm9zb2Z0XFxzKHdpbmRvd3MpXFxzKHZpc3RhfHhwKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2luZG93cyAoaVR1bmVzKVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG4gICAgICAgICAgICAvKHdpbmRvd3MpXFxzbnRcXHM2XFwuMjtcXHMoYXJtKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaW5kb3dzIFJUXG4gICAgICAgICAgICAvKHdpbmRvd3NcXHNwaG9uZSg/Olxcc29zKSopW1xcc1xcL10/KFtcXGRcXC5cXHNdK1xcdykqL2ksICAgICAgICAgICAgICAgICAgLy8gV2luZG93cyBQaG9uZVxuICAgICAgICAgICAgLyh3aW5kb3dzXFxzbW9iaWxlfHdpbmRvd3MpW1xcc1xcL10/KFtudGNlXFxkXFwuXFxzXStcXHcpL2lcbiAgICAgICAgICAgIF0sIFtOQU1FLCBbVkVSU0lPTiwgbWFwcGVyLnN0ciwgbWFwcy5vcy53aW5kb3dzLnZlcnNpb25dXSwgW1xuICAgICAgICAgICAgLyh3aW4oPz0zfDl8bil8d2luXFxzOXhcXHMpKFtudFxcZFxcLl0rKS9pXG4gICAgICAgICAgICBdLCBbW05BTUUsICdXaW5kb3dzJ10sIFtWRVJTSU9OLCBtYXBwZXIuc3RyLCBtYXBzLm9zLndpbmRvd3MudmVyc2lvbl1dLCBbXG5cbiAgICAgICAgICAgIC8vIE1vYmlsZS9FbWJlZGRlZCBPU1xuICAgICAgICAgICAgL1xcKChiYikoMTApOy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmxhY2tCZXJyeSAxMFxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnQmxhY2tCZXJyeSddLCBWRVJTSU9OXSwgW1xuICAgICAgICAgICAgLyhibGFja2JlcnJ5KVxcdypcXC8/KFtcXHdcXC5dKykqL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmxhY2tiZXJyeVxuICAgICAgICAgICAgLyh0aXplbilbXFwvXFxzXShbXFx3XFwuXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGl6ZW5cbiAgICAgICAgICAgIC8oYW5kcm9pZHx3ZWJvc3xwYWxtXFxzb3N8cW54fGJhZGF8cmltXFxzdGFibGV0XFxzb3N8bWVlZ298Y29udGlraSlbXFwvXFxzLV0/KFtcXHdcXC5dKykqL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFuZHJvaWQvV2ViT1MvUGFsbS9RTlgvQmFkYS9SSU0vTWVlR28vQ29udGlraVxuICAgICAgICAgICAgL2xpbnV4Oy4rKHNhaWxmaXNoKTsvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTYWlsZmlzaCBPU1xuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG4gICAgICAgICAgICAvKHN5bWJpYW5cXHM/b3N8c3ltYm9zfHM2MCg/PTspKVtcXC9cXHMtXT8oW1xcd1xcLl0rKSovaSAgICAgICAgICAgICAgICAgLy8gU3ltYmlhblxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnU3ltYmlhbiddLCBWRVJTSU9OXSwgW1xuICAgICAgICAgICAgL1xcKChzZXJpZXM0MCk7L2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2VyaWVzIDQwXG4gICAgICAgICAgICBdLCBbTkFNRV0sIFtcbiAgICAgICAgICAgIC9tb3ppbGxhLitcXChtb2JpbGU7LitnZWNrby4rZmlyZWZveC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpcmVmb3ggT1NcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ0ZpcmVmb3ggT1MnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLy8gQ29uc29sZVxuICAgICAgICAgICAgLyhuaW50ZW5kb3xwbGF5c3RhdGlvbilcXHMoW3dpZHMzNHBvcnRhYmxldnVdKykvaSwgICAgICAgICAgICAgICAgICAgLy8gTmludGVuZG8vUGxheXN0YXRpb25cblxuICAgICAgICAgICAgLy8gR05VL0xpbnV4IGJhc2VkXG4gICAgICAgICAgICAvKG1pbnQpW1xcL1xcc1xcKF0/KFxcdyspKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNaW50XG4gICAgICAgICAgICAvKG1hZ2VpYXx2ZWN0b3JsaW51eClbO1xcc10vaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNYWdlaWEvVmVjdG9yTGludXhcbiAgICAgICAgICAgIC8oam9saXxba3hsbl0/dWJ1bnR1fGRlYmlhbnxbb3Blbl0qc3VzZXxnZW50b298KD89XFxzKWFyY2h8c2xhY2t3YXJlfGZlZG9yYXxtYW5kcml2YXxjZW50b3N8cGNsaW51eG9zfHJlZGhhdHx6ZW53YWxrfGxpbnB1cylbXFwvXFxzLV0/KD8hY2hyb20pKFtcXHdcXC4tXSspKi9pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBKb2xpL1VidW50dS9EZWJpYW4vU1VTRS9HZW50b28vQXJjaC9TbGFja3dhcmVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmVkb3JhL01hbmRyaXZhL0NlbnRPUy9QQ0xpbnV4T1MvUmVkSGF0L1plbndhbGsvTGlucHVzXG4gICAgICAgICAgICAvKGh1cmR8bGludXgpXFxzPyhbXFx3XFwuXSspKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEh1cmQvTGludXhcbiAgICAgICAgICAgIC8oZ251KVxccz8oW1xcd1xcLl0rKSovaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR05VXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhjcm9zKVxcc1tcXHddK1xccyhbXFx3XFwuXStcXHcpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaHJvbWl1bSBPU1xuICAgICAgICAgICAgXSwgW1tOQU1FLCAnQ2hyb21pdW0gT1MnXSwgVkVSU0lPTl0sW1xuXG4gICAgICAgICAgICAvLyBTb2xhcmlzXG4gICAgICAgICAgICAvKHN1bm9zKVxccz8oW1xcd1xcLl0rXFxkKSovaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb2xhcmlzXG4gICAgICAgICAgICBdLCBbW05BTUUsICdTb2xhcmlzJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8vIEJTRCBiYXNlZFxuICAgICAgICAgICAgL1xccyhbZnJlbnRvcGMtXXswLDR9YnNkfGRyYWdvbmZseSlcXHM/KFtcXHdcXC5dKykqL2kgICAgICAgICAgICAgICAgICAgLy8gRnJlZUJTRC9OZXRCU0QvT3BlbkJTRC9QQy1CU0QvRHJhZ29uRmx5XG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sW1xuXG4gICAgICAgICAgICAvKGhhaWt1KVxccyhcXHcrKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIYWlrdVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLFtcblxuICAgICAgICAgICAgL2NmbmV0d29ya1xcLy4rZGFyd2luL2ksXG4gICAgICAgICAgICAvaXBbaG9uZWFkXSsoPzouKm9zXFxzKFtcXHddKylcXHNsaWtlXFxzbWFjfDtcXHNvcGVyYSkvaSAgICAgICAgICAgICAgICAgLy8gaU9TXG4gICAgICAgICAgICBdLCBbW1ZFUlNJT04sIC9fL2csICcuJ10sIFtOQU1FLCAnaU9TJ11dLCBbXG5cbiAgICAgICAgICAgIC8obWFjXFxzb3NcXHN4KVxccz8oW1xcd1xcc1xcLl0rXFx3KSovaSxcbiAgICAgICAgICAgIC8obWFjaW50b3NofG1hYyg/PV9wb3dlcnBjKVxccykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1hYyBPU1xuICAgICAgICAgICAgXSwgW1tOQU1FLCAnTWFjIE9TJ10sIFtWRVJTSU9OLCAvXy9nLCAnLiddXSwgW1xuXG4gICAgICAgICAgICAvLyBPdGhlclxuICAgICAgICAgICAgLygoPzpvcGVuKT9zb2xhcmlzKVtcXC9cXHMtXT8oW1xcd1xcLl0rKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU29sYXJpc1xuICAgICAgICAgICAgLyhhaXgpXFxzKChcXGQpKD89XFwufFxcKXxcXHMpW1xcd1xcLl0qKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQUlYXG4gICAgICAgICAgICAvKHBsYW5cXHM5fG1pbml4fGJlb3N8b3NcXC8yfGFtaWdhb3N8bW9ycGhvc3xyaXNjXFxzb3N8b3BlbnZtcykvaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUGxhbjkvTWluaXgvQmVPUy9PUzIvQW1pZ2FPUy9Nb3JwaE9TL1JJU0NPUy9PcGVuVk1TXG4gICAgICAgICAgICAvKHVuaXgpXFxzPyhbXFx3XFwuXSspKi9pICAgICAgICAg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HUsIHVhLCByZ3htYXAuY3B1KTtcbiAgICAgICAgICAgIHJldHVybiBjcHU7XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuZ2V0RGV2aWNlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGRldmljZSA9IHsgdmVuZG9yOiB1bmRlZmluZWQsIG1vZGVsOiB1bmRlZmluZWQsIHR5cGU6IHVuZGVmaW5lZCB9O1xuICAgICAgICAgICAgbWFwcGVyLnJneC5jYWxsKGRldmljZSwgdWEsIHJneG1hcC5kZXZpY2UpO1xuICAgICAgICAgICAgcmV0dXJuIGRldmljZTtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5nZXRFbmdpbmUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZW5naW5lID0geyBuYW1lOiB1bmRlZmluZWQsIHZlcnNpb246IHVuZGVmaW5lZCB9O1xuICAgICAgICAgICAgbWFwcGVyLnJneC5jYWxsKGVuZ2luZSwgdWEsIHJneG1hcC5lbmdpbmUpO1xuICAgICAgICAgICAgcmV0dXJuIGVuZ2luZTtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5nZXRPUyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBvcyA9IHsgbmFtZTogdW5kZWZpbmVkLCB2ZXJzaW9uOiB1bmRlZmluZWQgfTtcbiAgICAgICAgICAgIG1hcHBlci5yZ3guY2FsbChvcywgdWEsIHJneG1hcC5vcyk7XG4gICAgICAgICAgICByZXR1cm4gb3M7XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuZ2V0UmVzdWx0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB1YSAgICAgIDogdGhpcy5nZXRVQSgpLFxuICAgICAgICAgICAgICAgIGJyb3dzZXIgOiB0aGlzLmdldEJyb3dzZXIoKSxcbiAgICAgICAgICAgICAgICBlbmdpbmUgIDogdGhpcy5nZXRFbmdpbmUoKSxcbiAgICAgICAgICAgICAgICBvcyAgICAgIDogdGhpcy5nZXRPUygpLFxuICAgICAgICAgICAgICAgIGRldmljZSAgOiB0aGlzLmdldERldmljZSgpLFxuICAgICAgICAgICAgICAgIGNwdSAgICAgOiB0aGlzLmdldENQVSgpXG4gICAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLmdldFVBID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHVhO1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLnNldFVBID0gZnVuY3Rpb24gKHVhc3RyaW5nKSB7XG4gICAgICAgICAgICB1YSA9IHVhc3RyaW5nO1xuICAgICAgICAgICAgLy9icm93c2VyID0gbmV3IEJyb3dzZXIoKTtcbiAgICAgICAgICAgIC8vY3B1ID0gbmV3IENQVSgpO1xuICAgICAgICAgICAgLy9kZXZpY2UgPSBuZXcgRGV2aWNlKCk7XG4gICAgICAgICAgICAvL2VuZ2luZSA9IG5ldyBFbmdpbmUoKTtcbiAgICAgICAgICAgIC8vb3MgPSBuZXcgT1MoKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuXG4gICAgVUFQYXJzZXIuVkVSU0lPTiA9IExJQlZFUlNJT047XG4gICAgVUFQYXJzZXIuQlJPV1NFUiA9IHtcbiAgICAgICAgTkFNRSAgICA6IE5BTUUsXG4gICAgICAgIE1BSk9SICAgOiBNQUpPUiwgLy8gZGVwcmVjYXRlZFxuICAgICAgICBWRVJTSU9OIDogVkVSU0lPTlxuICAgIH07XG4gICAgVUFQYXJzZXIuQ1BVID0ge1xuICAgICAgICBBUkNISVRFQ1RVUkUgOiBBUkNISVRFQ1RVUkVcbiAgICB9O1xuICAgIFVBUGFyc2VyLkRFVklDRSA9IHtcbiAgICAgICAgTU9ERUwgICA6IE1PREVMLFxuICAgICAgICBWRU5ET1IgIDogVkVORE9SLFxuICAgICAgICBUWVBFICAgIDogVFlQRSxcbiAgICAgICAgQ09OU09MRSA6IENPTlNPTEUsXG4gICAgICAgIE1PQklMRSAgOiBNT0JJTEUsXG4gICAgICAgIFNNQVJUVFYgOiBTTUFSVFRWLFxuICAgICAgICBUQUJMRVQgIDogVEFCTEVULFxuICAgICAgICBXRUFSQUJMRTogV0VBUkFCTEUsXG4gICAgICAgIEVNQkVEREVEOiBFTUJFRERFRFxuICAgIH07XG4gICAgVUFQYXJzZXIuRU5HSU5FID0ge1xuICAgICAgICBOQU1FICAgIDogTkFNRSxcbiAgICAgICAgVkVSU0lPTiA6IFZFUlNJT05cbiAgICB9O1xuICAgIFVBUGFyc2VyLk9TID0ge1xuICAgICAgICBOQU1FICAgIDogTkFNRSxcbiAgICAgICAgVkVSU0lPTiA6IFZFUlNJT05cbiAgICB9O1xuICAgIC8vVUFQYXJzZXIuVXRpbHMgPSB1dGlsO1xuXG4gICAgLy8vLy8vLy8vLy9cbiAgICAvLyBFeHBvcnRcbiAgICAvLy8vLy8vLy8vXG5cblxuICAgIC8vIGNoZWNrIGpzIGVudmlyb25tZW50XG4gICAgaWYgKHR5cGVvZihleHBvcnRzKSAhPT0gVU5ERUZfVFlQRSkge1xuICAgICAgICAvLyBub2RlanMgZW52XG4gICAgICAgIGlmICh0eXBlb2YgbW9kdWxlICE9PSBVTkRFRl9UWVBFICYmIG1vZHVsZS5leHBvcnRzKSB7XG4gICAgICAgICAgICBleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSBVQVBhcnNlcjtcbiAgICAgICAgfVxuICAgICAgICAvLyBUT0RPOiB0ZXN0ISEhISEhISFcbiAgICAgICAgLypcbiAgICAgICAgaWYgKHJlcXVpcmUgJiYgcmVxdWlyZS5tYWluID09PSBtb2R1bGUgJiYgcHJvY2Vzcykge1xuICAgICAgICAgICAgLy8gY2xpXG4gICAgICAgICAgICB2YXIganNvbml6ZSA9IGZ1bmN0aW9uIChhcnIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVzID0gW107XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBhcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzLnB1c2gobmV3IFVBUGFyc2VyKGFycltpXSkuZ2V0UmVzdWx0KCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwcm9jZXNzLnN0ZG91dC53cml0ZShKU09OLnN0cmluZ2lmeShyZXMsIG51bGwsIDIpICsgJ1xcbicpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChwcm9jZXNzLnN0ZGluLmlzVFRZKSB7XG4gICAgICAgICAgICAgICAgLy8gdmlhIGFyZ3NcbiAgICAgICAgICAgICAgICBqc29uaXplKHByb2Nlc3MuYXJndi5zbGljZSgyKSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIHZpYSBwaXBlXG4gICAgICAgICAgICAgICAgdmFyIHN0ciA9ICcnO1xuICAgICAgICAgICAgICAgIHByb2Nlc3Muc3RkaW4ub24oJ3JlYWRhYmxlJywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZWFkID0gcHJvY2Vzcy5zdGRpbi5yZWFkKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZWFkICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gcmVhZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHByb2Nlc3Muc3RkaW4ub24oJ2VuZCcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAganNvbml6ZShzdHIucmVwbGFjZSgvXFxuJC8sICcnKS5zcGxpdCgnXFxuJykpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICovXG4gICAgICAgIGV4cG9ydHMuVUFQYX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d1bWVudHNbMl0gOiBhcmd1bWVudHNbMV07XHJcbiAgICAgICAgZnVuY3Rpb24gb24oKSB7XHJcbiAgICAgICAgICAgIHNlbGYub2ZmKGV2ZW50LCBvbik7XHJcbiAgICAgICAgICAgIGZ1bmMuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5vbihldmVudCwgZ3JvdXAsIG9uKTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH07XHJcblxyXG4gICAgLy8gVW5iaW5kcyBhbiBlbnRpcmUgZ3JvdXBcclxuICAgIHByb3RvdHlwZS5yZWxlYXNlR3JvdXAgPSBmdW5jdGlvbiAoZ3JvdXBOYW1lKSB7XHJcbiAgICAgICAgdGhpcy5jYWxsYmFja3MgPSB0aGlzLmNhbGxiYWNrcyB8fCB7fTtcclxuICAgICAgICB2YXIgaXRlbSwgaSwgbGVuLCBoYW5kbGVycztcclxuICAgICAgICBmb3IgKGl0ZW0gaW4gdGhpcy5jYWxsYmFja3MpIHtcclxuICAgICAgICAgICAgaGFuZGxlcnMgPSB0aGlzLmNhbGxiYWNrc1tpdGVtXTtcclxuICAgICAgICAgICAgZm9yIChpID0gMCwgbGVuID0gaGFuZGxlcnMubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGlmIChoYW5kbGVyc1tpXS5fZ3JvdXBOYW1lID09PSBncm91cE5hbWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKCdyZW1vdmluZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBpdCBhbmQgc2hvcnRlbiB0aGUgYXJyYXkgd2UncmUgbG9vcGluZyB0aHJvdWdoXHJcbiAgICAgICAgICAgICAgICAgICAgaGFuZGxlcnMuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIGktLTtcclxuICAgICAgICAgICAgICAgICAgICBsZW4tLTt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ncy5cclxuICAgIC8vIGFsc28gY2FsbHMgYW55IGAqYCBoYW5kbGVyc1xyXG4gICAgcHJvdG90eXBlLmVtaXQgPSBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICB0aGlzLmNhbGxiYWNrcyA9IHRoaXMuY2FsbGJhY2tzIHx8IHt9O1xyXG4gICAgICAgIHZhciBhcmdzID0gW10uc2xpY2UuY2FsbChhcmd1bWVudHMsIDEpLFxyXG4gICAgICAgICAgICBjYWxsYmFja3MgPSB0aGlzLmNhbGxiYWNrc1tldmVudF0sXHJcbiAgICAgICAgICAgIHNwZWNpYWxDYWxsYmFja3MgPSB0aGlzLmdldFdpbGRjYXJkQ2FsbGJhY2tzKGV2ZW50KSxcclxuICAgICAgICAgICAgaSxcclxuICAgICAgICAgICAgbGVuLFxyXG4gICAgICAgICAgICBpdGVtLFxyXG4gICAgICAgICAgICBsaXN0ZW5lcnM7XHJcblxyXG4gICAgICAgIGlmIChjYWxsYmFja3MpIHtcclxuICAgICAgICAgICAgbGlzdGVuZXJzID0gY2FsbGJhY2tzLnNsaWNlKCk7XHJcbiAgICAgICAgICAgIGZvciAoaSA9IDAsIGxlbiA9IGxpc3RlbmVycy5sZW5ndGg7IGkgPCBsZW47ICsraSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFsaXN0ZW5lcnNbaV0pIHtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGxpc3RlbmVyc1tpXS5hcHBseSh0aGlzLCBhcmdzKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHNwZWNpYWxDYWxsYmFja3MpIHtcclxuICAgICAgICAgICAgbGVuID0gc3BlY2lhbENhbGxiYWNrcy5sZW5ndGg7XHJcbiAgICAgICAgICAgIGxpc3RlbmVycyA9IHNwZWNpYWxDYWxsYmFja3Muc2xpY2UoKTtcclxuICAgICAgICAgICA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G4gICAgICAgICAgICBmb3IgKGkgaW4gZXZ0KSB7XG4gICAgICAgICAgICAgICAgaWYgKGV2dC5oYXNPd25Qcm9wZXJ0eShpKSAmJiAodmFsdWUgPSBldnRbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFBhc3MgdGhlIHNpbmdsZSBsaXN0ZW5lciBzdHJhaWdodCB0aHJvdWdoIHRvIHRoZSBzaW5ndWxhciBtZXRob2RcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlLmNhbGwodGhpcywgaSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlIHBhc3MgYmFjayB0byB0aGUgbXVsdGlwbGUgZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpcGxlLmNhbGwodGhpcywgaSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gU28gZXZ0IG11c3QgYmUgYSBzdHJpbmdcbiAgICAgICAgICAgIC8vIEFuZCBsaXN0ZW5lcnMgbXVzdCBiZSBhbiBhcnJheSBvZiBsaXN0ZW5lcnNcbiAgICAgICAgICAgIC8vIExvb3Agb3ZlciBpdCBhbmQgcGFzcyBlYWNoIG9uZSB0byB0aGUgbXVsdGlwbGUgbWV0aG9kXG4gICAgICAgICAgICBpID0gbGlzdGVuZXJzLmxlbmd0aDtcbiAgICAgICAgICAgIHdoaWxlIChpLS0pIHtcbiAgICAgICAgICAgICAgICBzaW5nbGUuY2FsbCh0aGlzLCBldnQsIGxpc3RlbmVyc1tpXSk7XG4gICAgICAgIC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HJlc3BvbnNlO1xuXG4gICAgICAgIGZvciAoa2V5IGluIGxpc3RlbmVyc01hcCkge1xuICAgICAgICAgICAgaWYgKGxpc3RlbmVyc01hcC5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXJzID0gbGlzdGVuZXJzTWFwW2tleV0uc2xpY2UoMCk7XG5cbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGlzdGVuZXJzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZSBsaXN0ZW5lciByZXR1cm5zIHRydWUgdGhlbiBpdCBzaGFsbCBiZSByZW1vdmVkIGZyb20gdGhlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIC8vIFRoZSBmdW5jdGlvbiBpcyBleGVjdXRlZCBlaXRoZXIgd2l0aCBhIGJhc2ljIGNhbGwgb3IgYW4gYXBwbHkgaWYgdGhlcmUgaXMgYW4gYXJncyBhcnJheVxuICAgICAgICAgICAgICAgICAgICBsaXN0ZW5lciA9IGxpc3RlbmVyc1tpXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAobGlzdGVuZXIub25jZSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVMaXN0ZW5lcihldnQsIGxpc3RlbmVyLmxpc3RlbmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gbGlzdGVuZXIubGlzdGVuZXIuYXBwbHkodGhpcywgYXJncyB8fCBbXSk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlID09PSB0aGlzLl9nZXRPbmNlUmV0dXJuVmFsdWUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVMaXN0ZW5lcihldnQsIGxpc3RlbmVyLmxpc3RlbmVyKTtcbiAgICAgICAgICAgICAgIC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ybmFtZSwgZm9yIGV4YW1wbGUpXG4gICAgICovXG4gICAgZGF0YTogc3RyaW5nO1xuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIHN0cmVhbTogU3RyZWFtO1xuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIG9wdGlvbnM6IENvbm5lY3Rpb25PcHRpb25zIHwgdW5kZWZpbmVkO1xuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIGRpc3Bvc2VkID0gZmFsc2U7XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgY29uc3RydWN0b3IocHJpdmF0ZSBzZXNzaW9uOiBTZXNzaW9uLCBvcHRzPzogQ29ubmVjdGlvbk9wdGlvbnMpIHtcblxuICAgICAgICBsZXQgbXNnID0gXCInQ29ubmVjdGlvbicgY3JlYXRlZCBcIjtcbiAgICAgICAgaWYgKCEhb3B0cykge1xuICAgICAgICAgICAgbXNnICs9IFwiKHJlbW90ZSkgd2l0aCAnY29ubmVjdGlvbklkJyBbXCIgKyBvcHRzLmlkICsgJ10nO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbXNnICs9ICcobG9jYWwpJztcbiAgICAgICAgfVxuICAgICAgICBjb25zb2xlLmluZm8obXNnKTtcblxuICAgICAgICB0aGlzLm9wdGlvbnMgPSBvcHRzO1xuXG4gICAgICAgIGlmICghIW9wdHMpIHtcbiAgICAgICAgICAgIC8vIENvbm5lY3Rpb24gaXMgcmVtb3RlXG4gICAgICAgICAgICB0aGlzLmNvbm5lY3Rpb25JZCA9IG9wdHMuaWQ7XG4gICAgICAgICAgICBpZiAob3B0cy5tZXRhZGF0YSkge1xuICAgICAgICAgICAgICAgIHRoaXMuZGF0YSA9IG9wdHMubWV0YWRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAob3B0cy5zdHJlYW1zKSB7XG4gICAgICAgICAgICA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IuaXNUeXBlU3VwcG9ydGVkKCd2aWRlby93ZWJtO2NvZGVjcz12cDgnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucyA9IHsgbWltZVR5cGU6ICd2aWRlby93ZWJtO2NvZGVjcz12cDgnIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ1VzaW5nIG1pbWVUeXBlICcgKyBvcHRpb25zLm1pbWVUeXBlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyID0gbmV3IE1lZGlhUmVjb3JkZXIodGhpcy5zdHJlYW0uZ2V0TWVkaWFTdHJlYW0oKSwgb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdpc1R5cGVTdXBwb3J0ZWQgaXMgbm90IHN1cHBvcnRlZCwgdXNpbmcgZGVmYXVsdCBjb2RlY3MgZm9yIGJyb3dzZXInKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyID0gbmV3IE1lZGlhUmVjb3JkZXIodGhpcy5zdHJlYW0uZ2V0TWVkaWFTdHJlYW0oKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyLnN0YXJ0KDEwKTtcblxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbmRhdGFhdmFpbGFibGUgPSAoZSkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuY2h1bmtzLnB1c2goZS5kYXRhKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbmVycm9yID0gKGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdNZWRpYVJlY29yZGVyIGVycm9yOiAnLCBlKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbnN0YXJ0ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdNZWRpYVJlY29yZGVyIHN0YXJ0ZWQgKHN0YXRlPScgKyB0aGlzLm1lZGlhUmVjb3JkZXIuc3RhdGUgKyAnKScpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyLm9uc3RvcCA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLm9uU3RvcERlZmF1bHQoKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbnBhdXNlID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdNZWRpYVJlY29yZGVyIHBhdXNlZCAoc3RhdGU9JyArIHRoaXMubWVkaWFSZWNvcmRlci5zdGF0ZSArICcpJyk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLm1lZGlhUmVjb3JkZXIub25yZXN1bWUgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ01lZGlhUmVjb3JkZXIgcmVzdW1lZCAoc3RhdGU9JyArIHRoaXMubWVkaWFSZWNvcmRlci5zdGF0ZSArICcpJyk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLm1lZGlhUmVjb3JkZXIub253YXJuaW5nID0gKGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnTWVkaWFSZWNvcmRlciB3YXJuaW5nOiAnICsgZSk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLnN0YXRlID0gTG9jYWxSZWNvZGVyU3RhdGUuU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2l0aCB0aGUgZmFpbGVkIGBodHRwLnN0YXR1c2AgaWYgbm90XG4gICAgICovXG4gICAgdXBsb2FkQXNCaW5hcnkoZW5kcG9pbnQ6IHN0cmluZywgaGVhZGVycz86IGFueSk6IFByb21pc2U8YW55PiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICBpZiAodGhpcy5zdGF0ZSAhPT0gTG9jYWxSZWNvZGVyU3RhdGUuRklOSVNIRUQpIHtcbiAgICAgICAgICAgICAgICByZWplY3QoRXJyb3IoJ1xcJ0xvY2FsUmVjb3JkLnVwbG9hZEFzQmluYXJ5KClcXCcgbmVlZHMgXFwnTG9jYWxSZWNvcmQuc3RhdGVcXCcgdG8gYmUgXFwnRklOSVNIRURcXCcgKGN1cnJlbnQgdmFsdWU6IFxcJycgKyB0aGlzLnN0YXRlICsgJ1xcJykuIENhbGwgXFwnTG9jYWxSZWNvcmRlci5zdG9wKClcXCcgYmVmb3JlJykpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBodHRwID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7XG4gICAgICAgICAgICAgICAgaHR0cC5vcGVuKCdQT1NUJywgZW5kcG9pbnQsIHRydWUpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBoZWFkZXJzID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBvZiBPYmplY3Qua2V5cyhoZWFkZXJzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaHR0cC5zZXRSZXF1ZXN0SGVhZGVyKGtleSwgaGVhZGVyc1trZXldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGh0dHAub25yZWFkeXN0YXRlY2hhbmdlID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaHR0cC5yZWFkeVN0YXRlID09PSA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaHR0cC5zdGF0dXMudG9TdHJpbmcoKS5jaGFyQXQoMCkgPT09ICcyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFN1Y2Nlc3MgcmVzcG9uc2UgZnJvbSBzZXJ2ZXIgKEhUVFAgc3RhdHVzIHN0YW5kYXJkOiAyWFggaXMgc3VjY2VzcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGh0dHAucmVzcG9uc2VUZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGh0dHAuc3RhdHVzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaHR0cC5zZW5kKHRoaXMuYmxvYik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuXG4gICAgLyoqXG4gICAgICogVXBsb2FkcyB0aGUgcmVjb3JkZWQgdmlkZW8gYXMgYSBtdWx0aXBhcnQgZmlsZSBwZXJmb3JtaW5nIGFuIEhUVFAvUE9TVCBvcGVyYXRpb24gdG8gVVJMIGBlbmRwb2ludGAuIFtbc3RhdGVdXSBwcm9wZXJ0eSBtdXN0IGJlIGBGSU5JU0hFRGAuIE9wdGlvbmFsIEhUVFAgaGVhZGVycyBjYW4gYmUgcGFzc2VkIGFzIHNlY29uZCBwYXJhbWV0ZXIuIEZvciBleGFtcGxlOlxuICAgICAqIGBgYFxuICAgICAqIHZhciBoZWFkZXJzID0ge1xuICAgICAqICBcIkNvb2tpZVwiOiBcIiRWZXJzaW9uPTE7IFNraW49bmV3O1wiLFxuICAgICAqICBcIkF1dGhvcml6YXRpb25cIjpcIkJhc2ljIFFXeGh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yA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgb2YgT2JqZWN0LmtleXMoaGVhZGVycykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0dHAuc2V0UmVxdWVzdEhlYWRlcihrZXksIGhlYWRlcnNba2V5XSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzZW5kYWJsZSA9IG5ldyBGb3JtRGF0YSgpO1xuICAgICAgICAgICAgICAgIHNlbmRhYmxlLmFwcGVuZCgnZmlsZScsIHRoaXMuYmxvYiwgdGhpcy5pZCArICcud2VibScpO1xuXG4gICAgICAgICAgICAgICAgaHR0cC5vbnJlYWR5c3RhdGVjaGFuZ2UgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChodHRwLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChodHRwLnN0YXR1cy50b1N0cmluZygpLmNoYXJBdCgwKSA9PT0gJzInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3VjY2VzcyByZXNwb25zZSBmcm9tIHNlcnZlciAoSFRUUCBzdGF0dXMgc3RhbmRhcmQ6IDJYWCBpcyBzdWNjZXNzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoaHR0cC5yZXNwb25zZVRleHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoaHR0cC5zdGF0dXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIGh0dHAuc2VuZChzZW5kYWJsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHBy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iAgICogICAgICB2YXIgbG9vcCA9ICgpID0+IHtcbiAgICogICAgICAgIGlmICghdmlkZW8ucGF1c2VkICYmICF2aWRlby5lbmRlZCkge1xuICAgKiAgICAgICAgICBjdHguZHJhd0ltYWdlKHZpZGVvLCAwLCAwLCAzMDAsIDE3MCk7XG4gICAqICAgICAgICAgIHNldFRpbWVvdXQobG9vcCwgMTAwMC8gRlJBTUVfUkFURSk7IC8vIERyYXdpbmcgYXQgMTAgZnBzXG4gICAqICAgICAgICB9XG4gICAqICAgICAgfTtcbiAgICogICAgICBsb29wKCk7XG4gICAqICAgIH0pO1xuICAgKiAgICB2aWRlby5wbGF5KCk7XG4gICAqXG4gICAqICAgIHZhciBncmF5VmlkZW9UcmFjayA9IGNhbnZhcy5jYXB0dXJlU3RyZWFtKEZSQU1FX1JBVEUpLmdldFZpZGVvVHJhY2tzKClbMF07XG4gICAqICAgIHZhciBwdWJsaXNoZXIgPSB0aGlzLk9WLmluaXRQdWJsaXNoZXIoXG4gICAqICAgICAgbXlIdG1sVGFyZ2V0LFxuICAgKiAgICAgIHtcbiAgICogICAgICAgIGF1ZGlvU291cmNlOiBmYWxzZSxcbiAgICogICAgICAgIHZpZGVvU291cmNlOiBncmF5VmlkZW9UcmFja1xuICAgKiAgICAgIH0pO1xuICAgKiB9KTtcbiAgICogYGBgXG4gICAqL1xuICBnZXRVc2VyTWVkaWEob3B0aW9uczogUHVibGlzaGVyUHJvcGVydGllcyk6IFByb21pc2U8TWVkaWFTdHJlYW0+IHtcbiAgICByZXR1cm4gbmV3IFByb21pc2U8TWVkaWFTdHJlYW0+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIHRoaXMuZ2VuZXJhdGVNZWRpYUNvbnN0cmFpbnRzKG9wdGlvbnMpXG4gICAgICAgIC50aGVuKGNvbnN0cmFpbnRzID0+IHtcbiAgICAgICAgICBuYXZpZ2F0b3IubWVkaWFEZXZpY2VzLmdldFVzZXJNZWRpYShjb25zdHJhaW50cylcbiAgICAgICAgICAgIC50aGVuKG1lZGlhU3RyZWFtID0+IHtcbiAgICAgICAgICAgICAgcmVzb2x2ZShtZWRpYVN0cmVhbSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgbGV0IGVycm9yTmFtZTogT3BlblZpZHVFcnJvck5hbWU7XG4gICAgICAgICAgICAgIGNvbnN0IGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgIGlmICghKG9wdGlvbnMudmlkZW9Tb3VyY2UgPT09ICdzY3JlZW4nKSkge1xuICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IChvcHRpb25zLnZpZGVvU291cmNlID09PSBmYWxzZSB8fCBvcHRpb25zLnZpZGVvU291cmNlID09PSBudWxsKSA/IE9wZW5WaWR1RXJyb3JOYW1lLk1JQ1JPUEhPTkVfQUNDRVNTX0RFTklFRCA6IE9wZW5WaWR1RXJyb3JOYW1lLkNBTUVSQV9BQ0NFU1NfREVOSUVEO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLlNDUkVFTl9DQVBUVVJFX0RFTklFRDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZWplY3QobmV3IE9wZW5WaWR1RXJyb3IoZXJyb3JOYW1lLCBlcnJvck1lc3NhZ2UpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycm9yOiBPcGVuVmlkdUVycm9yKSA9PiB7XG4gICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuXG4gIC8qIHRzbGludDpkaXNhYmxlOm5vLWVtcHR5ICovXG4gIC8qKlxuICAgKiBEaXNhYmxlIGFsbCBsb2dnaW5nIGV4Y2VwdCBlcnJvciBsZ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uU2hhcmluZy5nZXRTY3JlZW5Db25zdHJhaW50cygoZXJyb3IsIHNjcmVlbkNvbnN0cmFpbnRzKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghIWVycm9yICYmIGVycm9yID09PSAncGVybWlzc2lvbi1kZW5pZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXJyb3IgPSBuZXcgT3BlblZpZHVFcnJvcihPcGVuVmlkdUVycm9yTmFtZS5TQ1JFRU5fQ0FQVFVSRV9ERU5JRUQsICdZb3UgbXVzdCBhbGxvdyBhY2Nlc3MgdG8gb25lIHdpbmRvdyBvZiB5b3VyIGRlc2t0b3AnKTtcbiAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHMudmlkZW8gPSBzY3JlZW5Db25zdHJhaW50cztcbiAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKG1lZGlhQ29uc3RyYWludHMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHN0YXR1cyA9PT0gJ2luc3RhbGxlZC1kaXNhYmxlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0VYVEVOU0lPTl9ESVNBQkxFRCwgJ1lvdSBtdXN0IGVuYWJsZSB0aGUgc2NyZWVuIGV4dGVuc2lvbicpO1xuICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc3RhdHVzID09PSAnbm90LWluc3RhbGxlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0VYVEVOU0lPTl9OT1RfSU5TVEFMTEVELCAoPHN0cmluZz50aGlzLmFkdmFuY2VkQ29uZmlndXJhdGlvbi5zY3JlZW5TaGFyZUNocm9tZUV4dGVuc2lvbikpO1xuICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgIC8vIERlZmF1bHQgc2NyZWVuIHNoYXJpbmcgZXh0ZW5zaW9uIGZvciBDaHJvbWVcblxuICAgICAgICAgICAgICBzY3JlZW5TaGFyaW5nQXV0by5nZXRTY3JlZW5JZCgoZXJyb3IsIHNvdXJjZUlkLCBzY3JlZW5Db25zdHJhaW50cykgPT4ge1xuICAgICAgICAgICAgICAgIGlmICghIWVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPT09ICdub3QtaW5zdGFsbGVkJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLlNDUkVFTl9FWFRFTlNJT05fTk9UX0lOU1RBTExFRCwgJ2h0dHBzOi8vY2hyb21lLmdvb2dsZS5jb20vd2Vic3RvcmUvZGV0YWlsL3NjcmVlbi1jYXB0dXJpbmcvYWpoaWZkZGlta2FwZ2NpZmdjb2RtbWZkbGtuYWhmZmsnKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGVycm9yID09PSAnaW5zdGFsbGVkLWRpc2FibGVkJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLlNDUkVFTl9FWFRFTlNJT05fRElTQUJMRUQsICdZb3UgbXVzdCBlbmFibGUgdGhlIHNjcmVlbiBleHRlbnNpb24nKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGVycm9yID09PSAncGVybWlzc2lvbi1kZW5pZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0NBUFRVUkVfREVOSUVELCAnWW91IG11c3QgYWxsb3cgYWNjZXNzIHRvIG9uZSB3aW5kb3cgb2YgeW91ciBkZXNrdG9wJyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBtZWRpYUNvbnN0cmFpbnRzLnZpZGVvID0gc2NyZWVuQ29uc3RyYWludHMudmlkZW87XG4gICAgICAgICAgICAgICAgICByZXNvbHZlKG1lZGlhQ29uc3RyYWludHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHB1Ymxpc2hlclByb3BlcnRpZXMudmlkZW9Tb3VyY2UgPSAnc2NyZWVuJztcblxuICAgICAgICAgIH0gZWxzZ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ykge1xuICAgICAgICAgICAgY29uc3QgdmlkZW8gPSB0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKTtcbiAgICAgICAgICAgIGlmICghdGhpcy5zdHJlYW0uZGlzcGxheU15UmVtb3RlKCkgJiYgdmlkZW8gJiZcbiAgICAgICAgICAgICAgICB2aWRlby5jdXJyZW50VGltZSA+IDAgJiZcbiAgICAgICAgICAgICAgICB2aWRlby5wYXVzZWQgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgdmlkZW8uZW5kZWQgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgdmlkZW8ucmVhZHlTdGF0ZSA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCd2aWRlb1BsYXlpbmcnLCBbbmV3IFZpZGVvRWxlbWVudEV2ZW50KHRoaXMuc3RyZWFtLmdldFZpZGVvRWxlbWVudCgpLCB0aGlzLCAndmlkZW9QbGF5aW5nJyldKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0ub24oJ3ZpZGVvLWlzLXBsYXlpbmcnLCAoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudChlbGVtZW50LmVsZW1lbnQsIHRoaXMsICd2aWRlb1BsYXlpbmcnKV0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSAncmVtb3RlVmlkZW9QbGF5aW5nJykge1xuICAgICAgICAgICAgY29uc3QgdmlkZW8gPSB0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKTtcbiAgICAgICAgICAgIGlmICh0aGlzLnN0cmVhbS5kaXNwbGF5TXlSZW1vdGUoKSAmJiB2aWRlbyAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLmN1cnJlbnRUaW1lID4gMCAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLnBhdXNlZCA9PT0gZmFsc2UgJiZcbiAgICAgICAgICAgICAgICB2aWRlby5lbmRlZCA9PT0gZmFsc2UgJiZcbiAgICAgICAgICAgICAgICB2aWRlby5yZWFkeVN0YXRlID09PSA0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ3JlbW90ZVZpZGVvUGxheWluZycsIFtuZXcgVmlkZW9FbGVtZW50RXZlbnQodGhpcy5zdHJlYW0uZ2V0VmlkZW9FbGVtZW50KCksIHRoaXMsICdyZW1vdGVWaWRlb1BsYXlpbmcnKV0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmVhbS5vbigncmVtb3RlLXZpZGVvLWlzLXBsYXlpbmcnLCAoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgncmVtb3RlVmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudChlbGVtZW50LmVsZW1lbnQsIHRoaXMsICdyZW1vdGVWaWRlb1BsYXlpbmcnKV0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSAnYWNjZXNzQWxsb3dlZCcpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnN0cmVhbS5hY2Nlc3NJc0FsbG93ZWQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnYWNjZXNzQWxsb3dlZCcpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSAnYWNjZXNzRGVuaWVkJykge1xuICAgICAgICAgICAgaWYgKHRoaXMuc3RyZWFtLmFjY2Vzc0lzRGVuaWVkKSB7XG4gICAgICAgICAgICA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A9PT0gJ3ZpZGVvUGxheWluZycpIHtcbiAgICAgICAgICAgIGNvbnN0IHZpZGVvID0gdGhpcy5zdHJlYW0uZ2V0VmlkZW9FbGVtZW50KCk7XG4gICAgICAgICAgICBpZiAoIXRoaXMuc3RyZWFtLmRpc3BsYXlNeVJlbW90ZSgpICYmIHZpZGVvICYmXG4gICAgICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPiAwICYmXG4gICAgICAgICAgICAgICAgdmlkZW8ucGF1c2VkID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLmVuZGVkID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudCh0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKSwgdGhpcywgJ3ZpZGVvUGxheWluZycpXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyZWFtLm9uY2UoJ3ZpZGVvLWlzLXBsYXlpbmcnLCAoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudChlbGVtZW50LmVsZW1lbnQsIHRoaXMsICd2aWRlb1BsYXlpbmcnKV0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSAncmVtb3RlVmlkZW9QbGF5aW5nJykge1xuICAgICAgICAgICAgY29uc3QgdmlkZW8gPSB0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKTtcbiAgICAgICAgICAgIGlmICh0aGlzLnN0cmVhbS5kaXNwbGF5TXlSZW1vd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9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMub3BlbnZpZHUuZ2V0RGV2aWNlcygpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKGRldmljZXMgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAhIShkZXZpY2VzLmZpbHRlcigoZGV2aWNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZXZpY2Uua2luZCA9PT0gJ3ZpZGVvaW5wdXQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pWzBdKSk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSB1c2VyTWVkaWFIYXNBdWRpbyhjYWxsYmFjayk6IFByb21pc2U8YW55PiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxhbnk+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIHRoaXMub3BlbnZpZHUuZ2V0RGV2aWNlcygpXG4gICAgICAgICAgICAgICAgLnRoZW4oZGV2aWNlcyA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoXG4gICAgICAgICAgICAgICAgICAgICAgICAhIShkZXZpY2VzLmZpbHRlcigoZGV2aWNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRldmljZS5raW5kID09PSAnYXVkaW9pbnB1dCc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVswXSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG5cbiAgICAvKiBIaWRkZW4gbWV0aG9kcyAqL1xuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIGluaXRpYWxpemUoKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgICAgICAgY29uc3QgZXJyb3JDYWxsYmFjayA9IChvcGVuVmlkdUVycm9yOiBPcGVuVmlkdUVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0uYWNjZXNzSXNEZW5pZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyZWFtLmFjY2Vzc0lzQWxsb3dlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJlamVjdChvcGVuVmlkdUVycm9yKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHN1Y2Nlc3NDYWxsYmFjayA9IChtZWRpYVN0cmVhbTogTWVkaWFTdHJlYW0pID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmVhbS5hY2Nlc3NJc0FsbG93ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyZWFtLmFjY2Vzc0lzRGVuaWVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vcGVudmlkdS5pc01lZGlhU3RyZWFtVHJhY2sodGhpcy5wcm9wZXJ0aWVzLmF1ZGlvU291cmNlKSkge1xuICAgICAgICAgICAgICAgICAgICBtZWRpYVN0cmVhbS5yZW1vdmVUcmFjayhtZWRpYVN0cmVhbS5nZXRBdWRpb1RyYWNrcygpWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgbWVkaWFTdHJlYW0uYWRkVHJ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ymxpc2hWaWRlbztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLnN0cmVhbS5zZXRNZWRpYVN0cmVhbShtZWRpYVN0cmVhbSk7XG4gICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0uaW5zZXJ0VmlkZW8odGhpcy5lbGVtZW50LCB0aGlzLnByb3BlcnRpZXMuaW5zZXJ0TW9kZSk7XG5cbiAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLm9wZW52aWR1LmdlbmVyYXRlTWVkaWFDb25zdHJhaW50cyh0aGlzLnByb3BlcnRpZXMpXG4gICAgICAgICAgICAgICAgLnRoZW4oY29uc3RyYWludHMgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG91dGJvdW5kU3RyZWFtT3B0aW9ucyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHM6IGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHVibGlzaGVyUHJvcGVydGllczogdGhpcy5wcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0uc2V0T3V0Ym91bmRTdHJlYW1PcHRpb25zKG91dGJvdW5kU3RyZWFtT3B0aW9ucyk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQXNrIGluZGVwZW5kZW50bHkgZm9yIGF1ZGlvIHN0cmVhbSBhbmQgdmlkZW8gc3RyZWFtLiBJZiB0aGUgdXNlciBhc2tzIGZvciBib3RoIG9mIHRoZW0gYW5kIG9uZSBpcyBibG9ja2VkLCB0aGUgbWV0aG9kIHN0aWxsXG4gICAgICAgICAgICAgICAgICAgIC8vIHN1Y2Nlc3Mgb25seSB3aXRoIHRoZSBhbGxvd2VkIGlucHV0LiBUaGlzIGlzIG5vdCB0aGUgZGVzaWVyZCBiZWhhdmlvdXI6IGlmIGFueSBvZiB0aGVtIGlzIGJsb2NrZWQsIGFjY2VzcyBzaG91bGQgYmUgZGVuaWVkXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbnN0cmFpbnRzQXV4OiBNZWRpYVN0cmVhbUNvbnN0cmFpbnRzID0ge307XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRpbWVGb3JEaWFsb2dFdmVudCA9IDEwMDA7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RyZWFtLmlzU2VuZFZpZGVvKCkpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHNBdXguYXVkaW8gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzQXV4LnZpZGVvID0gY29uc3RyYWludHMudmlkZW87XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGFydFRpbWUgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRQZXJtaXNzaW9uRGlhbG9nVGltZXIodGltZUZvckRpYWxvZ0V2ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdG9yLm1lZGlhRGV2aWNlcy5nZXRVc2VyTWVkaWEoY29uc3RyYWludHNBdXgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4odmlkZW9Pbmx5U3RyZWFtID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhclBlcm1pc3Npb25EaWFsb2dUaW1lcihzdGFydFRpbWUsIHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RyZWFtLmlzU2VuZEF1ZGlvKCkpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHNBdXguYXVkaW8gPSAoY29uc3RyYWludHMuYXVkaW8gPT09IHVuZGVmaW5lZCkgPyB0cnVlIDogY29uc3RyYWludHMuYXVkaW87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50c0F1eC52aWRlbyA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydFRpbWUgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRQZXJtaXNzaW9uRGlhbG9nVGltZXIodGltZUZvckRpYWxvZ0V2ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdG9yLm1lZGlhRGV2aWNlcy5nZXRVc2VyTWVkaWEoY29uc3RyYWludHNBdXgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oYXVkaW9Pbmx5U3RyZWFtID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhclBlcm1pc3Npb25EaWFsb2dUaW1lcihzdGFydFRpbWUsIHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Pbmx5U3RyZWFtLmFkZFRyYWNrKGF1ZGlvT25seVN0cmVhbS5nZXRBdWRpb1RyYWNrcygpWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc0NhbGxiYWNrKHZpZGVvT25seVN0cmVhbSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNsZWFyUGVybWlzc2lvbkRpYWxvZ1RpbWVyKHN0YXJ0VGltZSwgdGltZUZvckRpYWxvZ0V2ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb09ubHlTdHJlYW0uZ2V0VmlkZW9UcmFja3MoKS5mb3JFYWNoKCh0cmFjaykgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2suc3RvcCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChlcnJvci5uYW1lLnRvTG93ZXJDYXNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGZvdW5kZXJyb3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLklOUFVUX0FVRElPX0RFVklDRV9OT1RfRk9VTkQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGFsbG93ZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuTUlDUk9QSE9ORV9BQ0NFU1NfREVOSUVEO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdvdmVyY29uc3RyYWluZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLmNvbnN0cmFpbnQudG9Mb3dlckNhc2UoKSA9PT0gJ2RldmljZWlkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5JTlBVVF9BVURJT19ERVZJQ0VfTk9UX0ZPVU5EO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSBcIkF1ZGlvIGlucHV0IGRldmljZSB3aXRoIGRldmljZUlkICdcIiArICg8Q29uc3RyYWluRE9NU3RyaW5nUGFyYW1ldGVycz4oPE1lZGlhVHJhY2tDb25zdHJhaW50cz5jb25zdHJhaW50cy5hdWRpbykuZGV2aWNlSWQhISkuZXhhY3QgKyBcIicgbm90IGZvdW5kXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuUFVCTElTSEVSX1BST1BFUlRJRVNfRVJST1I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IFwiQXVkaW8gaW5wdXQgZGV2aWNlIGRvZXNuJ3Qgc3VwcG9ydCB0aGUgdmFsdWUgcGFzc2VkIGZvciBjb25zdHJhaW50ICdcIiArIGVycm9yLmNvbnN0cmFpbnQgKyBcIidcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JDYWxsYmFjayhuZXcgT3BlblZpZHVFcnJvcihlcnJvck5hbWUsIGVycm9yTWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc0NhbGxiYWNrKHZpZGVvT25seVN0cmVhbSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJQZXJtaXNzaW9uRGlhbG9nVGltZXIoc3RhcnRUaW1lLCB0aW1lRm9yRGlhbG9nRXZlbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlcnJvck5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlcnJvck1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZXJyb3IubmFtZS50b0xvd2VyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdub3Rmb3VuZGVycm9yJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5JTlBVVF9WSURFT19ERVZJQ0VfTk9UX0ZPVU5EO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdub3RhbGxvd2VkZXJyb3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IHRoaXMuc3RyZWFtLmlzU2VuZFNjcmVlbigpID8gT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0NBUFRVUkVfREVOSUVEIDogT3BlblZpZHVFcnJvck5hbWUuQ0FNRVJBX0FDQ0VTU19ERU5JRUQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ292ZXJjb25zdHJhaW5lZGVycm9yJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IuY29uc3RyYWludC50b0xvd2VyQ2FzZSgpID09PSAnZGV2aWNlaWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLklOUFVUX1ZJREVPX0RFVklDRV9OT1RfRk9VTkQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IFwiVmlkZW8gaW5wdXQgZGV2aWNlIHdpdGggZGV2aWNlSWQgJ1wiICsgKDxDb25zdHJhaW5ET01TdHJpbmdQYXJhbWV0ZXJzPig8TWVkaWFUcmFja0NvbnN0cmFpbnRzPmNvbnN0cmFpbnRzLnZpZGVvKS5kZXZpY2VJZCEhKS5leGFjdCArIFwiJyBub3QgZm91bmRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5QVUJMSVNIRVJfUFJPUEVSVElFU19FUlJPUjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gXCJWaWRlbyBpbnB1dCBkZXZpY2UgZG9lc24ndCBzdXBwb3J0IHRoZSB2YWx1ZSBwYXNzZWQgZm9yIGNvbnN0cmFpbnQgJ1wiICsgZXJyb3IuY29uc3RyYWludCArIFwiJ1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvckNhbGxiYWNrKG5ldyBPcGVuVmlkdUVycm9yKGVycm9yTmFtZSwgZXJyb3JNZXNzYWdlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnN0cmVhbS5pc1NlbmRBdWRpbygpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzQXV4LmF1ZGlvID0gKGNvbnN0cmFpbnRzLmF1ZGlvID09PSB1bmRlZmluZWQpID8gdHJ1ZSA6IGNvbnN0cmFpbnRzLmF1ZGlvO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHNBdXgudmlkZW8gPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RhcnRUaW1lID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0UGVybWlzc2lvbkRpYWxvZ1RpbWVyKHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIG5hdmlnYXRvci5tZWRpYURldmljZXMuZ2V0VXNlck1lZGlhKGNvbnN0cmFpbnRzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKGF1ZGlvT25seVN0cmVhbSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJQZXJtaXNzaW9uRGlhbG9nVGltZXIoc3RhcnRUaW1lLCB0aW1lRm9yRGlhbG9nRXZlbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NDYWxsYmFjayhhdWRpb09ubHlTdHJlYW0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhclBlcm1pc3Npb25EaWFsb2dUaW1lcihzdGFydFRpbWUsIHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChlcnJvci5uYW1lLnRvTG93ZXJDYXNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGZvdW5kZXJyb3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLklOUFVUX0FVRElPX0RFVklDRV9OT1RfRk9VTkQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGFsbG93ZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuTUlDUk9QSE9ORV9BQ0NFU1NfREVOSUVEO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdvdmVyY29uc3RyYWluZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLmNvbnN0cmFpbnQudG9Mb3dlckNhc2UoKSA9PT0gJ2RldmljZWlkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5JTlBVVF9BVURJT19ERVZJQ0VfTk9UX0ZPVU5EO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSBcIkF1ZGlvIGlucHV0IGRldmljZSB3aXRoIGRldmljZUlkICdcIiArICg8Q29uc3RyYWluRE9NU3RyaW5nUGFyYW1ldGVycz4oPE1lZGlhVHJhY2tDb25zdHJhaW50cz5jb25zdHJhaW50cy5hdWRpbykuZGV2aWNlSWQhISkuZXhhY3QgKyBcIicgbm90IGZvdW5kXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuUFVCTElTSEVSX1BST1BFUlRJRVNfRVJST1I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IFwiQXVkaW8gaW5wdXQgZGV2aWNlIGRvZXNuJ3Qgc3VwcG9ydCB0aGUgdmFsdWUgcGFzc2VkIGZvciBjb25zdHJhaW50ICdcIiArIGVycm9yLmNvbnN0cmFpbnQgKyBcIidcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JDYWxsYmFjayhuZXcgT3BlblZpZHVFcnJvcihlcnJvck5hbWUsIGVycm9yTWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLk5PX0lOUFVUX1NPVVJDRV9TRVQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJQcm9wZXJ0aWVzICdhdWRpb1NvdXJjZScgYW5kICd2aWRlb1NvdXJjZScgY2Fubm90IGJlIHNldCB0byBmYWxzZSBvciBudWxsI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gICAgc2Vzc2lvbklkOiB0aGlzLnNlc3Npb25JZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRpY2lwYW50SWQ6IHRva2VuLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0YWRhdGE6ICEhbWV0YWRhdGEgPyB0aGlzLnN0cmluZ0NsaWVudE1ldGFkYXRhKG1ldGFkYXRhKSA6ICcnXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdEF1eCh0b2tlbikudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgT3BlblZpZHVFcnJvcihPcGVuVmlkdUVycm9yTmFtZS5CUk9XU0VSX05PVF9TVVBQT1JURUQsICdCcm93c2VyICcgKyBwbGF0Zm9ybS5uYW1lICsgJyAnICsgcGxhdGZvcm0udmVyc2lvbiArICcgaXMgbm90IHN1cHBvcnRlZCBpbiBPcGVuVmlkdScpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuXG5cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBMZWF2ZXMgdGhlIHNlc3Npb24sIGRlc3Ryb3lpbmcgYWxsIHN0cmVhbXMgYW5kIGRlbGV0aW5nIHRoZSB1c2VyIGFzIGEgcGFydGljaXBhbnQuXG4gICAgICpcbiAgICAgKiAjIyMjIEV2ZW50cyBkaXNwYXRjaGVkXG4gICAgICpcbiAgICAgKiBUaGUgW1tTZXNzaW9uXV0gb2JqZWN0IG9mIHRoZSBsb2NhbCBwYXJ0aWNpcGFudCB3a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cmFtNDtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnNvbGUuaW5mbygnU3Vic2NyaWJpbmcgdG8gJyArIHN0cmVhbS5jb25uZWN0aW9uLmNvbm5lY3Rpb25JZCk7XG5cbiAgICAgICAgc3RyZWFtLnN1YnNjcmliZSgpXG4gICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKCdTdWJzY3JpYmVkIGNvcnJlY3RseSB0byAnICsgc3RyZWFtLmNvbm5lY3Rpb24uY29ubmVjdGlvbklkKTtcbiAgICAgICAgICAgICAgICBpZiAoY29tcGxldGlvbkhhbmRsZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBjb21wbGV0aW9uSGFuZGxlcih1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChjb21wbGV0aW9uSGFuZGxlciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBsZXRpb25IYW5kbGVyKGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgY29uc3Qgc3Vic2NyaWJlciA9IG5ldyBTdWJzY3JpYmVyKHN0cmVhbSwgdGFyZ2V0RWxlbWVudCwgcHJvcGVydGllcyk7XG4gICAgICAgIHN0cmVhbS5pbnNlcnRWaWRlbyhzdWJzY3JpYmVyLmVsZW1lbnQsIHByb3BlcnRpZXMuaW5zZXJ0TW9kZSk7XG4gICAgICAgIHJldHVybiBzdWJzY3JpYmVyO1xuICAgIH1cblxuXG4gICAgLyoqXG4gICAgICogUHJvbWlzaWZpZWQgdmVyc2lvbiBvZiBbW1Nlc3Npb24uc3Vic2NyaWJlXV1cbiAgICAgKi9cbiAgICBzdWJzY3JpYmVBc3luYyhzdHJlYW06IFN0cmVhbSwgdGFyZ2V0RWxlbWVudDogc3RyaW5nIHwgSFRNTEVsZW1lbnQpOiBQcm9taXNlPFN1YnNjcmliZXI+O1xuICAgIHN1YnNjcmliZUFzeW5jKHN0cmVhbTogU3RyZWFtLCB0YXJnZXRFbGVtZW50OiBzdHJpbmcgfCBIVE1MRWxlbWVudCwgcHJvcGVydGllczogU3Vic2NyaWJlclByb3BlcnRpZXMpOiBQcm9taXNlPFN1YnNjcmliZXI+O1xuXG4gICAgc3Vic2NyaWJlQXN5bmMoc3RyZWFtOiBTdHJlYW0sIHRhcmdldEVsZW1lbnQ6IHN0cmluZyB8IEhUTUxFbGVtZW50LCBwcm9wZXJ0aWVzPzogU3Vic2NyaWJlclByb3BlcnRpZXMpOiBQcm9taXNlPFN1YnNjcmliZXI+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPFN1YnNjcmliZXI+KChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgICAgICAgbGV0IHN1YnNjcmliZXI6IFN1YnNjcmliZXI7XG5cbiAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrID0gKGVycm9yOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGlmICghIWVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShzdWJzY3JpYmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAoISFwcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgc3Vic2NyaWJlciA9IHRoaXMuc3Vic2NyaWJlKHN0cmVhbSwgdGFyZ2V0RWxlbWVudCwgcHJvcGVydGllcywgY2FsbGJhY2spO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzdWJzY3JpYmVyID0gdGhpcy5zdWJzY3JpYm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IE5PVCBiZWVuIGNhbGxlZFxuICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbi5hZGRTdHJlYW0ocHVibGlzaGVyLnN0cmVhbSk7XG4gICAgICAgICAgICAgICAgcHVibGlzaGVyLnN0cmVhbS5wdWJsaXNoKClcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vICdTZXNzaW9uLnVucHVibGlzaChQdWJsaXNoZXIpJyBoYXMgYmVlbiBjYWxsZWQuIE11c3QgaW5pdGlhbGl6ZSBhZ2FpbiBQdWJsaXNoZXJcbiAgICAgICAgICAgICAgICBwdWJsaXNoZXIuaW5pdGlhbGl6ZSgpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbi5hZGRTdHJlYW0ocHVibGlzaGVyLnN0cmVhbSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwdWJsaXNoZXIuc3RyZWFtLnB1Ymxpc2goKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9K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ibGU6bm8tc3RyaW5nLWxpdGVyYWwgKi9cbiAgICBzaWduYWwoc2lnbmFsOiBTaWduYWxPcHRpb25zKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHNpZ25hbE1lc3NhZ2UgPSB7fTtcblxuICAgICAgICAgICAgaWYgKHNpZ25hbC50byAmJiBzaWduYWwudG8ubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNvbm5lY3Rpb25JZHM6IHN0cmluZ1tdID0gW107XG5cbiAgICAgICAgICAgICAgICBzaWduYWwudG8uZm9yRWFjaChjb25uZWN0aW9uID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29ubmVjdGlvbklkcy5wdXNoKGNvbm5lY3Rpb24uY29ubmVjdGlvbklkKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBzaWduYWxNZXNzYWdlWyd0byddID0gY29ubmVjdGlvbklkcztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc2lnbmFsTWVzc2FnZVsndG8nXSA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzaWduYWxNZXNzYWdlWydkYXRhJ10gPSBzaWduYWwuZGF0YSA/IHNpZ25hbC5kYXRhIDogJyc7XG4gICAgICAgICAgICBzaWduYWxNZXNzYWdlWyd0eXBlJ10gPSBzaWduYWwudHlwZSA/IHNpZ25hbC50eXBlIDogJyc7XG5cbiAgICAgICAgICAgIHRoaXMub3BlbnZpZHUuc2VuZFJlcXVlc3QoJ3NlbmRNZXNzYWdlJywge1xuICAgICAgICAgICAgICAgIG1lc3NhZ2U6IEpTT04uc3RyaW5naWZ5KHNpZ25hbE1lc3NhZ2UpXG4gICAgICAgICAgICB9LCAoZXJyb3IsIHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAg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nlc3Npb24nXCIsIGV2ZW50KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKFwiRXZlbnQgJ1wiICsgdHlwZSArIFwiJyB0cmlnZ2VyZWQgYnkgJ1Nlc3Npb24nXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaGFuZGxlcihldmVudCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmICh0eXBlID09PSAncHVibGlzaGVyU3RhcnRTcGVha2luZycgfHwgdHlwZSA9PT0gJ3B1Ymxpc2hlclN0b3BTcGVha2luZycpIHtcbiAgICAgICAgICAgIHRoaXMuc3BlYWtpbmdFdmVudHNFbmFibGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgLy8gSWYgdGhlcmUgYXJlIGFscmVhZHkgYXZhaWxhYmxlIHJlbW90ZSBzdHJlYW1zLCBlbmFibGUgaGFyayBpbiBhbGwgb2YgdGhlbVxuICAgICAgICAgICAgZm9yIChjb25zdCBjb25uZWN0aW9uSWQgaW4gdGhpcy5yZW1vdGVDb25uZWN0aW9ucykge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0ciA9IHRoaXMucmVtb3RlQ29ubmVjdGlvbnNbY29ubmVjdGlvbklkXS5zdHJlYW07XG4gICAgICAgICAgICAgICAgaWYgKCEhc3RyICYmICFzdHIuc3BlZWNoRXZlbnQgJiYgc3RyLmhhc0F1ZGlvKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0ci5lbmFibGVPbmNlU3BlYWtpbmdFdmVudHMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cblxuICAgIC8qKlxuICAgICAqIFNlZSBbW0V2ZW50RGlzcGF0Y2hlci5vZmZdXVxuICAgICAqL1xuICAgIG9mZih0eXBlOiBzdHJpbmcsIGhhbmRsZXI/OiAoZXZlbnQ6IFNlc3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4gICAgcHJpdmF0ZSBjb25uZWN0QXV4KHRva2VuOiBzdHJpbmcpOiBQcm9taXNlPGFueT4ge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5vcGVudmlkdS5zdGFydFdzKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGlmICghIWVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBqb2luUGFyYW1zID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW46ICghIXRva2VuKSA/IHRva2VuIDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXNzaW9uOiB0aGlzLnNlc3Npb25JZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhOiAhIXRoaXMub3B0aW9ucy5tZXRhZGF0YSA/IHRoaXMub3B0aW9ucy5tZXRhZGF0YSA6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VjcmV0OiB0aGlzLm9wZW52aWR1LmdldFNlY3JldCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3JkZXI6IHRoaXMub3BlbnZpZHUuZ2V0UmVjb3JkZXIoKSxcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wZW52aWR1LnNlbmRSZXF1ZXN0KCdqb2luUm9vbScsIGpvaW5QYXJhbXMsIChlcnJvciwgcmVzcG9uc2UpID0+IHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW5pdGlhbGl6ZSBsb2NhbCBDb25uZWN0aW9uIG9iamVjdCB3aXRoIHZhbHVlcyByZXR1cm5lZCBieSBvcGVudmlkdS1zZXJ2ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbiA9IG5ldyBDb25uZWN0aW9uKHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uLmNvbm5lY3Rpb25JZCA9IHJlc3BvbnNlLmlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uLmRhdGEgPSByZXNwb25zZS5tZXRhZGF0YTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW5pdGlhbGl6ZSByZW1vdGUgQ29ubmVjdGlvbnMgd2l0aCB2YWx1ZSByZXR1cm5lZCBieSBvcGVudmlkdS1zZXJ2ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV2ZW50cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25uZWN0aW9uczogbmV3IEFycmF5PENvbm5lY3Rpb24+KCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtczogbmV3IEFycmF5PFN0cmVhbT4oKVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV4aXN0aW5nUGFydGljaXBhbnRzOiBDb25uZWN0aW9uT3B0aW9uc1tdID0gcmVzcG9uc2UudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBleGlzdGluZ1BhcnRpY2lwYW50cy5mb3JFYWNoKHBhcnRpY2lwYW50ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb25uZWN0aW9uID0gbmV3IENvbm5lY3Rpb24odGhpcywgcGFydGljaXBhbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3RlQ29ubmVjdGlvbnNbY29ubmVjdGlvbi5jb25uZWN0aW9uSWRdID0gY29ubmVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudHMuY29ubmVjdGlvbnMucHVzaChjb25uZWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoISFjb25uZWN0aW9uLnN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW90ZVN0cmVhbXNDcmVhdGVkW2Nvbm5lY3Rpb24uc3RyZWFtLnN0cmVhbUlkXSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50cy5zdHJlYW1zLnB1c2goY29ubmVjdGlvbi5zdHJlYW0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPd24gJ2Nvbm5lY3Rpb25DcmVhdGVkJyBldmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ2Nvbm5lY3Rpb25DcmVhdGVkJywgW25ldyBDb25uZWN0aW9uRXZlbnQoZmFsc2UsIHRoaXMsICdjb25uZWN0aW9uQ3JlYXRlZCcsIHRoaXMuY29ubmVjdGlvbiwgJycpXSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9uZSAnY29ubmVjdGlvbkNyZWF0ZWQnIGV2ZW50IGZvciBlYWNoIGV4aXN0aW5nIGNvbm5lY3Rpb24gaW4gdGhlIHNlc3Npb25cbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50cy5jb25uZWN0aW9ucy5mb3JFYWNoKGNvbm5lY3Rpb24gPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCdjb25uZWN0aW9uQ3JlYXRlZCcsIFtuZXcgQ29ubmVjdGlvbkV2ZW50KGZhbHNlLCB0aGlzLCAnY29ubmVjdGlvbkNyZWF0ZWQnLCBjb25uZWN0aW9uLCAnJyldKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPbmUgJ3N0cmVhbUNyZWF0ZWQnIGV2ZW50IGZvciBlYWNoIGFjdGl2ZSBzdHJlYW0gaW4gdGhlIHNlc3Npb25cbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50cy5zdHJlYW1zLmZvckVhY2goc3RyZWFtID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnc3RyZWFtQ3JlYXRlZCcsIFtuZXcgU3RyZWFtRXZlbnQoZmFsc2UsIHRoaXMsICdzdHJlYW1DcmVhdGVkJywgc3RyZWFtLCAnJyldKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHN0cmluZ0NsaWVudE1ldGFkYXRhKG1ldGFkYXRhOiBhbnkpOiBzdHJpbmcge1xuICAgICAgICBpZiAodHlwZW9mIG1ldGFkYXRhICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KG1ldGFkYXRhKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBtZXRhZGF0YTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZ2V0Q29ubmVjdGlvbihjb25uZWN0aW9uSWQ6IHN0cmluZywgZXJyb3JNZXNzYWdlOiBzdHJpbmcpOiBQcm9taXNlPENvbm5lY3Rpb24+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPENvbm5lY3Rpb24+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSB0aGlzLnJlbW90ZUNvbm5lY3Rpb25zW2Nvbm5lY3Rpb25JZF07XG4gICAgICAgICAgICBpZiAoISFjb25uZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSByZW1vdGUgY29ubmVjdGlvblxuICAgICAgICAgICAgICAgIHJlc29sdmUoY29ubmVjdGlvbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvbm5lY3Rpb24uY29ubmVjdGlvbklkID09PSBjb25uZWN0aW9uSWQpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBsb2NhbCBjb25uZWN0aW9uXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUodGhpcy5jb25uZWN0aW9uKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBDb25uZWN0aW9uIG5vdCBmb3VuZC4gUmVqZWN0IHdpdGggT3BlblZpZHVFcnJvclxuICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuR0VORVJJQ19FUlJPUiwgZXJyb3JNZXNzYWdlKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGdldFJlbW90ZUNvbm5lY3Rpb24oY29ubmVjdGlvbklkOiBzdHJpbmcsIGVycm9yTWVzc2FnZTogc3RyaW5nKTogUHJvbWlzZTxDb25uZWN0aW9uPiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxDb25uZWN0aW9uPigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBjb25uZWN0aW9uID0gdGhpcy5yZW1vdGVDb25uZWN0aW9uc1tjb25uZWN0aW9uSWRdO1xuICAgICAgICAgICAgaWYgKCEhY29ubmVjdGlvbikge1xuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgcmVtb3RlIGNvbm5lY3Rpb25cbiAgICAgICAgICAgICAgICByZXNvbHZlKGNvbm5lY3Rpb24pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBSZW1vdGUgY29ubmVjdGlvbiBub3QgZm91bmQuIFJlamVjdCB3aXRoIE9wZW5WaWR1RXJyb3JcbiAgICAgICAgICAgICAgICByZWplY3QobmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuR0VORVJJQ19FUlJPUiwgZXJyb3JNZXNzYWdlKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuXG4gICAgLyogSGlkZGVuIG1ldGhvZHMgKi9cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBvblBhcnRpY2lwYW50Sm9pbmVkKHJlc3BvbnNlOiBDb25uZWN0aW9uT3B0aW9ucykge1xuICAgICAgICAvLyBDb25uZWN0aW9uIHNob3VsZG4ndCBleGlzdFxuICAgICAgICB0aGlzLmdldENvbm5lY3Rpb24ocmVzcG9uc2UuaWQsICcnKVxuXG4gICAgICAgICAgICAudGhlbihjb25uZWN0aW9uID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ0Nvbm5lY3Rpb24gJyArIHJlc3BvbnNlLmlkICsgJyBhbHJlYWR5IGV4aXN0cyBpbiBjb25uZWN0aW9ucyBsaXN0Jyk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKG9wZW5WaWR1RXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBuZXcgQ29ubmVjdGlvbih0aGlzLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdGVDb25uZWN0aW9uc1tyZXNwb25zZS5pZF0gPSBjb25uZWN0aW9uO1xuICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCdjb25uZWN0aW9uQ3JlYXRlZCcsIFtuZXc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lQ29ubmVjdGlvbnMpKSlcblxuICAgICAgICAgICAgLnRoZW4oY29uID0+IHtcbiAgICAgICAgICAgICAgICAvLyBVcGRhdGUgZXhpc3RpbmcgQ29ubmVjdGlvblxuICAgICAgICAgICAgICAgIGNvbm5lY3Rpb24gPSBjb247XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UubWV0YWRhdGEgPSBjb24uZGF0YTtcbiAgICAgICAgICAgICAgICBjb25uZWN0aW9uLm9wdGlvbnMgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICBjb25uZWN0aW9uLmluaXRSZW1vdGVTdHJlYW1zKHJlc3BvbnNlLnN0cmVhbXMpO1xuICAgICAgICAgICAgICAgIGFmdGVyQ29ubmVjdGlvbkZvdW5kKGNvbm5lY3Rpb24pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYXRjaChvcGVuVmlkdUVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgbmV3IENvbm5lY3Rpb25cbiAgICAgICAgICAgICAgICBjb25uZWN0aW9uID0gbmV3IENvbm5lY3Rpb24odGhpcywgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgIGFmdGVyQ29ubmVjdGlvbkZvdW5kKGNvbm5lY3Rpb24pO1xuICAgICAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIG9uUGFydGljaXBhbnRVbnB1Ymxpc2hlZChtc2cpIHtcbiAgICAgICAgdGhpcy5nZXRSZW1vdGVDb25uZWN0aW9uKG1zZy5uYW1lLCBcIlJlbW90ZSBjb25uZWN0aW9uICdcIiArIG1zZy5uYW1lICsgXCInIHVua25vd24gd2hlbiAnb25QYXJ0aWNpcGFudFVucHVibGlzaGVkJy4gXCIgK1xuICAgICAgICAgICAgJ0V4aXN0aW5nIHJlbW90ZSBjb25uZWN0aW9uczogJyArIEpTT04uc3RyaW5naWZ5KE9iamVjdC5rZXlzKHRoaXM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PT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3Iob3BlblZpZHVFcnJvcik7XG4gICAgICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgcmVjdkljZUNhbmRpZGF0ZShtc2cpIHtcbiAgICAgICAgY29uc3QgY2FuZGlkYXRlID0ge1xuICAgICAgICAgICAgY2FuZGlkYXRlOiBtc2cuY2FuZGlkYXRlLFxuICAgICAgICAgICAgc2RwTWlkOiBtc2cuc2RwTWlkLFxuICAgICAgICAgICAgc2RwTUxpbmVJbmRleDogbXNnLnNkcE1MaW5lSW5kZXhcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5nZXRDb25uZWN0aW9uKG1zZy5lbmRwb2ludE5hbWUsICdDb25uZWN0aW9uIG5vdCBmb3VuZCBmb3IgZW5kcG9pbnQgJyArIG1zZy5lbmRwb2ludE5hbWUgKyAnLiBJY2UgY2FuZGlkYXRlIHdpbGwgYmUgaWdub3JlZDogJyArIGNhbmRpZGF0ZSlcblxuICAgICAgICAgICAgLnRoZW4oY29ubmVjdGlvbiA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gY29ubmVjdGlvbi5zdHJlYW07XG4gICAgICAgICAgICAgICAgc3RyZWFtLmdldFdlYlJ0Y1BlZXIoKS5hZGRJY2VDYW5kaWRhdGUoY2FuZGlkYXRlLCAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdFcnJvciBhZGRpbmcgY2FuZGlkYXRlIGZvciAnICsgc3RyZWFtLnN0cmVhbUlkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnIHN0cmVhbSBvZiBlbmRwb2ludCAnICsgbXNnLmVuZHBvaW50TmFtZSArICc6ICcgKyBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2gob3BlblZpZHVFcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihvcGVuVmlkdUVycm9yKTtcbiAgICAgICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBvblNlc3Npb25DbG9zZWQobXNnKSB7XG4gICAgICAgIGNvbnNvbGUuaW5mbygnU2Vzc2lvbiBjbG9zZWQ6ICcgKyBKU09OLnN0cmluZ2lmeShtc2cpKTtcbiAgICAgICAgY29uc3QgcyA9IG1zZy5yb29tO1xuICAgICAgICBpZiAocyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnc2Vzc2lvbi1jbG9zZWQnLCBbe1xuICAgICAgICAgICAgICAgIHNlc3Npb246IHNcbiAgICAgICAgICAgIH1dKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUud2FybignU2Vzc2lvbiB1bmRlZmluZWQgb24gc2Vzc2lvbiBjbG9zZWQnLCBtc2cpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIG9uTG9zdENvbm5lY3Rpb24oKSB7XG5cbiAgICAgICAgaWYgKCF0aGlzLmNvbm5lY3Rpb24pIHtcblxuICAgICAgICAgICAgY29uc29sZS53YXJuKCdOb3QgY29ubmVjdGVkIHRvIHNlc3Npb246IGlmIHlvdSBhcmUgbm90IGRlYnVnZ2luZywgdGhpcyBpcyBwcm9iYWJseSBhIGNlcnRpZmljYXRlIGVycm9yJyk7XG5cbiAgICAgICAgICAgIGNvbnN0IHVybCA9ICdodHRwczovLycgKyB0aGlzLm9wZW52aWR1LmdldFdzVXJpKCkuc3BsaXQoJ3dzczovLycpWzFdLnNwbGl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lkZGVuXG4gICAgICovXG4gICAgZ2V0VmlkZW9FbGVtZW50KCk6IEhUTUxWaWRlb0VsZW1lbnQge1xuICAgICAgICByZXR1cm4gdGhpcy52aWRlbztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgc3Vic2NyaWJlVG9NeVJlbW90ZSgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5pc1N1YnNjcmliZVRvUmVtb3RlID0gdHJ1ZTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgc2V0T3V0Ym91bmRTdHJlYW1PcHRpb25zKG91dGJvdW5kU3RyZWFtT3B0czogT3V0Ym91bmRTdHJlYW1PcHRpb25zKSB7XG4gICAgICAgIHRoaXMub3V0Ym91bmRTdHJlYW1PcHRzID0gb3V0Ym91bmRTdHJlYW1PcHRzO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBzdWJzY3JpYmUoKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIHRoaXMuaW5pdFdlYlJ0Y1BlZXJSZWNlaXZlKClcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBwdWJsaXNoKCk6IFByb21pc2U8YW55PiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc1JlYWR5VG9QdWJsaXNoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbml0V2ViUnRjUGVlclNlbmQoKVxuICAgICAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lZS5vbmNlKCdzdHJlYW0tcmVhZHktdG8tcHVibGlzaCcsIHN0cmVhbUV2ZW50ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wdWJsaXNoKClcbiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBkaXNwb3NlV2ViUnRjUGVlcigpIHtcbiAgICAgICAgaWYgKHRoaXMud2ViUnRjUGVlcikge1xuICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyLmRpc3Bvc2UoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5zcGVlY2hFdmVudCkge1xuICAgICAgICAgICAgdG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zLnZpZGVvLm11dGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLm91dGJvdW5kU3RyZWFtT3B0cy5wdWJsaXNoZXJQcm9wZXJ0aWVzLm1pcnJvcikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm1pcnJvclZpZGVvKHRoaXMudmlkZW8pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMudmlkZW8ub25jYW5wbGF5ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmluZm8oXCJMb2NhbCAnU3RyZWFtJyB3aXRoIGlkIFtcIiArIHRoaXMuc3RyZWFtSWQgKyAnXSB2aWRlbyBpcyBub3cgcGxheWluZycpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW8taXMtcGxheWluZycsIFt7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50OiB0aGlzLnZpZGVvXG4gICAgICAgICAgICAgICAgICAgIH1dKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpZGVvLnRpdGxlID0gdGhpcy5zdHJlYW1JZDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy50YXJnZXRFbGVtZW50ID0gdGFyZ2V0RWxlbWVudDtcbiAgICAgICAgICAgIHRoaXMucGFyZW50SWQgPSB0YXJnZXRFbGVtZW50LmlkO1xuXG4gICAgICAgICAgICBpbnNlcnRNb2RlID0gISFpbnNlcnRNb2RlID8gaW5zZXJ0TW9kZSA6IFZpZGVvSW5zZXJ0TW9kZS5BUFBFTkQ7XG4gICAgICAgICAgICB0aGlzLmluc2VydEVsZW1lbnRXaXRoTW9kZSh0aGlzLnZpZGVvLCBpbnNlcnRNb2RlKTtcblxuICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ3ZpZGVvLWVsZW1l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biAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIGRpc2FibGVTcGVha2luZ0V2ZW50cygpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5zcGVlY2hFdmVudC5zdG9wKCk7XG4gICAgICAgIHRoaXMuc3BlZWNoRXZlbnQgPSB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBpbml0V2ViUnRjUGVlclNlbmQoKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgICAgICAgY29uc3QgdXNlck1lZGlhQ29uc3RyYWludHMgPSB7XG4gICAgICAgICAgICAgICAgYXVkaW86IHRoaXMuaXNTZW5kQXVkaW8oKSxcbiAgICAgICAgICAgICAgICB2aWRlbzogdGhpcy5pc1NlbmRWaWRlbygpXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjb25zdCBvcHRpb25zOiBhbnkgPSB7XG4gICAgICAgICAgICAgICAgdmlkZW9TdHJlYW06IHRoaXMubWVkaWFTdHJlYW0sXG4gICAgICAgICAgICAgICAgbWVkaWFDb25zdHJhaW50czogdXNlck1lZGlhQ29uc3RyYWludHMsXG4gICAgICAgICAgICAgICAgb25pY2VjYW5kaWRhdGU6IHRoaXMuY29ubmVjdGlvbi5zZW5kSWNlQ2FuZGlkYXRlLmJpbmQodGhpcy5jb25uZWN0aW9uKSxcbiAgICAgICAgICAgICAgICBpY2VTZXJ2ZXJzOiB0aGlzLnNlc3Npb24ub3BlbnZpZHUuYWR2YW5jZWRDb25maWd1cmF0aW9uLmljZVNlcnZlcnNcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHN1Y2Nlc3NDYWxsYmFjayA9IChlcnJvciwgc2RwT2ZmZXJQYXJhbSwgd3ApID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoZ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lbzogJyArIEpTT04uc3RyaW5naWZ5KGVycm9yKSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByb2Nlc3NTZHBBbnN3ZXIocmVzcG9uc2Uuc2RwQW5zd2VyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ3N0cmVhbS1jcmVhdGVkLWJ5LXB1Ymxpc2hlcicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKFwiJ1B1Ymxpc2hlcicgc3VjY2Vzc2Z1bGx5IHB1Ymxpc2hlZCB0byBzZXNzaW9uXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAodGhpcy5kaXNwbGF5TXlSZW1vdGUoKSkge1xuICAgICAgICAgICAgICAgIHRoaXMud2ViUnRjUGVlciA9IGt1cmVudG9VdGlscy5XZWJSdGNQZWVyLldlYlJ0Y1BlZXJTZW5kcmVjdihvcHRpb25zLCBlcnIgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aGlzLndlYlJ0Y1BlZXIuZ2VuZXJhdGVPZmZlcihzdWNjZXNzQ2FsbGJhY2spO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLndlYlJ0Y1BlZXIgPSBrdXJlbnRvVXRpbHMuV2ViUnRjUGVlci5XZWJSdGNQZWVyU2VuZG9ubHkob3B0aW9ucywgZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyLmdlbmVyYXRlT2ZmZXIoc3VjY2Vzc0NhbGxiYWNrKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuaXNQdWJsaXNoZXJQdWJsaXNoZWQgPSB0cnVlO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGluaXRXZWJSdGNQZWVyUmVjZWl2ZSgpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgICAgICAgY29uc3Qgb2ZmZXJDb25zdHJhaW50cyA9IHtcbiAgICAgICAgICAgICAgICBhdWRpbzogdGhpcy5pbmJvdW5kU3RyZWFtT3B0cy5yZWN2QXVkaW8sXG4gICAgICAgICAgICAgICAgdmlkZW86IHRoaXMuaW5ib3VuZFN0cmVhbU9wdHMucmVjdlZpZGVvXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgY29uc29sZS5kZWJ1ZyhcIidTZXNzaW9uLnN1YnNjcmliZShTdHJlYW0pJyBjYWxsZWQuIENvbnN0cmFpbnRzIG9mIGdlbmVyYXRlIFNEUCBvZmZlclwiLFxuICAgICAgICAgICAgICAgIG9mZmVyQ29uc3RyYWludHMpO1xuICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHtcbiAgICAgICAgICAgICAgICBvbmljZWNhbmRpZGF0ZTogdGhpcy5jb25uZWN0aW9uLnNlbmRJY2VDYW5kaWRhdGUuYmluZCh0aGlzLmNvbm5lY3Rpb24pLFxuICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHM6IG9mZmVyQ29uc3RyYWludHNcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHN1Y2Nlc3NDYWxsYmFjayA9IChlcnJvciwgc2RwT2ZmZXJQYXJhbSwgd3ApID0+IHtcblxuICAgICAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKCcoc3Vic2NyaWJlKSBTRFAgb2ZmZXIgZXJyb3I6ICcgKyBKU09OLnN0cmluZ2lmeShlcnJvcikpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc29sZS5kZWJ1ZygnU2VuZGluZyBTRFAgb2ZmZXIgdG8gc3Vic2NyaWJlIHRvICdcbiAgICAgICAgICAgICAgICAgICAgKyB0aGlzLnN0cmVhbUlkLCBzZHBPZmZlclBhcmFtKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNlc3Npb24ub3BlbnZpZHUuc2VuZFJlcXVlc3QoJ3JlY2VpdmVWaWRlb0Zyb20nLCB7XG4gICAgICAgICAgICAgICAgICAgIHNlbmRlcjogdGhpcy5zdHJlYW1JZCxcbiAgICAgICAgICAgICAgICAgICAgc2RwT2ZmZXI6IHNkcE9mZmVyUGFyYW1cbiAgICAgICAgICAgICAgICB9LCAoZXJyb3IsIHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcignRXJyb3Igb24gcmVjdlZpZGVvRnJvbTogJyArIEpTT04uc3RyaW5naWZ5KGVycm9yKSkpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzU2RwQW5zd2VyKHJlc3BvbnNlLnNkcEFuc3dlcikudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyID0ga3VyZW50b1V0aWxzLldlYlJ0Y1BlZXIuV2ViUnRjUGVlclJlY3Zvbmx5KG9wdGlvbnMsIGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyLmdlbmVyYXRlT2ZmZXIoc3VjY2Vzc0NhbGxiYWNrKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHByb2Nlc3NTZHBBbnN3ZXIoc2RwQW5zd2VyKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGFuc3dlciA9IG5ldyBSVENTZXNzaW9uRGVzY3JpcHRpb24oe1xuICAgICAgICAgICAgICAgIHR5cGU6ICdhbnN3ZXInLFxuICAgICAgICAgICAgICAgIHNkcDogc2RwQW5zd2VyLFxuICAgICAgICAgICAgfSk7XG5cbiAgICAg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xlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZW5hYmxlU3BlYWtpbmdFdmVudHMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICghIXRoaXMudmlkZW8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxldCB0aHVtYm5haWxJZCA9IHRoaXMudmlkZW8udGh1bWI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZGVvLm9uY2FucGxheSA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5pc0xvY2FsKCkgJiYgdGhpcy5kaXNwbGF5TXlSZW1vdGUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmluZm8oXCJZb3VyIG93biByZW1vdGUgJ1N0cmVhbScgd2l0aCBpZCBbXCIgKyB0aGlzLnN0cmVhbUlkICsgJ10gdmlkZW8gaXMgbm93IHBsYXlpbmcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ3JlbW90ZS12aWRlby1pcy1wbGF5aW5nJywgW3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQ6IHRoaXMudmlkZW9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoIXRoaXMuaXNMb2NhbCgpICYmICF0aGlzLmRpc3BsYXlNeVJlbW90ZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbyhcIlJlbW90ZSAnU3RyZWFtJyB3aXRoIGlkIFtcIiArIHRoaXMuc3RyZWFtSWQgKyAnXSB2aWRlbyBpcyBub3cgcGxheWluZycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW8taXMtcGxheWluZycsIFt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50OiB0aGlzLnZpZGVvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hvdyh0aHVtYm5haWxJZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhpcy5oaWRlU3Bpbm5lcih0aGlzLnN0cmVhbUlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXNzaW9uLmVtaXRFdmVudCgnc3RyZWFtLXN1YnNjcmliZWQnLCBbe1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtOiB0aGlzXG4gICAgICAgICAgICAgICAgICAgIH1dKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLmluaXRXZWJSdGNTdGF0cygpO1xuICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcblxuICAgICAgICAgICAgfSwgZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IodGhpcy5zdHJlYW1JZCArICc6IEVycm9yIHNldHRpbmcgU0RQIHRvIHRoZSBwZWVyIGNvbm5lY3Rpb246ICcgKyBKU09OLnN0cmluZ2lmeShlcnJvcikpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGluaXRXZWJSdGNTdGF0cygpOiB2b2lkIHtcbiAgICAgICAgdGhpcy53ZWJSdGNTdGF0cyA9IG5ldyBXZWJSdGNTdGF0cyh0aGlzKTtcbiAgICAgICAgdGhpcy53ZWJSdGNTdGF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ICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFZpZGVvSW5zZXJ0TW9kZS5CRUZPUkU6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0RWxlbWVudC5wYXJlbnROb2RlISEuaW5zZXJ0QmVmb3JlKGVsZW1lbnQsIHRoaXMudGFyZ2V0RWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgVmlkZW9JbnNlcnRNb2RlLlBSRVBFTkQ6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0RWxlbWVudC5pbnNlcnRCZWZvcmUoZWxlbWVudCwgdGhpcy50YXJnZXRFbGVtZW50LmNoaWxkTm9kZXNbMF0pO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFZpZGVvSW5zZXJ0TW9kZS5SRVBMQUNFOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRhcmdldEVsZW1lbnQucGFyZW50Tm9kZSEhLnJlcGxhY2VDaGlsZChlbGVtZW50LCB0aGlzLnRhcmdldEVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmluc2VydEVsZW1lbnRXaXRoTW9kZShlbGVtZW50LCBWaWRlb0luc2VydE1vZGUuQVBQRU5EKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgbWlycm9yVmlkZW8odmlkZW86IEhUTUxWaWRlb0VsZW1lbnQpOiB2b2lkIHtcbiAgICAgICAgdmlkZW8uc3R5bGUudHJhbnNmb3JtID0gJ3JvdGF0ZVkoMTgwZGVnKSc7XG4gICAgICAgIHZpZGVvLnN0eWxlLndlYmtpdFRyYW5zZm9ybSA9ICdyb3RhdGVZKDE4MGRlZyknO1xu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bHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmVhbS5vbmNlKCd2aWRlby1lbGVtZW50LWNyZWF0ZWQtYnktc3RyZWFtJywgZWxlbWVudCA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaWQgPSBlbGVtZW50LmlkO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9FbGVtZW50Q3JlYXRlZCcsIFtuZXcgVmlkZW9FbGVtZW50RXZlbnQoZWxlbWVudCwgdGhpcywgJ3ZpZGVvRWxlbWVudENyZWF0ZWQnKV0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSAndmlkZW9QbGF5aW5nJykge1xuICAgICAgICAgICAgY29uc3QgdmlkZW8gPSB0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKTtcbiAgICAgICAgICAgIGlmICghdGhpcy5zdHJlYW0uZGlzcGxheU15UmVtb3RlKCkgJiYgdmlkZW8gJiZcbiAgICAgICAgICAgICAgICB2aWRlby5jdXJyZW50VGltZSA+IDAgJiZcbiAgICAgICAgICAgICAgICB2aWRlby5wYXVzZWQgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgdmlkZW8uZW5kZWQgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgdmlkZW8ucmVhZHlTdGF0ZSA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCd2aWRlb1BsYXlpbmcnLCBbbmV3IFZpZGVvRWxlbWVudEV2ZW50KHRoaXMuc3RyZWFtLmdldFZpZGVvRWxlbWVudCgpLCB0aGlzLCAndmlkZW9QbGF5aW5nJyldKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0ub25jZSgndmlkZW8taXMtcGxheWluZycsIChlbGVtZW50KSA9PiB7X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gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgIExvZ2dlci5lcnJvcignRXhjZXB0aW9uIHByb2Nlc3NpbmcgcmVxdWVzdDogJyArIEpTT04uc3RyaW5naWZ5KHJlcXVlc3QpKTtcbiAgICAgICAgICAgICAgICBMb2dnZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICB0aGlzLnNlbmQgPSBmdW5jdGlvbihtZXRob2QsIHBhcmFtcywgY2FsbGJhY2spIHtcbiAgICAgICAgaWYgKG1ldGhvZCAhPT0gJ3BpbmcnKSB7XG4gICAgICAgICAgICBMb2dnZXIuZGVidWcoJ1JlcXVlc3Q6IG1ldGhvZDonICsgbWV0aG9kICsgXCIgcGFyYW1zOlwiICsgSlNPTi5zdHJpbmdpZnkocGFyYW1zKSk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcmVxdWVzdFRpbWUgPSBEYXRlLm5vdygpO1xuXG4gICAgICAgIHJwYy5lbmNvZGUobWV0aG9kLCBwYXJhbXMsIGZ1bmN0aW9uKGVycm9yLCByZXN1bHQpIHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIExvZ2dlci5lcnJvcihcIkVSUk9SOlwiICsgZXJyb3IubWVzc2FnZSArIFwiIGluIFJlcXVlc3Q6IG1ldGhvZDpcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2QgKyBcIiBwYXJhbXM6XCIgKyBKU09OLnN0cmluZ2lmeShwYXJhbXMpICsgXCIgcmVxdWVzdDpcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvci5yZXF1ZXN0KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLmRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIExvZ2dlci5lcnJvcihcIkVSUk9SIERBVEE6XCIgKyBKU09OLnN0cmluZ2lmeShlcnJvci5kYXRhKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxuICAgICAgICAgICAgICAgIGVycm9yLnJlcXVlc3RUaW1lID0gcmVxdWVzdFRpbWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0ICE9IHVuZGVmaW5lZCAmJiByZXN1bHQudmFsdWUgIT09ICdwb25nJykge1xuICAgICAgICAgICAgICAgICAgICBMb2dnZXIuZGVidWcoJ1Jlc3BvbnNlOiAnICsgSlNPTi5zdHJpbmdpZnkocmVzdWx0KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVycm9yLCByZXN1bHQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiB1cGRhdGVOb3RSZWNvbm5lY3RJZkxlc3NUaGFuKCkge1xuICAgICAgICBMb2dnZXIuZGVidWcoXCJub3RSZWNvbm5lY3RJZk51bUxlc3NUaGFuID0gXCIgKyBwaW5nTmV4dE51bSArICcgKG9sZD0nICtcbiAgICAgICAgICAgIG5vdFJlY29ubmVjdElmTnVtTGVzc1RoYW4gKyAnKScpO1xuICAgICAgICBub3RSZWNvbm5lY3RJZk51bUxlc3NUaGFuID0gcGluZ05leHROdW07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2VuZFBpbmcoKSB7XG4gICAgICAgIGlmIChlbmFibGVkUGluZ3MpIHtcbiAgICAgICAgICAgIHZhciBwYXJhbXMgPSBudWxsO1xuICAgICAgICAgICAgaWYgKHBpbmdOZXh0TnVtID09IDAgfHwgcGluZ05leHROdW0gPT0gbm90UmVjb25uZWN0SWZOdW1MZXNzVGhhbikge1xuICAgICAgICAgICAgICAgIHBhcmFtcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWw6IGNvbmZpZ3VyYXRpb24uaGVhcnRiZWF0IHx8IFBJTkdfSU5URVJWQUxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcGluZ05leHROdW0rKztcblxuICAgICAgICAgICAgc2VsZi5zZW5kKCdwaW5nJywgcGFyYW1zLCAoZnVuY3Rpb24ocGluZ051bSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbihlcnJvciwgcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgTG9nZ2VyLmRlYnVnKFwiRXJyb3IgaW4gcGluZyByZXF1ZXN0ICNcIiArIHBpbmdOdW0gKyBcIiAoXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLm1lc3NhZ2UgKyBcIilcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGluZ051bSA+IG5vdFJlY29ubmVjdElmTnVtTGVzc1RoYW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkUGluZ3MgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVOb3RSZWNvbm5lY3RJZkxlc3NUaGFuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTG9nZ2VyLmRlYnVnKFwiU2VydmVyIGRpZCBub3QgcmVzcG9uZCB0byBwaW5nIG1lc3NhZ2UgI1wiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGluZ051bSArIFwiLiBSZWNvbm5lY3RpbmcuLi4gXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdzLnJlY29ubmVjdFdzKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KShwaW5nTmV4dE51bSkpO1xu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sgXCIsIG1heD1cIiArIG1heFJldHJpZXMgKyBcIilcIik7XG5cbiAgICAgICAgaWYgKG51bVJldHJpZXMgPT09IDEpIHtcbiAgICAgICAgICAgIGlmIChyZWNvbm5lY3RpbmcpIHtcbiAgICAgICAgICAgICAgICBMb2dnZXIud2FybihcIlRyeWluZyB0byByZWNvbm5lY3RUb05ld1VyaSB3aGVuIHJlY29ubmVjdGluZy4uLiBJZ25vcmluZyB0aGlzIHJlY29ubmVjdGlvbi5cIilcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlY29ubmVjdGluZyA9IHRydWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjb25maWcub25yZWNvbm5lY3RpbmcpIHtcbiAgICAgICAgICAgICAgICBjb25maWcub25yZWNvbm5lY3RpbmcoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmb3JjaW5nRGlzY29ubmVjdGlvbikge1xuICAgICAgICAgICAgcmVjb25uZWN0VG9OZXdVcmkobWF4UmV0cmllcywgbnVtUmV0cmllcywgd3NVcmkpO1xuXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoY29uZmlnLm5ld1dzVXJpT25SZWNvbm5lY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBjb25maWcubmV3V3NVcmlPblJlY29ubmVjdGlvbihmdW5jdGlvbihlcnJvciwgbmV3V3NVcmkpIHtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIExvZ2dlci5kZWJ1ZyhlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29ubmVjdFRvU2FtZVVyaShtYXhSZXRyaWVzLCBudW1SZXRyaWVzICsgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBSRVRSWV9USU1FX01TKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlY29ubmVjdFRvTmV3VXJpKG1heFJldHJpZXMsIG51bVJldHJpZXMsIG5ld1dzVXJpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlY29ubmVjdFRvTmV3VXJpKG1heFJldHJpZXMsIG51bVJldHJpZXMsIHdzVXJpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIFRPRE8gVGVzdCByZXRyaWVzLiBIb3cgdG8gZm9yY2Ugbm90IGNvbm5lY3Rpb24/XG4gICAgZnVuY3Rpb24gcmVjb25uZWN0VG9OZXdVcmkobWF4UmV0cmllcywgbnVtUmV0cmllcywgcmVjb25uZWN0V3NVcmkpIHtcbiAgICAgICAgTG9nZ2VyLmRlYnVnKFwiUmVjb25uZWN0aW9uIGF0dGVtcHQgI1wiICsgbnVtUmV0cmllcyk7XG5cbiAgICAgICAgd3MuY2xvc2UoKTtcblxuICAgICAgICB3c1VyaSA9IHJlY29ubmVjdFdzVXJpIHx8IHdzVXJpO1xuXG4gICAgICAgIHZhciBuZXdXcztcbiAgICAgICAgaWYgKHVzZVNvY2tKUykge1xuICAgICAgICAgICAgbmV3V3MgPSBuZXcgU29ja0pTKHdzVXJpKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5ld1dzID0gbmV3IFdlYlNvY2tldCh3c1VyaSk7XG4gICAgICAgIH1cblxuICAgICAgICBuZXdXcy5vbm9wZW4gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIExvZ2dlci5kZWJ1ZyhcIlJlY29ubmVjdGVkIGFmdGVyIFwiICsgbnVtUmV0cmllcyArIFwiIGF0dGVtcHRzLi4uXCIpO1xuICAgICAgICAgICAgbG9nQ29ubmVjdGVkKG5ld1dzLCB3c1VyaSk7XG4gICAgICAgICAgICByZWNvbm5lY3RpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIHJlZ2lzdGVyTWVzc2FnZUhhbmRsZXIoKTtcbiAgICAgICAgICAgIGlmIChjb25maWcub25yZWNvbm5lY3RlZCgpKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLm9ucmVjb25uZWN0ZWQoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbmV3V3Mub25jbG9zZSA9IHJlY29ubmVjdGlvbk9uQ2xvc2U7XG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIG9uRXJyb3JPckNsb3NlID0gZnVuY3Rpb24oZXJyb3IpIHtcbiAgICAgICAgICAgIExvZ2dlci53YXJuKFwiUmVjb25uZWN0aW9uIGVycm9yOiBcIiwgZXJyb3IpO1xuXG4gICAgICAgICAgICBpZiAobnVtUmV0cmllcyA9PT0gbWF4UmV0cmllcykge1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcub25kaXNjb25uZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5vbmRpc2Nvbm5lY3QoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29ubmVjdFRvU2FtZVVyaShtYXhSZXRyaWVzLCBudW1SZXRyaWVzICsgMSk7XG4gICAgICAgICAgICAgICAgfSwgUkVUUllfVElNRV9NUyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgbmV3V3Mub25lcnJvciA9IG9uRXJyb3JPckNsb3NlO1xuXG4gICAgICAgIHdzID0gbmV3V3M7XG4gICAgfVxuXG4gICAgdGhpcy5jbG9zZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB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mLnBlZXJJRCAhPSB1bmRlZmluZWQpXG4gICAgICAgIHtcbiAgICAgICAgICBpZihlcnJvcilcbiAgICAgICAgICAgIGVycm9yLmZyb20gPSBzZWxmLnBlZXJJRDtcbiAgICAgICAgICBlbHNlXG4gICAgICAgICAgICByZXN1bHQuZnJvbSA9IHNlbGYucGVlcklEO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gUHJvdG9jb2wgaW5kaWNhdGVzIHRoYXQgcmVzcG9uc2VzIGhhcyBvd24gcmVxdWVzdCBtZXRob2RzXG4gICAgICAgIGlmKHJlc3BvbnNlTWV0aG9kKVxuICAgICAgICB7XG4gICAgICAgICAgaWYocmVzcG9uc2VNZXRob2QuZXJyb3IgPT0gdW5kZWZpbmVkICYmIGVycm9yKVxuICAgICAgICAgICAgbWVzc2FnZSA9XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGVycm9yOiBlcnJvclxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgIGVsc2VcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgbWV0aG9kID0gZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgPyByZXNwb25zZU1ldGhvZC5lcnJvclxuICAgICAgICAgICAgICAgICAgICAgICA6IHJlc3BvbnNlTWV0aG9kLnJlc3BvbnNlO1xuXG4gICAgICAgICAgICBtZXNzYWdlID1cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgbWV0aG9kOiBtZXRob2QsXG4gICAgICAgICAgICAgIHBhcmFtczogZXJyb3IgfHwgcmVzdWx0XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgICAgbWVzc2FnZSA9XG4gICAgICAgICAge1xuICAgICAgICAgICAgZXJyb3I6ICBlcnJvcixcbiAgICAgICAgICAgIHJlc3VsdDogcmVzdWx0XG4gICAgICAgICAgfTtcblxuICAgICAgICBtZXNzYWdlID0gcGFja2VyLnBhY2sobWVzc2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xuICAgIH1cbiAgICBlbHNlIG5hdmlnYXRvci53ZWJraXRHZXRVc2VyTWVkaWEoc2NyZWVuX2NvbnN0cmFpbnRzLCBvblN1Y2Nlc3MsIG9uRmFpbHVyZSk7XG59KTtcbiovXG5cbndpbmRvdy5nZXRTY3JlZW5JZCA9IGZ1bmN0aW9uIChjYWxsYmFjaykge1xuICAgIC8vIGZvciBGaXJlZm94OlxuICAgIC8vIHNvdXJjZUlkID09ICdmaXJlZm94J1xuICAgIC8vIHNjcmVlbl9jb25zdHJhaW50cyA9IHsuLi59XG4gICAgaWYgKCEhbmF2aWdhdG9yLm1vekdldFVzZXJNZWRpYSkge1xuICAgICAgICBjYWxsYmFjayhudWxsLCAnZmlyZWZveCcsIHtcbiAgICAgICAgICAgIHZpZGVvOiB7XG4gICAgICAgICAgICAgICAgbW96TWVkaWFTb3VyY2U6ICd3aW5kb3cnLFxuICAgICAgICAgICAgICAgIG1lZGlhU291cmNlOiAnd2luZG93J1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdtZXNzYWdlJywgb25JRnJhbWVDYWxsYmFjayk7XG5cbiAgICBmdW5jdGlvbiBvbklGcmFtZUNhbGxiYWNrKGV2ZW50KSB7XG4gICAgICAgIGlmICghZXZlbnQuZGF0YSkgcmV0dXJuO1xuXG4gICAgICAgIGlmIChldmVudC5kYXRhLmNocm9tZU1lZGlhU291cmNlSWQpIHtcbiAgICAgICAgICAgIGlmIChldmVudC5kYXRhLmNocm9tZU1lZGlhU291cmNlSWQgPT09ICdQZXJtaXNzaW9uRGVuaWVkRXJyb3InKSB7XG4gICAgICAgICAgICAgICAgY2FsbGJhY2soJ3Blcm1pc3Npb24tZGVuaWVkJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrKG51bGwsIGV2ZW50LmRhdGEuY2hyb21l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ICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcHJvbWlzZS50aGVuKCgpID0+XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSgpXG4gICAgICAgICAgICApLmNhdGNoKGVycm9yID0+XG4gICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH0pO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYWRhcHRQdWJsaXNoZXJQcm9wZXJ0aWVzKHByb3BlcnRpZXM6IGFueSk6IFB1Ymxpc2hlclByb3BlcnRpZXMge1xuICAgIGNvbnNvbGUud2FybihcIkRFUFJFQ0FUSU9OIFdBTklORzogSW4gZnV0dXJlIHJlbGVhc2VzIHRoZSBwcm9wZXJ0aWVzIHBhc3NlZCB0byAnT3BlblZpZHUuaW5pdFB1Ymxpc2hlcicgbWV0aG9kIG11c3QgbWF0Y2ggUHVibGlzaGVyUHJvcGVydGllcyBpbnRlcmZhY2VcIik7XG5cbiAgICBjb25zdCBzY3I6IGJvb2xlYW4gPSAodHlwZW9mIHByb3BlcnRpZXMuc2NyZWVuICE9PSAndW5kZWZpbmVkJyAmJiBwcm9wZXJ0aWVzLnNjcmVlbiA9PT0gdHJ1ZSk7XG4gICAgbGV0IHJlcyA9ICcnO1xuICAgIGlmICh0eXBlb2YgcHJvcGVydGllcy5xdWFsaXR5ID09PSAnc3RyaW5nJykge1xuICAgICAgICBzd2l0Y2ggKHByb3BlcnRpZXMucXVhbGl0eSkge1xuICAgICAgICAgICAgY2FzZSAnTE9XJzpcbiAgICAgICAgICAgICAgICByZXMgPSAnMzIweDI0MCc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdNRURJVU0nOlxuICAgICAgICAgICAgICAgIHJlcyA9ICc2NDB4NDgwJztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ0hJR0gnOlxuICAgICAgICAgICAgICAgIHJlcyA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c1JlY2VpdmVkOiAwLFxuICAgICAgICAgICAgICAgIHBhY2tldHNSZWNlaXZlZDogMCxcbiAgICAgICAgICAgICAgICBwYWNrZXRzTG9zdDogMFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHZpZGVvOiB7XG4gICAgICAgICAgICAgICAgYnl0ZXNSZWNlaXZlZDogMCxcbiAgICAgICAgICAgICAgICBwYWNrZXRzUmVjZWl2ZWQ6IDAsXG4gICAgICAgICAgICAgICAgcGFja2V0c0xvc3Q6IDAsXG4gICAgICAgICAgICAgICAgZnJhbWVzRGVjb2RlZDogMCxcbiAgICAgICAgICAgICAgICBuYWNrQ291bnQ6IDBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgb3V0Ym91bmQ6IHtcbiAgICAgICAgICAgIGF1ZGlvOiB7XG4gICAgICAgICAgICAgICAgYnl0ZXNTZW50OiAwLFxuICAgICAgICAgICAgICAgIHBhY2tldHNTZW50OiAwLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHZpZGVvOiB7XG4gICAgICAgICAgICAgICAgYnl0ZXNTZW50OiAwLFxuICAgICAgICAgICAgICAgIHBhY2tldHNTZW50OiAwLFxuICAgICAgICAgICAgICAgIGZyYW1lc0VuY29kZWQ6IDAsXG4gICAgICAgICAgICAgICAgbmFja0NvdW50OiAwXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgY29uc3RydWN0b3IocHJpdmF0ZSBzdHJlYW06IFN0cmVhbSkgeyB9XG5cbiAgICBwdWJsaWMgaXNFbmFibGVkKCk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gdGhpcy53ZWJSdGNTdGF0c0VuYWJsZWQ7XG4gICAgfVxuXG4gICAgcHVibGljIGluaXRXZWJSdGNTdGF0cygpOiB2b2lkIHtcblxuICAgICAgICBjb25zdCBlbGFzdGVzdEluc3RydW1lbnRhdGlvbiA9IGxvY2FsU3RvcmFnZS5nZXRJdGVt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F0dXMgPT09IDIwMCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnV2ViUnRjIHN0YXRzIHN1Y2Nlc3NmdWxseSBzZW50IHRvICcgKyB1cmwgKyAnIGZvciBzdHJlYW0gJyArIHRoaXMuc3RyZWFtLnN0cmVhbUlkICsgJyBvZiBjb25uZWN0aW9uICcgKyB0aGlzLnN0cmVhbS5jb25uZWN0aW9uLmNvbm5lY3Rpb25JZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGh0dHAuc2VuZChqc29uKTtcbiAgICAgICAgfTtcblxuICAgICAgICBjb25zdCBmID0gKHN0YXRzKSA9PiB7XG5cbiAgICAgICAgICAgIGlmIChwbGF0Zm9ybS5uYW1lIS5pbmRleE9mKCdGaXJlZm94JykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgc3RhdHMuZm9yRWFjaCgoc3RhdCkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIGxldCBqc29uID0ge307XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKChzdGF0LnR5cGUgPT09ICdpbmJvdW5kLXJ0cCcpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXZvaWQgZmlyZWZveCBlbXB0eSBvdXRib3VuZC1ydHAgc3RhdGlzdGljc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXQubmFja0NvdW50ICE9PSBudWxsICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdC5pc1JlbW90ZSA9PT0gZmFsc2UgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0LmlkLnN0YXJ0c1dpdGgoJ2luYm91bmQnKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXQucmVtb3RlSWQuc3RhcnRzV2l0aCgnaW5ib3VuZCcpXG4gICAgICAgICAgICAgICAgICAgICAgICApKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY0lkID0gJ3dlYnJ0Y19pbmJvdW5kXycgKyBzdGF0Lm1lZGlhVHlwZSArICdfJyArIHN0YXQuc3NyYztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGppdCA9IHN0YXQuaml0dGVyICogMTAwMDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWV0cmljcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1JlY2VpdmVkOiAoc3RhdC5ieXRlc1JlY2VpdmVkIC0gdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5ieXRlc1JlY2VpdmVkKSAvIHRoaXMuc3RhdHNJbnRlcnZhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqaXR0ZXI6IGppdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzUmVjZWl2ZWQ6IChzdGF0LnBhY2tldHNSZWNlaXZlZCAtIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c1JlY2VpdmVkKSAvIHRoaXMuc3RhdHNJbnRlcnZhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzTG9zdDogKHN0YXQucGFja2V0c0xvc3QgLSB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNMb3N0KSAvIHRoaXMuc3RhdHNJbnRlcnZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVuaXRzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzUmVjZWl2ZWQ6ICdieXRlcycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaml0dGVyOiAnbXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tldHNSZWNlaXZlZDogJ3BhY2tldHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tldHNMb3N0OiAncGFja2V0cydcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdC5tZWRpYVR5cGUgPT09ICd2aWRlbycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRyaWNzWydmcmFtZXNEZWNvZGVkJ10gPSAoc3RhdC5mcmFtZXNEZWNvZGVkIC0gdGhpcy5zdGF0cy5pbmJvdW5kLnZpZGVvLmZyYW1lc0RlY29kZWQpIC8gdGhpcy5zdGF0c0ludGVydmFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3NbJ25hY2tDb3VudCddID0gKHN0YXQubmFja0NvdW50IC0gdGhpcy5zdGF0cy5pbmJvdW5kLnZpZGVvLm5hY2tDb3VudCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pdHNbJ2ZyYW1lc0RlY29kZWQnXSA9ICdmcmFtZXMnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaXRzWyduYWNrQ291bnQnXSA9ICdwYWNrZXRzJztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5mcmFtZXNEZWNvZGVkID0gc3RhdC5mcmFtZXNEZWNvZGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5uYWNrQ291bnQgPSBzdGF0Lm5hY2tDb3VudDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5ieXRlc1JlY2VpdmVkID0gc3RhdC5ieXRlc1JlY2VpdmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5wYWNrZXRzUmVjZWl2ZWQgPSBzdGF0LnBhY2tldHNSZWNlaXZlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c0xvc3QgPSBzdGF0LnBhY2tldHNMb3N0O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBqc29uID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdAdGltZXN0YW1wJzogbmV3IERhdGUoc3RhdC50aW1lc3RhbXApLnRvSVNPU3RyaW5nKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2V4ZWMnOiBpbnN0cnVtZW50YXRpb24uZXhlYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29tcG9uZW50JzogaW5zdHJ1bWVudGF0aW9uLmNvbXBvbmVudCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RyZWFtJzogJ3dlYlJ0YycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3R5cGUnOiBtZXRyaWNJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RyZWFtX3R5cGUnOiAnY29tcG9zZWRfbWV0cmljcycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VuaXRzJzogdW5pdHNcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBqc29uW21ldHJpY0lkXSA9IG1ldHJpY3M7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRQb3N0KEpTT04uc3RyaW5naWZ5KGpzb24pKTtcblxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChzdGF0LnR5cGUgPT09ICdvdXRib3VuZC1ydHAnKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEF2b2lkIGZpcmVmb3ggZW1wdHkgaW5ib3VuZC1ydHAgc3RhdGlzdGljc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXQuaXNSZW1vdGUgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdC5pZC50b0xvd2VyQ2FzZSgpLmluY2x1ZGVzKCdvdXRib3VuZCcpXG4gICAgICAgICAgICAgICAgICAgICAgICApKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY0lkID0gJ3dlYnJ0Y19vdXRib3VuZF8nICsgc3RhdC5tZWRpYVR5cGUgKyAnXycgKyBzdGF0LnNzcmM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY3MgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNTZW50OiAoc3RhdC5ieXRlc1NlbnQgLSB0aGlzLnN0YXRzLm91dGJvdW5kW3N0YXQubWVkaWFUeXBlXS5ieXRlc1NlbnQpIC8gdGhpcy5zdGF0c0ludGVydmFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tldHNTZW50OiAoc3RhdC5wYWNrZXRzU2VudCAtIHRoaXMuc3RhdHMub3V0Ym91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNTZW50KSAvIHRoaXMuc3RhdHNJbnRlcnZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVuaXRzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzU2VudDogJ2J5dGVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzU2VudDogJ3BhY2tldHMnXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXQubWVkaWFUeXBlID09PSAndmlkZW8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljc1snZnJhbWVzRW5jb2RlZCddID0gKHN0YXQuZnJhbWVzRW5jb2RlZCAtIHRoaXMuc3RhdHMub3V0Ym91bmQudmlkZW8uZnJhbWVzRW5jb2RlZCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pdHNbJ2ZyYW1lc0VuY29kZWQnXSA9ICdmcmFtZXMnO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5vdXRib3VuZC52aWRlby5mcmFtZXNFbmNvZGVkID0gc3RhdC5mcmFtZXNFbmNvZGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLm91dGJvdW5kW3N0YXQubWVkaWFUeXBlXS5ieXRlc1NlbnQgPSBzdGF0LmJ5dGVzU2VudDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMub3V0Ym91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNTZW50ID0gc3RhdC5wYWNrZXRzU2VudDtcblxuICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQHRpbWVzdGFtcCc6IG5ldyBEYXRlKHN0YXQudGltZXN0YW1wKS50b0lTT1N0cmluZygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleGVjJzogaW5zdHJ1bWVudGF0aW9uLmV4ZWMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbXBvbmVudCc6IGluc3RydW1lbnRhdGlvbi5jb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmVhbSc6ICd3ZWJSdGMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogbWV0cmljSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmVhbV90eXBlJzogJ2NvbXBvc2VkX21ldHJpY3MnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1bml0cyc6IHVuaXRzXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAganNvblttZXRyaWNJZF0gPSBtZXRyaWNzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBzZW5kUG9zdChKU09OLnN0cmluZ2lmeShqc29uKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocGxhdGZvcm0ubmFtZSEuaW5kZXhPZignQ2hyb21lJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgb2YgT2JqZWN0LmtleXMoc3RhdHMpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0YXQgPSBzdGF0c1trZXldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdC50eXBlID09PSAnc3NyYycpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGpzb24gPSB7fTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCdieXRlc1JlY2VpdmVkJyBpbiBzdGF0ICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RhdC5tZWRpYVR5cGUgPT09ICdhdWRpbycgJiYgJ2F1ZGlvT3V0cHV0TGV2ZWwnIGluIHN0YXQpIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0YXQubWVkaWFUeXBlID09PSAndmlkZW8nICYmICdxcFN1bScgaW4gc3RhdClcbiAgICAgICAgICAgICAgICAgICAgICAgICkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmJvdW5kLXJ0cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY0lkID0gJ3dlYnJ0Y19pbmJvdW5kXycgKyBzdGF0Lm1lZGlhVHlwZSArICdfJyArIHN0YXQuc3NyYztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY3MgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzUmVjZWl2ZWQ6IChzdGF0LmJ5dGVzUmVjZWl2ZWQgLSB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLmJ5dGVzUmVjZWl2ZWQpIC8gdGhpcy5zdGF0c0ludGVydmFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqaXR0ZXI6IHN0YXQuZ29vZ0ppdHRlckJ1ZmZlck1zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzUmVjZWl2ZWQ6IChzdGF0LnBhY2tldHNSZWNlaXZlZCAtIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c1JlY2VpdmVkKSAvIHRoaXMuc3RhdHNJbnRlcnZhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c0xvc3Q6IChzdGF0LnBhY2tldHNMb3N0IC0gdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5wYWNrZXRzTG9zdCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVuaXRzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1JlY2VpdmVkOiAnYnl0ZXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqaXR0ZXI6ICdtcycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tldHNSZWNlaXZlZDogJ3BhY2tldHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzTG9zdDogJ3BhY2tldHMnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdC5tZWRpYVR5cGUgPT09ICd2aWRlbycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljc1snZnJhbWVzRGVjb2RlZCddID0gKHN0YXQuZnJhbWVzRGVjb2RlZCAtIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5mcmFtZXNEZWNvZGVkKSAvIHRoaXMuc3RhdHNJbnRlcnZhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljc1snbmFja0NvdW50J10gPSAoc3RhdC5nb29nTmFja3NTZW50IC0gdGhpcy5zdGF0cy5pbmJvdW5kLnZpZGVvLm5hY2tDb3VudCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaXRzWydmcmFtZXNEZWNvZGVkJ10gPSAnZnJhbWVzJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pdHNbJ25hY2tDb3VudCddID0gJ3BhY2tldHMnO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5mcmFtZXNEZWNvZGVkID0gc3RhdC5mcmFtZXNEZWNvZGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmQudmlkZW8ubmFja0NvdW50ID0gc3RhdC5nb29nTmFja3NTZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNSZWNlaXZlZCA9IHN0YXQuYnl0ZXNSZWNlaXZlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNSZWNlaXZlZCA9IHN0YXQucGFja2V0c1JlY2VpdmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c0xvc3QgPSBzdGF0LnBhY2tldHNMb3N0O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0B0aW1lc3RhbXAnOiBuZXcgRGF0ZShzdGF0LnRpbWVzdGFtcCkudG9JU09TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2V4ZWMnOiBpbnN0cnVtZW50YXRpb24uZXhlYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbXBvbmVudCc6IGluc3RydW1lbnRhdGlvbi5jb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdHJlYW0nOiAnd2ViUnRjJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3R5cGUnOiBtZXRyaWNJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmVhbV90eXBlJzogJ2NvbXBvc2VkX21ldHJpY3MnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndW5pdHMnOiB1bml0c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvblttZXRyaWNJZF0gPSBtZXRyaWNzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VuZFBvc3QoSlNPTi5zdHJpbmdpZnkoanNvbikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgnYnl0ZXNTZW50JyBpbiBzdGF0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3V0Ym91bmQtcnRwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWV0cmljSWQgPSAnd2VicnRjX291dGJvdW5kXycgKyBzdGF0Lm1lZGlhVHlwZSArICdfJyArIHN0YXQuc3NyYztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY3MgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzU2VudDogKHN0YXQuYnl0ZXNTZW50IC0gdGhpcy5zdGF0cy5vdXRib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNTZW50KSAvIHRoaXMuc3RhdHNJbnRlcnZhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c1NlbnQ6IChzdGF0LnBhY2tldHNTZW50IC0gdGhpcy5zdGF0cy5vdXRib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c1NlbnQpIC8gdGhpcy5zdGF0c0ludGVydmFsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bml0cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNTZW50OiAnYnl0ZXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzU2VudDogJ3BhY2tldHMnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdC5tZWRpYVR5cGUgPT09ICd2aWRlbycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljc1snZnJhbWVzRW5jb2RlZCddID0gKHN0YXQuZnJhbWVzRW5jb2RlZCAtIHRoaXMuc3RhdHMub3V0Ym91bmQudmlkZW8uZnJhbWVzRW5jb2RlZCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaXRzWydmcmFtZXNFbmNvZGVkJ10gPSAnZnJhbWVzJztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLm91dGJvdW5kLnZpZGVvLmZyYW1lc0VuY29kZWQgPSBzdGF0LmZyYW1lc0VuY29kZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5vdXRib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNTZW50ID0gc3RhdC5ieXRlc1NlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5vdXRib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c1NlbnQgPSBzdGF0LnBhY2tldHNTZW50O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0B0aW1lc3RhbXAnOiBuZXcgRGF0ZShzdGF0LnRpbWVzdGFtcCkudG9JU09TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2V4ZWMnOiBpbnN0cnVtZW50YXRpb24uZXhlYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbXBvbmVudCc6IGluc3RydW1lbnRhdGlvbi5jb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdHJlYW0nOiAnd2ViUnRjJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3R5cGUnOiBtZXRyaWNJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmVhbV90eXBlJzogJ2NvbXBvc2VkX21ldHJpY3MnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndW5pdHMnOiB1bml0c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvblttZXRyaWNJZF0gPSBtZXRyaWNzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VuZFBvc3QoSlNPTi5zdHJpbmdpZnkoanNvbikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuZ2V0U3RhdHNBZ25vc3RpYyh0aGlzLnN0cmVhbS5nZXRSVENQZWVyQ29ubmVjdGlvbigpLCBmLCAoZXJyb3IpID0+IHsgY29uc29sZS5sb2coZXJyb3IpOyB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHN0YW5kYXJkaXplUmVwb3J0KHJlc3BvbnNlKSB7XG4gICAgICAgIGlmIChwbGF0Zm9ybS5uYW1lIS5pbmRleE9mKCdGaXJlZm94JykgIT09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gcmVzcG9uc2U7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBzdGFuZGFyZFJlcG9ydCA9IHt9O1xuICAgICAgICByZXNwb25zZS5yZXN1bHQoKS5mb3JFYWNoKChyZXBvcnQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YW5kYXJkU3RhdHMgPSB7XG4gICAgICAgICAgICAgICAgaWQ6IHJlcG9ydC5pZCxcbiAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IHJlcG9ydC50aW1lc3RhbXAsXG4gICAgICAgICAgICAgICAgdHlwZTogcmVwb3J0LnR5cGVcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXBvcnQubmFtZXMoKS5mb3JFYWNoKChuYW1lKSA9PiB7XG4gICAgICAgICAgICAgICAgc3RhbmRhcmRTdGF0c1tuYW1lXSA9IHJlcG9ydC5zdGF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xuICAgICAgICAgIGFyY2ggPSBkYXRhLmdldFByb3BlcnR5KCdvcy5hcmNoJyk7XG4gICAgICAgICAgb3MgPSBvcyB8fCBkYXRhLmdldFByb3BlcnR5KCdvcy5uYW1lJykgKyAnICcgKyBkYXRhLmdldFByb3BlcnR5KCdvcy52ZXJzaW9uJyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJoaW5vKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHZlcnNpb24gPSBjb250ZXh0LnJlcXVpcmUoJ3JpbmdvL2VuZ2luZScpLnZlcnNpb24uam9pbignLicpO1xuICAgICAgICAgICAgbmFtZSA9ICdSaW5nb0pTJztcbiAgICAgICAgICB9IGNhdGNoKGUpIHtcbiAgICAgICAgICAgIGlmICgoZGF0YSA9IGNvbnRleHQuc3lzdGVtKSAmJiBkYXRhLmdsb2JhbC5zeXN0ZW0gPT0gY29udGV4dC5zeXN0ZW0pIHtcbiAgICAgICAgICAgICAgbmFtZSA9ICdOYXJ3aGFsJztcbiAgICAgICAgICAgICAgb3MgfHwgKG9zID0gZGF0YVswXS5vcyB8fCBudWxsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCFuYW1lKSB7XG4gICAgICAgICAgICBuYW1lID0gJ1JoaW5vJztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoXG4gICAgICAgICAgdHlwZW9mIGNvbnRleHQucHJvY2VzcyA9PSAnb2JqZWN0JyAmJiAhY29udGV4dC5wcm9jZXNzLmJyb3dzZXIgJiZcbiAgICAgICAgICAoZGF0YSA9IGNvbnRleHQucHJvY2VzcylcbiAgICAgICAgKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBkYXRhLnZlcnNpb25zID09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGRhdGEudmVyc2lvbnMuZWxlY3Ryb24gPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgZGVzY3JpcHRpb24ucHVzaCgnTm9kZSAnICsgZGF0YS52ZXJzaW9ucy5ub2RlKTtcbiAgICAgICAgICAgICAgbmFtZSA9ICdFbGVjdHJvbic7XG4gICAgICAgICAgICAgIHZlcnNpb24gPSBkYXRhLnZlcnNpb25zLmVsZWN0cm9uO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZGF0YS52ZXJzaW9ucy5udyA9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBkZXNjcmlwdGlvbi5wdXNoKCdDaHJvbWl1bSAnICsgdmVyc2lvbiwgJ05vZGUgJyArIGRhdGEudmVyc2lvbnMubm9kZSk7XG4gICAgICAgICAgICAgIG5hbWUgPSAnTlcuanMnO1xuICAgICAgICAgICAgICB2ZXJzaW9uID0gZGF0YS52ZXJzaW9ucy5udztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCFuYW1lKSB7XG4gICAgICAgICAgICBuYW1lID0gJ05vZGUuanMnO1xuICAgICAgICAgICAgYXJjaCA9IGRhdGEuYXJjaDtcbiAgICAgICAgICAgIG9zID0gZGF0YS5wbGF0Zm9ybTtcbiAgICAgICAgICAgIHZlcnNpb24gPSAvW1xcZC5dKy8uZXhlYyhkYXRhLnZlcnNpb24pO1xuICAgICAgICAgICAgdmVyc2lvbiA9IHZlcnNpb24gPyB2ZXJzaW9uWzBdIDogbnVsbDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIERldGVjdCBBZG9iZSBBSVIuXG4gICAgICBlbHNlIGlmIChnZXRDbGFzc09mKChkYXRhID0gY29udGV4dC5ydW50aW1lKSkgPT0gYWlyUnVudGltZUNsYXNzKSB7XG4gICAgICAgIG5hbWUgPSAnQWRvYmUgQUlSJztcbiAgICAgICAgb3MgPSBkYXRhLmZsYXNoLnN5c3RlbS5DYXBhYmlsaXRpZXMub3M7XG4gICAgICB9XG4gICAgIC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c2lvbi5tZWRpYS5wdXNoKHVMaW5lKTtcbiAgICAgICAgICAgIHR5cGVzLnB1c2godUxpbmUubWlkKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFkZCBzb3VyY2VzIHRvIHRoZSBjaGFubmVsIGFuZCBoYW5kbGUgYT1tc2lkLlxuICAgICAgICBpZiAodHlwZW9mIHVMaW5lLnNvdXJjZXMgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBPYmplY3Qua2V5cyh1TGluZS5zb3VyY2VzKS5mb3JFYWNoKGZ1bmN0aW9uKHNzcmMpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHR5cGUyYmxbdUxpbmUudHlwZV0uc291cmNlcyAhPT0gJ29iamVjdCcpXG4gICAgICAgICAgICAgICAgICAgIHR5cGUyYmxbdUxpbmUudHlwZV0uc291cmNlcyA9IHt9O1xuXG4gICAgICAgICAgICAgICAgLy8gQXNzaWduIHRoZSBzb3VyY2VzIHRvIHRoZSBjaGFubmVsLlxuICAgICAgICAgICAgICAgIHR5cGUyYmxbdUxpbmUudHlwZV0uc291cmNlc1tzc3JjXSA9XG4gICAgICAgICAgICAgICAgICAgIHVMaW5lLnNvdXJjZXNbc3NyY107XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHVMaW5lLm1zaWQgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEluIFBsYW4gQiB0aGUgbXNpZCBpcyBhbiBTU1JDIGF0dHJpYnV0ZS4gQWxzbywgd2UgZG9uJ3RcbiAgICAgICAgICAgICAgICAgICAgLy8gY2FyZSBhYm91dCB0aGUgb2Jzb2xldGUgbGFiZWwgYW5kIG1zbGFiZWwgYXR0cmlidXRlcy5cbiAgICAgICAgICAgICAgICAgICAgLy9cbiAgICAgICAgICAgICAgICAgICAgLy8gTm90ZSB0aGF0IGl0IGlzIG5vdCBndWFyYW50ZWVkIHRoYXQgdGhlIHVMaW5lIHdpbGxcbiAgICAgICAgICAgICAgICAgICAgLy8gaGF2ZSBhbiBtc2lkLiByZWN2b25seSBjaGFubmVscyBpbiBwYXJ0aWN1bGFyIGRvbid0IGhhdmVcbiAgICAgICAgICAgICAgICAgICAgLy8gb25lLlxuICAgICAgICAgICAgICAgICAgICB0eXBlMmJsW3VMaW5lLnR5cGVdLnNvdXJjZXNbc3NyY10ubXNpZCA9XG4gICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5tc2lkO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBOT1RFIHNzcmNzIGluIHNzcmMgZ3JvdXBzIHdpbGwgc2hhcmUgbXNpZHMsIGFzXG4gICAgICAgICAgICAgICAgLy8gZHJhZnQtdWJlcnRpLXJ0Y3dlYi1wbGFuLTAwIG1hbmRhdGVzLlxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBBZGQgc3NyYyBncm91cHMgdG8gdGhlIGNoYW5uZWwuXG4gICAgICAgIGlmICh0eXBlb2YgdUxpbmUuc3NyY0dyb3VwcyAhPT0gJ3VuZGVmaW5lZCcgJiZcbiAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KHVMaW5lLnNzcmNHcm91cHMpKSB7XG5cbiAgICAgICAgICAgIC8vIENyZWF0ZSB0aGUgc3NyY0dyb3VwcyBhcnJheSwgaWYgaXQncyBub3QgZGVmaW5lZC5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgdHlwZTJibFt1TGluZS50eXBlXS5zc3JjR3JvdXBzID09PSAndW5kZWZpbmVkJyB8fFxuICAgICAgICAgICAgICAgICAgICAhQXJyYXkuaXNBcnJheSh0eXBlMmJsW3VMaW5lLnR5cGVdLnNzcmNHcm91cHMpKSB7XG4gICAgICAgICAgICAgICAgdHlwZTJibFt1TGluZS50eXBlXS5zc3JjR3JvdXBzID0gW107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHR5cGUy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bnQgbXVzdCBiZSB0aGUgc2FtZSBmb3IgYWxsIG0tbGluZXMuXFxuXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXFx0TGFzdCBmaW5nZXJwcmludDogXCIgKyBKU09OLnN0cmluZ2lmeShmaW5nZXJwcmludCkgKyBcIlxcblwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxcdE5ldyBmaW5nZXJwcmludDogXCIgKyBKU09OLnN0cmluZ2lmeShiTGluZS5maW5nZXJwcmludClcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGJMaW5lLmZpbmdlcnByaW50ICE9ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgZmluZ2VycHJpbnQgPSBiTGluZS5maW5nZXJwcmludDtcbiAgICAgICAgfVxuXG4gICAgICAgIHBheWxvYWRzW2JMaW5lLnR5cGVdID0gYkxpbmUucGF5bG9hZHM7XG4gICAgICAgIHJ0Y3BGYltiTGluZS50eXBlXSA9IGJMaW5lLnJ0Y3BGYjtcbiAgICAgICAgcnRwW2JMaW5lLnR5cGVdID0gYkxpbmUucnRwO1xuXG4gICAgICAgIC8vIGludmVydGVkIHNzcmMgZ3JvdXAgbWFwXG4gICAgICAgIHZhciBzc3JjMmdyb3VwID0ge307XG4gICAgICAgIGlmICh0eXBlb2Ygc3NyY0dyb3VwcyAhPT0gJ3VuZGVmaW5lZCcgJiYgQXJyYXkuaXNBcnJheShzc3JjR3JvdXBzKSkge1xuICAgICAgICAgICAgc3NyY0dyb3Vwcy5mb3JFYWNoKGZ1bmN0aW9uIChzc3JjR3JvdXApIHtcbiAgICAgICAgICAgICAgICAvLyBYWFggVGhpcyBtaWdodCBicmFrZSBpZiBhbiBTU1JDIGlzIGluIG1vcmUgdGhhbiBvbmUgZ3JvdXBcbiAgICAgICAgICAgICAgICAvLyBmb3Igc29tZSByZWFzb24uXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzc3JjR3JvdXAuc3NyY3MgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkoc3NyY0dyb3VwLnNzcmNzKSkge1xuICAgICAgICAgICAgICAgICAgICBzc3JjR3JvdXAuc3NyY3MuZm9yRWFjaChmdW5jdGlvbiAoc3NyYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzc3JjMmdyb3VwW3NzcmNdID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNzcmMyZ3JvdXBbc3NyY10gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgc3NyYzJncm91cFtzc3JjXS5wdXNoKHNzcmNHcm91cCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gc3NyYyB0byBtLWxpbmUgaW5kZXguXG4gICAgICAgIHZhciBzc3JjMm1sID0ge307XG5cbiAgICAgICAgaWYgKHR5cGVvZiBzb3VyY2VzID09PSAnb2JqZWN0Jykge1xuXG4gICAgICAgICAgICAvLyBXZSdsbCB1c2UgdGhlIFwiYkxpbmVcIiBvYmplY3QgYXMgYSBwcm90b3R5cGUgZm9yIGVhY2ggbmV3IFwibUxpbmVcIlxuICAgICAgICAgICAgLy8gdGhhdCB3ZSBjcmVhdGUsIGJ1dCBmaXJzdCB3ZSBuZWVkIHRvIGNsZWFuIGl0IHVwIGEgYml0LlxuICAgICAgICAgICAgZGVsZXRlIGJMaW5lLnNvdXJjZXM7XG4gICAgICAgICAgICBkZWxldGUgYkxpbmUuc3NyY0dyb3VwcztcbiAgICAgICAgICAgIGRlbGV0ZSBiTGluZS5jYW5kaWRhdGVzO1xuICAgICAgICAgICAgZGVsZXRlIGJMaW5lLmljZVVmcmFnO1xuICAgICAg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IHRoYXQgd2VcbiAgICAgICAgICAgICAgICAvLyBoYW5kbGUgcmVjZWl2ZS1vbmx5IFNTUkNzIGluIGEgc3BlY2lhbCB3YXkgb25seSBpZiB0aGV5IGNvbWVcbiAgICAgICAgICAgICAgICAvLyBmcm9tIHRoZSByZW1vdGUgc2lkZS5cbiAgICAgICAgICAgICAgICBpZiAoZGVzYy50eXBlPT09J29mZmVyJykge1xuICAgICAgICAgICAgICAgICAgICAvLyBXZSB3YW50IHRvIGRldGVjdCBTU1JDcyB3aGljaCBhcmUgdXNlZCBieSBhIHJlbW90ZSBwZWVyXG4gICAgICAgICAgICAgICAgICAgIC8vIGluIGFuIG0tbGluZSB3aXRoIGRpcmVjdGlvbj1yZWN2b25seSAoaS5lLiB0aGV5IGFyZVxuICAgICAgICAgICAgICAgICAgICAvLyBiZWluZyB1c2VkIGZvciBSVENQIG9ubHkpLlxuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGluZm9ybWF0aW9uIHdvdWxkIGhhdmUgZ290dGVuIGxvc3QgaWYgdGhlIHJlbW90ZVxuICAgICAgICAgICAgICAgICAgICAvLyBwZWVyIHVzZWQgVW5pZmllZCBQbGFuIGFuZCB0aGVpciBsb2NhbCBkZXNjcmlwdGlvbiB3YXNcbiAgICAgICAgICAgICAgICAgICAgLy8gdHJhbnNsYXRlZCB0byBQbGFuIEIuIFNvIHdlIHVzZSB0aGUgbGFjayBvZiBhbiBNU0lEXG4gICAgICAgICAgICAgICAgICAgIC8vIGF0dHJpYnV0ZSB0byBkZWR1Y2UgYSBcInJlY2VpdmUgb25seVwiIFNTUkMuXG4gICAgICAgICAgICAgICAgICAgIGlmICghc291cmNlc1tzc3JjXS5tc2lkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWN2b25seVNzcmNzW2JMaW5lLnR5cGVdW3NzcmNdID0gc291cmNlc1tzc3JjXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlY2VpdmUtb25seSBTU1JDcyBtdXN0IG5vdCBjcmVhdGUgbmV3IG0tbGluZXMuIFdlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB3aWxsIGFzc2lnbiB0aGVtIHRvIGFuIGV4aXN0aW5nIG0tbGluZSBsYXRlci5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3NyYzJncm91cFtzc3JjXSAhPT0gJ3VuZGVmaW5lZCcgJiZcbiAgICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShzc3JjMmdyb3VwW3NzcmNdKSkge1xuICAgICAgICAgICAgICAgICAgICBzc3JjMmdyb3VwW3NzcmNdLnNvbWUoZnVuY3Rpb24gKHNzcmNHcm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc3NyY0dyb3VwLnNzcmNzICppcyogYW4gQXJyYXksIG5vIG5lZWQgdG8gY2hlY2tcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFnYWluIGhlcmUuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3NyY0dyb3VwLnNzcmNzLnNvbWUoZnVuY3Rpb24gKHJlbGF0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNzcmMybWxbcmVsYXRlZF0gPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVMaW5lID0gc3NyYzJtbFtyZWxhdGVkXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdUxpbmUgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHRoZSBtLWxpbmUgYWxyZWFkeSBleGlzdHMuIEp1c3QgYWRkIHRoZSBzb3VyY2UuXG4gICAgICAgICAgICAgICAgICAgIHVMaW5lLnNvdXJjZXNbc3NyY10gPSBzb3VyY2VzW3NzcmNdO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgc291cmNlc1tzc3JjXS5tc2lkO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFVzZSB0aGUgXCJiTGluZVwiIGFzIGEgcHJvdG90eXBlIGZvciB0aGUgXCJ1TGluZVwiLlxuICAgICAgICAgICAgICAgICAgICB1TGluZSA9IE9iamVjdC5jcmVhdGUoYkxpbmUpO1xuICAgICAgICAgICAgICAgICAgICBzc3JjMm1sW3NzcmNdID0gdUxpbmU7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzb3VyY2VzW3NzcmNdLm1zaWQgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBc3NpZ24gdGhlIG1zaWQgb2YgdGhlIHNvdXJjZSB0byB0aGUgbS1saW5lLiBOb3RlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGF0IGl0IGlzIG5vdCBndWFyYW50ZWVkIHRoYXQgdGhlIHNvdXJjZSB3aWxsIGhhdmVcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1zaWQuIEluIHBhcnRpY3VsYXIgXCJyZWN2b25seVwiIHNvdXJjZXMgZG9uJ3QgaGF2ZSBhblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbXNpZC4gTm90ZSB0aGF0IFwicmVjdm9ubHlcIiBpcyBhIHRlcm0gb25seSBkZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBmb3IgbS1saW5lcy5cbiAgICAgICAgICAgICAgICAgICAgICAgIHVMaW5lLm1zaWQgPSBzb3VyY2VzW3NzcmNdLm1zaWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgc291cmNlc1tzc3JjXS5tc2lkO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gV2UgYXNzaWduIG9uZSBTU1JDIHBlciBtZWRpYSBsaW5lLlxuICAgICAgICAgICAgICAgICAgICB1TGluZS5zb3VyY2VzID0ge307XG4gICAgICAgICAgICAgICAgICAgIHVMaW5lLnNvdXJjZXNbc3NyY10gPSBzb3VyY2VzW3NzcmNdO1xuICAgICAgICAgICAgICAgICAgICB1TGluZS5zc3JjR3JvdXBzID0gc3NyYzJncm91cFtzc3JjXTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBVc2UgdGhlIGNhY2hlZCBVbmlmaWVkIFBsYW4gU0RQIChpZiBpdCBleGlzdHMpIHRvIGFzc2lnblxuICAgICAgICAgICAgICAgICAgICAvLyBTU1JDcyB0byBtaWRzLlxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNhY2hlZCAhPT0gJ3VuZGVmaW5lZCcgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBjYWNoZWQubWVkaWEgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KGNhY2hlZC5tZWRpYSkpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY2FjaGVkLm1lZGlhLmZvckVhY2goZnVuY3Rpb24gKG0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG0uc291cmNlcyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXMobS5zb3VyY2VzKS5mb3JFYWNoKGZ1bmN0aW9uIChzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocyA9PT0gc3NyYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVMaW5lLm1pZCA9IG0ubWlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdUxpbmUubWlkID09PSAndW5kZWZpbmVkJykge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIGlzIGFuIFNTUkMgdGhhdCB3ZSBzZWUgZm9yIHRoZSBmaXJzdCB0aW1lXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhc3NpZ24gaXQgYSBuZXcgbWlkLiBUaGlzIGlzIHR5cGljYWxseSB0aGUgY2FzZSB3aGVuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgdG8gdHJhbnNmb3JtIGEgcmVtb3RlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBkZXNjcmlwdGlvbiBmb3IgdGhlIGZpcnN0IHRpbWUgb3Igd2hlbiB0aGVyZSBpcyBhXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBuZXcgU1NSQyBpbiB0aGUgcmVtb3RlIGRlc2NyaXB0aW9uIGJlY2F1c2UgYSBuZXdcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHBlZXIgaGFzIGpvaW5lZCB0aGUgY29uZmVyZW5jZS4gTG9jYWwgU1NSQ3Mgc2hvdWxkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBoYXZlIGFscmVhZHkgYmVlbiBhZGRlZCB0byB0aGUgbWFwIGluIHRoZSB0b1BsYW5CXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBtZXRob2QuXG4gICAgICAgICAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmVjYXVzZSBGRiBnZW5lcmF0ZXMgYW5zd2VycyBpbiBVbmlmaWVkIFBsYW4gc3R5bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBNVVNUIGFscmVhZHkgaGF2ZSBhIGNhY2hlZCBhbnN3ZXIgd2l0aCBhbGwgdGhlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2NhbCBTU1JDcyBtYXBwZWQgdG8gc29tZSBtLWxpbmUvbWlkLlxuXG4gICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5taWQgPSBbYkxpbmUudHlwZSwgJy0nLCBzc3JjXS5qb2luKCcnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIEluY2x1ZGUgdGhlIGNhbmRpZGF0ZXMgaW4gdGhlIDFzdCBtZWRpYSBsaW5lLlxuICAgICAgICAgICAgICAgICAgICB1TGluZS5jYW5kaWRhdGVzID0gY2FuZGlkYXRlcztcbiAgICAgICAgICAgICAgICAgICAgdUxpbmUuaWNlVWZyYWcgPSBpY2VVZnJhZztcbiAgICAgICAgICAgICAgICAgICAgdUxpbmUuaWNlUHdkID0gaWNlUHdkO1xuICAgICAgICAgICAgICAgICAgICB1TGluZS5maW5nZXJwcmludCA9IGZpbmdlcnByaW50O1xuICAgICAgICAgICAgICAgICAgICB1TGluZS5wb3J0ID0gcG9ydDtcblxuICAgICAgICAgICAgICAgICAgICBtaWQydWxbdUxpbmUubWlkXSA9IHVMaW5lO1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VzMnVsW3VJZHhdID0gdUxpbmUuc291cmNlcztcblxuICAgICAgICAgICAgICAgICAgICBzZWxmLmNhY2hlLm1sVTJCTWFwW3VJZHhdID0gYklkeDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLmNhY2hlLm1sQjJVTWFwW2JJZHhdID09PSAndW5kZWZpbmVkJ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gICBmb3IgKHZhciBpID0gMDsgaSA8IGNhY2hlZC5tZWRpYS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHVMaW5lID0gY2FjaGVkLm1lZGlhW2ldO1xuXG4gICAgICAgICAgICBkZWxldGUgdUxpbmUubXNpZDtcbiAgICAgICAgICAgIGRlbGV0ZSB1TGluZS5zb3VyY2VzO1xuICAgICAgICAgICAgZGVsZXRlIHVMaW5lLnNzcmNHcm91cHM7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlczJ1bFtpXSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgaWYgKCF1TGluZS5kaXJlY3Rpb25cbiAgICAgICAgICAgICAgICAgIHx8IHVMaW5lLmRpcmVjdGlvbiA9PT0gJ3NlbmRyZWN2JylcbiAgICAgICAgICAgICAgICAgIHVMaW5lLmRpcmVjdGlvbiA9ICdyZWN2b25seSc7XG4gICAgICAgICAgICAgIGVsc2UgaWYgKHVMaW5lLmRpcmVjdGlvbiA9PT0gJ3NlbmRvbmx5JylcbiAgICAgICAgICAgICAgICAgIHVMaW5lLmRpcmVjdGlvbiA9ICdpbmFjdGl2ZSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAoIXVMaW5lLmRpcmVjdGlvblxuICAgICAgICAgICAgICAgICAgfHwgdUxpbmUuZGlyZWN0aW9uID09PSAnc2VuZHJlY3YnKVxuICAgICAgICAgICAgICAgICAgdUxpbmUuZGlyZWN0aW9uID0gJ3NlbmRyZWN2JztcbiAgICAgICAgICAgICAgZWxzZSBpZiAodUxpbmUuZGlyZWN0aW9uID09PSAncmVjdm9ubHknKVxuICAgICAgICAgICAgICAgICAgdUxpbmUuZGlyZWN0aW9uID0gJ3NlbmRvbmx5JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdUxpbmUuc291cmNlcyA9IHNvdXJjZXMydWxbaV07XG4gICAgICAgICAgICB1TGluZS5jYW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9ICdzZW5kb25seSc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCF1TGluZS5kaXJlY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgIHx8IHVMaW5lLmRpcmVjdGlvbiA9PT0gJ3JlY3Zvbmx5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdUxpbmUuZGlyZWN0aW9uID0gJ2luYWN0aXZlJztcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGFkZFNldHVwQXR0ciAodUxpbmUpO1xuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uLm1lZGlhLnB1c2godUxpbmUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQWRkIGFsbCB0aGUgcmVtYWluaW5nIChuZXcpIG0tbGluZXMgb2YgdGhlIHRyYW5zZm9ybWVkIFNEUC5cbiAgICAgICAgT2JqZWN0LmtleXMobWlkMnVsKS5mb3JFYWNoKGZ1bmN0aW9uKG1pZCkge1xuICAgICAgICAgICAgaWYgKG1pZHMuaW5kZXhPZihtaWQpID09PSAtMSkge1xuICAgICAgICAgICAgICAgIG1pZHMucHVzaChtaWQpO1xuICAgICAgICAgICAgICAgIGlmIChtaWQydWxbbWlkXS5kaXJlY3Rpb24gPT09ICdyZWN2b25seScpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBpcyBhIHJlbW90ZSByZWN2b25seSBjaGFubmVsLiBBZGQgaXRzIFNTUkMgdG8gdGhlXG4gICAgICAgICAgICAgICAgICAgIC8vIGFwcHJvcHJpYXRlIHNlbmRyZWN2IG9yIHNlbmRvbmx5IGNoYW5uZWwuXG4gICAgICAgICAgICAgICAgICAgIC8vIFRPRE8oZ3ApIHdoYXQgaWYgd2UgZG9uJ3QgaGF2ZSBzZW5kcmVjdi9zZW5kb25seVxuICAgICAgICAgICAgICAgICAgICAvLyBjaGFubmVsP1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciBkb25lID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbi5tZWRpYS5zb21lKGZ1bmN0aW9uICh1TGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh1TGluZS5kaXJlY3Rpb24gPT09ICdzZW5kcmVjdicgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1TGluZS5kaXJlY3Rpb24gPT09ICdzZW5kb25seScpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdUxpbmUudHlwZSA9PT0gbWlkMnVsW21pZF0udHlwZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1pZDJ1bFttaWRdIHNob3VsZG4ndCBoYXZlIGFueSBzc3JjLWdyb3Vwc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKG1pZDJ1bFttaWRdLnNvdXJjZXMpLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChzc3JjKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVMaW5lLnNvdXJjZXNbc3NyY10gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlkMnVsW21pZF0uc291cmNlc1tzc3JjXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIWRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlc3Npb24ubWVkaWEucHVzaChtaWQydWxbbWlkXSk7XG4gICAgICAgICAgICAgICAgICAg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ICBpZiAoaWR4ID09PSBudWxsKXtcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIGlzIHRoZSBmaXJzdCBvZmZlciB3ZSByZWNlaXZlLCB3ZSBkb24ndCBoYXZlIGFcbiAgICAgICAgICAgICAgICAvLyBjYWNoZWQgYW5zd2VyLiBBc3N1bWUgdGhhdCB3ZSB3aWxsIGJlIHNlbmRpbmcgbWVkaWEgdXNpbmdcbiAgICAgICAgICAgICAgICAvLyB0aGUgZmlyc3QgbS1saW5lIGZvciBlYWNoIG1lZGlhIHR5cGUuXG5cbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHNlc3Npb24ubWVkaWEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlc3Npb24ubWVkaWFbaV0udHlwZSA9PT0gdHlwZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWR4ID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlkeCAmJiBzZXNzaW9uLm1lZGlhLmxlbmd0aCA+IGlkeCkge1xuICAgICAgICAgICAgdmFyIG1MaW5lID0gc2Vzc2lvbi5tZWRpYVtpZHhdO1xuICAgICAgICAgICAgT2JqZWN0LmtleXMocmVjdm9ubHlTc3Jjc1t0eXBlXSkuZm9yRWFjaChmdW5jdGlvbihzc3JjKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1MaW5lLnNvdXJjZXMgJiYgbUxpbmUuc291cmNlc1tzc3JjXSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oXCJSZXBsYWNpbmcgYW4gZXhpc3RpbmcgU1NSQy5cIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbUxpbmUuc291cmNlcykge1xuICAgICAgICAgICAg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Npb24ubWVkaWEgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICBBcnJheS5pc0FycmF5KHNlc3Npb24ubWVkaWEpKSB7XG5cbiAgICBzZXNzaW9uLm1lZGlhLmZvckVhY2goZnVuY3Rpb24gKG1MaW5lKSB7XG4gICAgICAvLyBleHBhbmQgc291cmNlcyB0byBzc3Jjc1xuICAgICAgaWYgKHR5cGVvZiBtTGluZS5zb3VyY2VzICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICBPYmplY3Qua2V5cyhtTGluZS5zb3VyY2VzKS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICBtTGluZS5zc3JjcyA9IFtdO1xuICAgICAgICAgIE9iamVjdC5rZXlzKG1MaW5lLnNvdXJjZXMpLmZvckVhY2goZnVuY3Rpb24gKHNzcmMpIHtcbiAgICAgICAgICAgIHZhciBzb3VyY2UgPSBtTGluZS5zb3VyY2VzW3NzcmNdO1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoc291cmNlKS5mb3JFYWNoKGZ1bmN0aW9uIChhdHRyaWJ1dGUpIHtcbiAgICAgICAgICAgICAgbUxpbmUuc3NyY3MucHVzaCh7XG4gICAgICAgICAgICAgICAgaWQ6IHNzcmMsXG4gICAgICAgICAgICAgICAgYXR0cmlidXRlOiBhdHRyaWJ1dGUsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHNvdXJjZVthdHRyaWJ1dGVdXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgZGVsZXRlIG1MaW5lLnNvdXJjZXM7XG4gICAgICAgIH1cblxuICAgICAgLy8gam9pbiBzc3JjcyBpbiBzc3JjIGdyb3Vwc1xuICAgICAgaWYgKHR5cGVvZiBtTGluZS5zc3JjR3JvdXBzICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICBBcnJheS5pc0FycmF5KG1MaW5lLnNzcmNHcm91cHMpKSB7XG4gICAgICAgICAgbUxpb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LFxuICAgICAgICBPQkpfVFlQRSAgICA9ICdvYmplY3QnLFxuICAgICAgICBTVFJfVFlQRSAgICA9ICdzdHJpbmcnLFxuICAgICAgICBNQUpPUiAgICAgICA9ICdtYWpvcicsIC8vIGRlcHJlY2F0ZWRcbiAgICAgICAgTU9ERUwgICAgICAgPSAnbW9kZWwnLFxuICAgICAgICBOQU1FICAgICAgICA9ICduYW1lJyxcbiAgICAgICAgVFlQRSAgICAgICAgPSAndHlwZScsXG4gICAgICAgIFZFTkRPUiAgICAgID0gJ3ZlbmRvcicsXG4gICAgICAgIFZFUlNJT04gICAgID0gJ3ZlcnNpb24nLFxuICAgICAgICBBUkNISVRFQ1RVUkU9ICdhcmNoaXRlY3R1cmUnLFxuICAgICAgICBDT05TT0xFICAgICA9ICdjb25zb2xlJyxcbiAgICAgICAgTU9CSUxFICAgICAgPSAnbW9iaWxlJyxcbiAgICAgICAgVEFCTEVUICAgICAgPSAndGFibGV0JyxcbiAgICAgICAgU01BUlRUViAgICAgPSAnc21hcnR0dicsXG4gICAgICAgIFdFQVJBQkxFICAgID0gJ3dlYXJhYmxlJyxcbiAgICAgICAgRU1CRURERUQgICAgPSAnZW1iZWRkZWQnO1xuXG5cbiAgICAvLy8vLy8vLy8vL1xuICAgIC8vIEhlbHBlclxuICAgIC8vLy8vLy8vLy9cblxuXG4gICAgdmFyIHV0aWwgPSB7XG4gICAgICAgIGV4dGVuZCA6IGZ1bmN0aW9uIChyZWdleGVzLCBleHRlbnNpb25zKSB7XG4gICAgICAgICAgICB2YXIgbWFyZ2VkUmVnZXhlcyA9IHt9O1xuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiByZWdleGVzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4dGVuc2lvbnNbaV0gJiYgZXh0ZW5zaW9uc1tpXS5sZW5ndGggJSAyID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hcmdlZFJlZ2V4ZXNbaV0gPSBleHRlbnNpb25zW2ldLmNvbmNhdChyZWdleGVzW2ldKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtYXJnZWRSZWdleGVzW2ldID0gcmVnZXhlc1tpXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbWFyZ2VkUmVnZXhlcztcbiAgICAgICAgfSxcbiAgICAgICAgaGFzIDogZnVuY3Rpb24gKHN0cjEsIHN0cjIpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN0cjEgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgIHJldHVybiBzdHIyLnRvTG93ZXJDYXNlKCkuaW5kZXhPZihzdHIxLnRvTG93ZXJDYXNlKCkpICE9PSAtMTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbG93ZXJpemUgOiBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgICAgICByZXR1cm4gc3RyLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIH0sXG4gICAgICAgIG1ham9yIDogZnVuY3Rpb24gKHZlcnNpb24pIHtcbiAgICAgICAgICAgIHJldHVybiB0eXBlb2YodmVyc2lvbikgPT09IFNUUl9UWVBFID8gdmVyc2lvbi5yZXBsYWNlKC9bXlxcZFxcLl0vZywnJykuc3BsaXQoXCIuXCIpWzBdIDogdW5kZWZpbmVkO1xuICAgICAgICB9LFxuICAgICAgICB0cmltIDogZnVuY3Rpb24gKHN0cikge1xuICAgICAgICAgIHJldHVybiBzdHIucmVwbGFjZSgvXltcXHNcXHVGRUZGXFx4QTBdK3xbXFxzXFx1RkVGRlxceEEwXSskL2csICcnKTtcbiAgICAgICAgfVxuICAgIH07XG5cblxuICAgIC8vLy8vLy8vLy8vLy8vL1xuICAgIC8vIE1hcCBoZWxwZXJcbiAgICAvLy8vLy8vLy8vLy8vL1xuXG5cbiAgICB2YXIgbWFwcGVyID0ge1xuXG4gICAgICAgIHJneCA6IGZ1bmN0aW9uICh1YSwgYXJyYXlzKSB7XG5cbiAgICAgICAgICAgIC8vdmFyIHJlc3VsdCA9IHt9LFxuICAgICAgICAgICAgdmFyIGkgPSAwLCBqLCBrLCBwLCBxLCBtYXRjaGVzLCBtYXRjaDsvLywgYXJncyA9IGFyZ3VtZW50cztcblxuICAgICAgICAgICAgLyovLyBjb25zdHJ1Y3Qgb2JqZWN0IGJhcmVib25lc1xuICAgICAgICAgICAgZm9yIChwID0gMDsgcCA8IGFyZ3NbMV0ubGVuZ3RoOyBwKyspIHtcbiAgICAgICAgICAgICAgICBxID0gYXJnc1sxXVtwXTtcbiAgICAgICAgICAgICAgICByZXN1bHRbdHlwZW9mIHEgPT09IE9CSl9UWVBFID8gcVswXSA6IHFdID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSovXG5cbiAgICAgICAgICAgIC8vIGxvb3AgdGhyb3VnaCBhbGwgcmVnZXhlcyBtYXBzXG4gICAgICAgICAgICB3aGlsZSAoaSA8IGFycmF5cy5sZW5ndGggJiYgIW1hdGNoZXMpIHtcblxuICAgICAgICAgICAgICAgIHZhciByZWdleCA9IGFycmF5c1tpXSwgICAgICAgLy8gZXZlbiBzZXF1ZW5jZSAoMCwyLDQsLi4pXG4gICAgICAgICAgICAgICAgICAgIHByb3BzID0gYXJyYXlzW2kgKyAxXTsgICAvLyBvZGQgc2VxdWVuY2UgKDEsMyw1LC4uKVxuICAgICAgICAgICAgICAgIGogPSBrID0gMDtcblxuICAgICAgICAgICAgICAgIC8vIHRyeSBtYXRjaGluZyB1YXN0cmluZyB3aXRoIHJlZ2V4ZXNcbiAgICAgICAgICAgICAgICB3aGlsZSAoaiA8IHJlZ2V4Lmxlbmd0aCAmJiAhbWF0Y2hlcykge1xuXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSByZWdleFtqKytdLmV4ZWModWEpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICghIW1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAocCA9IDA7IHAgPCBwcm9wcy5sZW5ndGg7IHArKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoID0gbWF0Y2hlc1srK2tdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBwcm9wc1twXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiBnaXZlbiBwcm9wZXJ0eSBpcyBhY3R1YWxseSBhcnJheVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcSA9PT0gT0JKX1RZUEUgJiYgcS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChxLmxlbmd0aCA9PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHFbMV0gPT0gRlVOQ19UWVBFKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYXNzaWduIG1vZGlmaWVkIG1hdGNoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1txWzBdXSA9IHFbMV0uY2FsbCh0aGlzLCBtYXRjaCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFzc2lnbiBnaXZlbiB2YWx1ZSwgaWdub3JlIHJlZ2V4IG1hdGNoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1txWzBdXSA9IHFbMV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocS5sZW5ndGggPT0gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgd2hldGhlciBmdW5jdGlvbiBvciByZWdleFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBxWzFdID09PSBGVU5DX1RZUEUgJiYgIShxWzFdLmV4ZWMgJiYgcVsxXS50ZXN0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhbGwgZnVuY3Rpb24gKHVzdWFsbHkgc3RyaW5nIG1hcHBlcilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3FbMF1dID0gbWF0Y2ggPyBxWzFdLmNhbGwodGhpcywgbWF0Y2gsIHFbMl0pIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzYW5pdGl6ZSBtYXRjaCB1c2luZyBnaXZlbiByZWdleFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbcVswXV0gPSBtYXRjaCA/IG1hdGNoLnJlcGxhY2UocVsxXSwgcVsyXSkgOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocS5sZW5ndGggPT0gNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbcVswXV0gPSBtYXRjaCA/IHFbM10uY2FsbCh0aGlzLCBtYXRjaC5yZXBsYWNlKHFbMV0sIHFbMl0pKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbcV0gPSBtYXRjaCA/IG1hdGNoIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpICs9IDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBjb25zb2xlLmxvZyh0aGlzKTtcbiAgICAgICAgICAgIC8vcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgc3RyIDogZnVuY3Rpb24gKHN0ciwgbWFwKSB7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gbWFwKSB7XG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgYXJyYXlcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG1hcFtpXSA9PT0gT0JKX1RZUEUgJiYgbWFwW2ldLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBtYXBbaV0ubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1dGlsLmhhcyhtYXBbaV1bal0sIHN0cikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKGkgPT09IFVOS05PV04pID8gdW5kZWZpbmVkIDogaTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXRpbC5oYXMobWFwW2ldLCBzdHIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoaSA9PT0gVU5LTk9XTikgPyB1bmRlZmluZWQgOiBpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBzdHI7XG4gICAgICAgIH1cbiAgICB9O1xuXG5cbiAgICAvLy8vLy8vLy8vLy8vLy9cbiAgICAvLyBTdHJpbmcgbWFwXG4gICAgLy8vLy8vLy8vLy8vLy9cblxuXG4gICAgdmFyIG1hcHMgPSB7XG5cbiAgICAgICAgYnJvd3NlciA6IHtcbiAgICAgICAgICAgIG9sZHNhZmFyaSA6IHtcbiAgICAgICAgICAgICAgICB2ZXJzaW9uIDoge1xuICAgICAgICAgICAgICAgICAgICAnMS4wJyAgIDogJy84JyxcbiAgICAgICAgICAgICAgICAgICAgJzEuMicgICA6ICcvMScsXG4gICAgICAgICAgICAgICAgICAgICcxLjMnICAgOiAnLzMnLFxuICAgICAgICAgICAgICAgICAgICAnMi4wJyAgIDogJy80MTInLFxuICAgICAgICAgICAgICAgICAgICAnMi4wLjInIDogJy80MTYnLFxuICAgICAgICAgICAgICAgICAgICAnMi4wLjMnIDogJy80MTcnLFxuICAgICAgICAgICAgICAgICAgICAnMi4wLjQnIDogJy80MTknLFxuICAgICAgICAgICAgICAgICAgICAnPycgICAgIDogJy8nXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGRldmljZSA6IHtcbiAgICAgICAgICAgIGFtYXpvbiA6IHtcbiAgICAgICAgICAgICAgICBtb2RlbCA6IHtcbiAgICAgICAgICAgICAgICAgICAgJ0ZpcmUgUGhvbmUnIDogWydTRCcsICdLRiddXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNwcmludCA6IHtcbiAgICAgICAgICAgICAgICBtb2RlbCA6IHtcbiAgICAgICAgICAgICAgICAgICAgJ0V2byBTaGlmdCA0RycgOiAnNzM3M0tUJ1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgdmVuZG9yIDoge1xuICAgICAgICAgICAgICAgICAgICAnSFRDJyAgICAgICA6ICdBUEEnLFxuICAgICAgICAgICAgICAgICAgICAnU3ByaW50JyAgICA6ICdTcHJpbnQnXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIG9zIDoge1xuICAgICAgICAgICAgd2luZG93cyA6IHtcbiAgICAgICAgICAgICAgICB2ZXJzaW9uIDoge1xuICAgICAgICAgICAgICAgICAgICAnTUUnICAgICAgICA6ICc0LjkwJyxcbiAgICAgICAgICAgICAgICAgICAgJ05UIDMuMTEnICAgOiAnTlQzLjUxJyxcbiAgICAgICAgICAgICAgICAgICAgJ05UIDQuMCcgICAgOiAnTlQ0LjAnLFxuICAgICAgICAgICAgICAgICAgICAnMjAwMCcgICAgICA6ICdOVCA1LjAnLFxuICAgICAgICAgICAgICAgICAgICAnWFAnICAgICAgICA6IFsnTlQgNS4xJywgJ05UIDUuMiddLFxuICAgICAgICAgICAgICAgICAgICAnVmlzdGEnICAgICA6ICdOVCA2LjAnLFxuICAgICAgICAgICAgICAgICAgICAnNycgICAgICAgICA6ICdOVCA2LjEnLFxuICAgICAgICAgICAgICAgICAgICAnOCcgICAgICAgICA6ICdOVCA2LjInLFxuICAgICAgICAgICAgICAgICAgICAnOC4xJyAgICAgICA6ICdOVCA2LjMnLFxuICAgICAgICAgICAgICAgICAgICAnMTAnICAgICAgICA6IFsnTlQgNi40JywgJ05UIDEwLjAnXSxcbiAgICAgICAgICAgICAgICAgICAgJ1JUJyAgICAgICAgOiAnQVJNJ1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cblxuICAgIC8vLy8vLy8vLy8vLy8vXG4gICAgLy8gUmVnZXggbWFwXG4gICAgLy8vLy8vLy8vLy8vL1xuXG5cbiAgICB2YXIgcmVnZXhlcyA9IHtcblxuICAgICAgICBicm93c2VyIDogW1tcblxuICAgICAgICAgICAgLy8gUHJlc3RvIGJhc2VkXG4gICAgICAgICAgICAvKG9wZXJhXFxzbWluaSlcXC8oW1xcd1xcLi1dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSBNaW5pXG4gICAgICAgICAgICAvKG9wZXJhXFxzW21vYmlsZXRhYl0rKS4rdmVyc2lvblxcLyhbXFx3XFwuLV0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSBNb2JpL1RhYmxldFxuICAgICAgICAgICAgLyhvcGVyYSkuK3ZlcnNpb25cXC8oW1xcd1xcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSA+IDkuODBcbiAgICAgICAgICAgIC8ob3BlcmEpW1xcL1xcc10rKFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9wZXJhIDwgOS44MFxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8ob3Bpb3MpW1xcL1xcc10rKFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9wZXJhIG1pbmkgb24gaXBob25lID49IDguMFxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnT3BlcmEgTWluaSddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvXFxzKG9wcilcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPcGVyYSBXZWJraXRcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ09wZXJhJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8vIE1peGVkXG4gICAgICAgICAgICAvKGtpbmRsZSlcXC8oW1xcd1xcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEtpbmRsZVxuICAgICAgICAgICAgLyhsdW5hc2NhcGV8bWF4dGhvbnxuZXRmcm9udHxqYXNtaW5lfGJsYXplcilbXFwvXFxzXT8oW1xcd1xcLl0rKSovaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTHVuYXNjYXBlL01heHRob24vTmV0ZnJvbnQvSmFzbWluZS9CbGF6ZXJcblxuICAgICAgICAgICAgLy8gVHJpZGVudCBiYXNlZFxuICAgICAgICAgICAgLyhhdmFudFxcc3xpZW1vYmlsZXxzbGltfGJhaWR1KSg/OmJyb3dzZXIpP1tcXC9cXHNdPyhbXFx3XFwuXSopL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEF2YW50L0lFTW9iaWxlL1NsaW1Ccm93c2VyL0JhaWR1XG4gICAgICAgICAgICAvKD86bXN8XFwoKShpZSlcXHMoW1xcd1xcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbnRlcm5ldCBFeHBsb3JlclxuXG4gICAgICAgICAgICAvLyBXZWJraXQvS0hUTUwgYmFzZWRcbiAgICAgICAgICAgIC8ocmVrb25xKVxcLyhbXFx3XFwuXSspKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmVrb25xXG4gICAgICAgICAgICAvKGNocm9taXVtfGZsb2NrfHJvY2ttZWx0fG1pZG9yaXxlcGlwaGFueXxzaWxrfHNreWZpcmV8b3ZpYnJvd3Nlcnxib2x0fGlyb258dml2YWxkaXxpcmlkaXVtfHBoYW50b21qc3xib3dzZXIpXFwvKFtcXHdcXC4tXSspL2lcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hyb21pdW0vRmxvY2svUm9ja01lbHQvTWlkb3JpL0VwaXBoYW55L1NpbGsvU2t5ZmlyZS9Cb2x0L0lyb24vSXJpZGl1bS9QaGFudG9tSlMvQm93c2VyXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyh0cmlkZW50KS4rcnZbOlxcc10oW1xcd1xcLl0rKS4rbGlrZVxcc2dlY2tvL2kgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSUUxMVxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnSUUnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhlZGdlKVxcLygoXFxkKyk/W1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTWljcm9zb2Z0IEVkZ2VcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKHlhYnJvd3NlcilcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFlhbmRleFxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnWWFuZGV4J10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8ocHVmZmluKVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUHVmZmluXG4gICAgICAgICAgICBdLCBbW05BTUUsICdQdWZmaW4nXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLygoPzpbXFxzXFwvXSl1Yz9cXHM/YnJvd3NlcnwoPzpqdWMuKyl1Y3dlYilbXFwvXFxzXT8oW1xcd1xcLl0rKS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVDQnJvd3NlclxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnVUNCcm93c2VyJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oY29tb2RvX2RyYWdvbilcXC8oW1xcd1xcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29tb2RvIERyYWdvblxuICAgICAgICAgICAgXSwgW1tOQU1FLCAvXy9nLCAnICddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKG1pY3JvbWVzc2VuZ2VyKVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlQ2hhdFxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnV2VDaGF0J10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oUVEpXFwvKFtcXGRcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUVEsIGFrYSBTaG91UVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC9tPyhxcWJyb3dzZXIpW1xcL1xcc10/KFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFFRQnJvd3NlclxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC94aWFvbWlcXC9taXVpYnJvd3NlclxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1JVUkgQnJvd3NlclxuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIFtOQU1FLCAnTUlVSSBCcm93c2VyJ11dLCBbXG5cbiAgICAgICAgICAgIC87ZmJhdlxcLyhbXFx3XFwuXSspOy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmFjZWJvb2sgQXBwIGZvciBpT1MgJiBBbmRyb2lkXG4gICAgICAgICAgICBdLCBbVkVSU0lPTiwgW05BTUUsICdGYWNlYm9vayddXSwgW1xuXG4gICAgICAgICAgICAvaGVhZGxlc3NjaHJvbWUoPzpcXC8oW1xcd1xcLl0rKXxcXHMpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaHJvbWUgSGVhZGxlc3NcbiAgICAgICAgICAgIF0sIFtWRVJTSU9OLCBbTkFNRSwgJ0Nocm9tZSBIZWFkbGVzcyddXSwgW1xuXG4gICAgICAgICAgICAvXFxzd3ZcXCkuKyhjaHJvbWUpXFwvKFtcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hyb21lIFdlYlZpZXdcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgLyguKykvLCAnJDEgV2ViVmlldyddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKCg/Om9jdWx1c3xzYW1zdW5nKWJyb3dzZXIpXFwvKFtcXHdcXC5dKykvaVxuICAgICAgICAgICAgXSwgW1tOQU1FLCAvKC4rKD86Z3x1cykpKC4rKS8sICckMSAkMiddLCBWRVJTSU9OXSwgWyAgICAgICAgICAgICAgICAvLyBPY3VsdXMgLyBTYW1zdW5nIEJyb3dzZXJcblxuICAgICAgICAgICAgL2FuZHJvaWQuK3ZlcnNpb25cXC8oW1xcd1xcLl0rKVxccysoPzptb2JpbGVcXHM/c2FmYXJpfHNhZmFyaSkqL2kgICAgICAgIC8vIEFuZHJvaWQgQnJvd3NlclxuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIFtOQU1FLCAnQW5kcm9pZCBCcm93c2VyJ11dLCBbXG5cbiAgICAgICAgICAgIC8oY2hyb21lfG9tbml3ZWJ8YXJvcmF8W3RpemVub2thXXs1fVxccz9icm93c2VyKVxcL3Y/KFtcXHdcXC5dKykvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaHJvbWUvT21uaVdlYi9Bcm9yYS9UaXplbi9Ob2tpYVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oZG9sZmluKVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG9scGhpblxuICAgICAgICAgICAgXSwgW1tOQU1FLCAnRG9scGhpbiddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKCg/OmFuZHJvaWQuKyljcm1vfGNyaW9zKVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENocm9tZSBmb3IgQW5kcm9pZC9pT1NcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ0Nocm9tZSddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGNvYXN0KVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9wZXJhIENvYXN0XG4gICAgICAgICAgICBdLCBbW05BTUUsICdPcGVyYSBDb2FzdCddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvZnhpb3NcXC8oW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpcmVmb3ggZm9yIGlPU1xuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIFtOQU1FLCAnRmlyZWZveCddXSwgW1xuXG4gICAgICAgICAgICAvdmVyc2lvblxcLyhbXFx3XFwuXSspLis/bW9iaWxlXFwvXFx3K1xccyhzYWZhcmkpL2kgICAgICAgICAgICAgICAgICAgICAgIC8vIE1vYmlsZSBTYWZhcmlcbiAgICAgICAgICAgIF0sIFtWRVJTSU9OLCBbTkFNRSwgJ01vYmlsZSBTYWZhcmknXV0sIFtcblxuICAgICAgICAgICAgL3ZlcnNpb25cXC8oW1xcd1xcLl0rKS4rPyhtb2JpbGVcXHM/c2FmYXJpfHNhZmFyaSkvaSAgICAgICAgICAgICAgICAgICAgLy8gU2FmYXJpICYgU2FmYXJpIE1vYmlsZVxuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIE5BTUVdLCBbXG5cbiAgICAgICAgICAgIC93ZWJraXQuKz8oZ3NhKVxcLyhbXFx3XFwuXSspLis/KG1vYmlsZVxccz9zYWZhcml8c2FmYXJpKShcXC9bXFx3XFwuXSspL2kgIC8vIEdvb2dsZSBTZWFyY2ggQXBwbGlhbmNlIG9uIGlPU1xuICAgICAgICAgICAgXSwgW1tOQU1FLCAnR1NBJ10sIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC93ZWJraXQuKz8obW9iaWxlXFxzP3NhZmFyaXxzYWZhcmkpKFxcL1tcXHdcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgIC8vIFNhZmFyaSA8IDMuMFxuICAgICAgICAgICAgXSwgW05BTUUsIFtWRVJTSU9OLCBtYXBwZXIuc3RyLCBtYXBzLmJyb3dzZXIub2xkc2FmYXJpLnZlcnNpb25dXSwgW1xuXG4gICAgICAgICAgICAvKGtvbnF1ZXJvcilcXC8oW1xcd1xcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEtvbnF1ZXJvclxuICAgICAgICAgICAgLyh3ZWJraXR8a2h0bWwpXFwvKFtcXHdcXC5dKykvaVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8vIEdlY2tvIGJhc2VkXG4gICAgICAgICAgICAvKG5hdmlnYXRvcnxuZXRzY2FwZSlcXC8oW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5ldHNjYXBlXG4gICAgICAgICAgICBdLCBbW05BTUUsICdOZXRzY2FwZSddLCBWRVJTSU9OXSwgW1xuICAgICAgICAgICAgLyhzd2lmdGZveCkvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTd2lmdGZveFxuICAgICAgICAgICAgLyhpY2VkcmFnb258aWNld2Vhc2VsfGNhbWlub3xjaGltZXJhfGZlbm5lY3xtYWVtb1xcc2Jyb3dzZXJ8bWluaW1vfGNvbmtlcm9yKVtcXC9cXHNdPyhbXFx3XFwuXFwrXSspL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEljZURyYWdvbi9JY2V3ZWFzZWwvQ2FtaW5vL0NoaW1lcmEvRmVubmVjL01hZW1vL01pbmltby9Db25rZXJvclxuICAgICAgICAgICAgLyhmaXJlZm94fHNlYW1vbmtleXxrLW1lbGVvbnxpY2VjYXR8aWNlYXBlfGZpcmViaXJkfHBob2VuaXgpXFwvKFtcXHdcXC4tXSspL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpcmVmb3gvU2VhTW9ua2V5L0stTWVsZW9uL0ljZUNhdC9JY2VBcGUvRmlyZWJpcmQvUGhvZW5peFxuICAgICAgICAgICAgLyhtb3ppbGxhKVxcLyhbXFx3XFwuXSspLitydlxcOi4rZ2Vja29cXC9cXGQrL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3ppbGxhXG5cbiAgICAgICAgICAgIC8vIE90aGVyXG4gICAgICAgICAgICAvKHBvbGFyaXN8bHlueHxkaWxsb3xpY2FifGRvcmlzfGFtYXlhfHczbXxuZXRzdXJmfHNsZWlwbmlyKVtcXC9cXHNdPyhbXFx3XFwuXSspL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBvbGFyaXMvTHlueC9EaWxsby9pQ2FiL0RvcmlzL0FtYXlhL3czbS9OZXRTdXJmL1NsZWlwbmlyXG4gICAgICAgICAgICAvKGxpbmtzKVxcc1xcKChbXFx3XFwuXSspL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMaW5rc1xuICAgICAgICAgICAgLyhnb2Jyb3dzZXIpXFwvPyhbXFx3XFwuXSspKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHb0Jyb3dzZXJcbiAgICAgICAgICAgIC8oaWNlXFxzP2Jyb3dzZXIpXFwvdj8oW1xcd1xcLl9dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElDRSBCcm93c2VyXG4gICAgICAgICAgICAvKG1vc2FpYylbXFwvXFxzXShbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3NhaWNcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXVxuXG4gICAgICAgICAgICAvKiAvLy8vLy8vLy8vLy8vLy8vLy8vLy9cbiAgICAgICAgICAgIC8vIE1lZGlhIHBsYXllcnMgQkVHSU5cbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xuXG4gICAgICAgICAgICAsIFtcblxuICAgICAgICAgICAgLyhhcHBsZSg/OmNvcmVtZWRpYXwpKVxcLygoXFxkKylbXFx3XFwuX10rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2VuZXJpYyBBcHBsZSBDb3JlTWVkaWFcbiAgICAgICAgICAgIC8oY29yZW1lZGlhKSB2KChcXGQrKVtcXHdcXC5fXSspL2lcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGFxdWFsdW5nfGx5c3NuYXxic3BsYXllcilcXC8oKFxcZCspP1tcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgICAvLyBBcXVhbHVuZy9MeXNzbmEvQlNQbGF5ZXJcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGFyZXN8b3NzcHJveHkpXFxzKChcXGQrKVtcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBcmVzL09TU1Byb3h5XG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhhdWRhY2lvdXN8YXVkaW11c2ljc3RyZWFtfGFtYXJva3xiYXNzfGNvcmV8ZGFsdmlrfGdub21lbXBsYXllcnxtdXNpYyBvbiBjb25zb2xlfG5zcGxheWVyfHBzcC1pbnRlcm5ldHJhZGlvcGxheWVyfHZpZGVvcylcXC8oKFxcZCspW1xcd1xcLi1dKykvaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXVkYWNpb3VzL0F1ZGlNdXNpY1N0cmVhbS9BbWFyb2svQkFTUy9PcGVuQ09SRS9EYWx2aWsvR25vbWVNcGxheWVyL01vQ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOU1BsYXllci9QU1AtSW50ZXJuZXRSYWRpb1BsYXllci9WaWRlb3NcbiAgICAgICAgICAgIC8oY2xlbWVudGluZXxtdXNpYyBwbGF5ZXIgZGFlbW9uKVxccygoXFxkKylbXFx3XFwuLV0rKS9pLCAgICAgICAgICAgICAgIC8vIENsZW1lbnRpbmUvTVBEXG4gICAgICAgICAgICAvKGxnIHBsYXllcnxuZXhwbGF5ZXIpXFxzKChcXGQrKVtcXGRcXC5dKykvaSxcbiAgICAgICAgICAgIC9wbGF5ZXJcXC8obmV4cGxheWVyfGxnIHBsYXllcilcXHMoKFxcZCspW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAvLyBOZXhQbGF5ZXIvTEcgUGxheWVyXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcbiAgICAgICAgICAgIC8obmV4cGxheWVyKVxccygoXFxkKylbXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5leHBsYXllclxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8oZmxycClcXC8oKFxcZCspW1xcd1xcLi1dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZsaXAgUGxheWVyXG4gICAgICAgICAgICBdLCBbW05BTUUsICdGbGlwIFBsYXllciddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGZzdHJlYW18bmF0aXZlaG9zdHxxdWVyeXNlZWtzcGlkZXJ8aWEtYXJjaGl2ZXJ8ZmFjZWJvb2tleHRlcm5hbGhpdCkvaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGU3RyZWFtL05hdGl2ZUhvc3QvUXVlcnlTZWVrU3BpZGVyL0lBIEFyY2hpdmVyL2ZhY2Vib29rZXh0ZXJuYWxoaXRcbiAgICAgICAgICAgIF0sIFtOQU1FXSwgW1xuXG4gICAgICAgICAgICAvKGdzdHJlYW1lcikgc291cGh0dHBzcmMgKD86XFwoW15cXCldK1xcKSl7MCwxfSBsaWJzb3VwXFwvKChcXGQrKVtcXHdcXC4tXSspL2lcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR3N0cmVhbWVyXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhodGMgc3RyZWFtaW5nIHBsYXllcilcXHNbXFx3X10rXFxzXFwvXFxzKChcXGQrKVtcXGRcXC5dKykvaSwgICAgICAgICAgICAgIC8vIEhUQyBTdHJlYW1pbmcgUGxheWVyXG4gICAgICAgICAgICAvKGphdmF8cHl0aG9uLXVybGxpYnxweXRob24tcmVxdWVzdHN8d2dldHxsaWJjdXJsKVxcLygoXFxkKylbXFx3XFwuLV9dKykvaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSmF2YS91cmxsaWIvcmVxdWVzdHMvd2dldC9jVVJMXG4gICAgICAgICAgICAvKGxhdmYpKChcXGQrKVtcXGRcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIExhdmYgKEZGTVBFRylcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGh0Y19vbmVfcylcXC8oKFxcZCspW1xcZFxcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIVEMgT25lIFNcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgL18vZywgJyAnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhtcGxheWVyKSg/Olxcc3xcXC8pKD86KD86c2hlcnB5YS0pezAsMX1zdm4pKD86LXxcXHMpKHJcXGQrKD86LVxcZCtbXFx3XFwuLV0rKXswLDF9KS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1QbGF5ZXIgU1ZOXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhtcGxheWVyKSg/Olxcc3xcXC98W3Vua293LV0rKSgoXFxkKylbXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgIC8vIE1QbGF5ZXJcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKG1wbGF5ZXIpL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1QbGF5ZXIgKG5vIG90aGVyIGluZm8pXG4gICAgICAgICAgICAvKHlvdXJtdXplKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFlvdXJNdXplXG4gICAgICAgICAgICAvKG1lZGlhIHBsYXllciBjbGFzc2ljfG5lcm8gc2hvd3RpbWUpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1lZGlhIFBsYXllciBDbGFzc2ljL05lcm8gU2hvd1RpbWVcbiAgICAgICAgICAgIF0sIFtOQU1FXSwgW1xuXG4gICAgICAgICAgICAvKG5lcm8gKD86aG9tZXxzY291dCkpXFwvKChcXGQrKVtcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOZXJvIEhvbWUvTmVybyBTY291dFxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC8obm9raWFcXGQrKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOb2tpYVxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dLCBbXG5cbiAgICAgICAgICAgIC9cXHMoc29uZ2JpcmQpXFwvKChcXGQrKVtcXHdcXC4tXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb25nYmlyZC9QaGlsaXBzLVNvbmdiaXJkXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyh3aW5hbXApMyB2ZXJzaW9uICgoXFxkKylbXFx3XFwuLV0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaW5hbXBcbiAgICAgICAgICAgIC8od2luYW1wKVxccygoXFxkKylbXFx3XFwuLV0rKS9pLFxuICAgICAgICAgICAgLyh3aW5hbXApbXBlZ1xcLygoXFxkKylbXFx3XFwuLV0rKS9pXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhvY21zLWJvdHx0YXBpbnJhZGlvfHR1bmVpbiByYWRpb3x1bmtub3dufHdpbmFtcHxpbmxpZ2h0IHJhZGlvKS9pICAvLyBPQ01TLWJvdC90YXAgaW4gcmFkaW8vdHVuZWluL3Vua25vd24vd2luYW1wIChubyBvdGhlciBpbmZvKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmxpZ2h0IHJhZGlvXG4gICAgICAgICAgICBdLCBbTkFNRV0sIFtcblxuICAgICAgICAgICAgLyhxdWlja3RpbWV8cm1hfHJhZGlvYXBwfHJhZGlvY2xpZW50YXBwbGljYXRpb258c291bmR0YXB8dG90ZW18c3RhZ2VmcmlnaHR8c3RyZWFtaXVtKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFF1aWNrVGltZS9SZWFsTWVkaWEvUmFkaW9BcHAvUmFkaW9DbGllbnRBcHBsaWNhdGlvbi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU291bmRUYXAvVG90ZW0vU3RhZ2VmcmlnaHQvU3RyZWFtaXVtXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLyhzbXApKChcXGQrKVtcXGRcXC5dKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTTVBcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKHZsYykgbWVkaWEgcGxheWVyIC0gdmVyc2lvbiAoKFxcZCspW1xcd1xcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgIC8vIFZMQyBWaWRlb2xhblxuICAgICAgICAgICAgLyh2bGMpXFwvKChcXGQrKVtcXHdcXC4tXSspL2ksXG4gICAgICAgICAgICAvKHhibWN8Z3Zmc3x4aW5lfHhtbXN8aXJhcHApXFwvKChcXGQrKVtcXHdcXC4tXSspL2ksICAgICAgICAgICAgICAgICAgICAvLyBYQk1DL2d2ZnMvWGluZS9YTU1TL2lyYXBwXG4gICAgICAgICAgICAvKGZvb2JhcjIwMDApXFwvKChcXGQrKVtcXGRcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGb29iYXIyMDAwXG4gICAgICAgICAgICAvKGl0dW5lcylcXC8oKFxcZCspW1xcZFxcLl0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpVHVuZXNcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKHdtcGxheWVyKVxcLygoXFxkKylbXFx3XFwuLV0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaW5kb3dzIE1lZGlhIFBsYXllclxuICAgICAgICAgICAgLyh3aW5kb3dzLW1lZGlhLXBsYXllcilcXC8oKFxcZCspW1xcd1xcLi1dKykvaVxuICAgICAgICAgICAgXSwgW1tOQU1FLCAvLS9nLCAnICddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvd2luZG93c1xcLygoXFxkKylbXFx3XFwuLV0rKSB1cG5wXFwvW1xcZFxcLl0rIGRsbmFkb2NcXC9bXFxkXFwuXSsgKGhvbWUgbWVkaWEgc2VydmVyKS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdpbmRvd3MgTWVkaWEgU2VydmVyXG4gICAgICAgICAgICBdLCBbVkVSU0lPTiwgW05BTUUsICdXaW5kb3dzJ11dLCBbXG5cbiAgICAgICAgICAgIC8oY29tXFwucmlzZXVwcmFkaW9hbGFybSlcXC8oKFxcZCspW1xcZFxcLl0qKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSaXNlVVAgUmFkaW8gQWxhcm1cbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKHJhZC5pbylcXHMoKFxcZCspW1xcZFxcLl0rKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSYWQuaW9cbiAgICAgICAgICAgIC8ocmFkaW8uKD86ZGV8YXR8ZnIpKVxccygoXFxkKylbXFxkXFwuXSspL2lcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ3JhZC5pbyddLCBWRVJTSU9OXVxuXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vXG4gICAgICAgICAgICAvLyBNZWRpYSBwbGF5ZXJzIEVORFxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8qL1xuXG4gICAgICAgIF0sXG5cbiAgICAgICAgY3B1IDogW1tcblxuICAgICAgICAgICAgLyg/OihhbWR8eCg/Oig/Ojg2fDY0KVtfLV0pP3x3b3d8d2luKTY0KVs7XFwpXS9pICAgICAgICAgICAgICAgICAgICAgLy8gQU1ENjRcbiAgICAgICAgICAgIF0sIFtbQVJDSElURUNUVVJFLCAnYW1kNjQnXV0sIFtcblxuICAgICAgICAgICAgLyhpYTMyKD89OykpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJQTMyIChxdWlja3RpbWUpXG4gICAgICAgICAgICBdLCBbW0FSQ0hJVEVDVFVSRSwgdXRpbC5sb3dlcml6ZV1dLCBbXG5cbiAgICAgICAgICAgIC8oKD86aVszNDZdfHgpODYpWztcXCldL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElBMzJcbiAgICAgICAgICAgIF0sIFtbQVJDSElURUNUVVJFLCAnaWEzMiddXSwgW1xuXG4gICAgICAgICAgICAvLyBQb2NrZXRQQyBtaXN0YWtlbmx5IGlkZW50aWZpZWQgYXMgUG93ZXJQQ1xuICAgICAgICAgICAgL3dpbmRvd3NcXHMoY2V8bW9iaWxlKTtcXHNwcGM7L2lcbiAgICAgICAgICAgIF0sIFtbQVJDSElURUNUVVJFLCAnYXJtJ11dLCBbXG5cbiAgICAgICAgICAgIC8oKD86cHBjfHBvd2VycGMpKD86NjQpPykoPzpcXHNtYWN8O3xcXCkpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQb3dlclBDXG4gICAgICAgICAgICBdLCBbW0FSQ0hJVEVDVFVSRSwgL293ZXIvLCAnJywgdXRpbC5sb3dlcml6ZV1dLCBbXG5cbiAgICAgICAgICAgIC8oc3VuNFxcdylbO1xcKV0vaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTUEFSQ1xuICAgICAgICAgICAgXSwgW1tBUkNISVRFQ1RVUkUsICdzcGFyYyddXSwgW1xuXG4gICAgICAgICAgICAvKCg/OmF2cjMyfGlhNjQoPz07KSl8NjhrKD89XFwpKXxhcm0oPzo2NHwoPz12XFxkKzspKXwoPz1hdG1lbFxccylhdnJ8KD86aXJpeHxtaXBzfHNwYXJjKSg/OjY0KT8oPz07KXxwYS1yaXNjKS9pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElBNjQsIDY4SywgQVJNLzY0LCBBVlIvMzIsIElSSVgvNjQsIE1JUFMvNjQsIFNQQVJDLzY0LCBQQS1SSVNDXG4gICAgICAgICAgICBdLCBbW0FSQ0hJVEVDVFVSRSwgdXRpbC5sb3dlcml6ZV1dXG4gICAgICAgIF0sXG5cbiAgICAgICAgZGV2aWNlIDogW1tcblxuICAgICAgICAgICAgL1xcKChpcGFkfHBsYXlib29rKTtbXFx3XFxzXFwpOy1dKyhyaW18YXBwbGUpL2kgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaVBhZC9QbGF5Qm9va1xuICAgICAgICAgICAgXSwgW01PREVMLCBWRU5ET1IsIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYXBwbGVjb3JlbWVkaWFcXC9bXFx3XFwuXSsgXFwoKGlwYWQpLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpUGFkXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdBcHBsZSddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgLyhhcHBsZVxcc3swLDF9dHYpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXBwbGUgVFZcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdBcHBsZSBUViddLCBbVkVORE9SLCAnQXBwbGUnXV0sIFtcblxuICAgICAgICAgICAgLyhhcmNob3MpXFxzKGdhbWVwYWQyPykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXJjaG9zXG4gICAgICAgICAgICAvKGhwKS4rKHRvdWNocGFkKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhQIFRvdWNoUGFkXG4gICAgICAgICAgICAvKGhwKS4rKHRhYmxldCkvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhQIFRhYmxldFxuICAgICAgICAgICAgLyhraW5kbGUpXFwvKFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBLaW5kbGVcbiAgICAgICAgICAgIC9cXHMobm9vaylbXFx3XFxzXStidWlsZFxcLyhcXHcrKS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOb29rXG4gICAgICAgICAgICAvKGRlbGwpXFxzKHN0cmVhW2twclxcc1xcZF0qW1xcZGtvXSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBEZWxsIFN0cmVha1xuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvKGtmW0Etel0rKVxcc2J1aWxkXFwvW1xcd1xcLl0rLipzaWxrXFwvL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gS2luZGxlIEZpcmUgSERcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0FtYXpvbiddLCBbVFlQRSwgVEFCTEVUXV0sIFtcbiAgICAgICAgICAgIC8oc2R8a2YpWzAzNDloaWpvcnN0dXddK1xcc2J1aWxkXFwvW1xcd1xcLl0rLipzaWxrXFwvL2kgICAgICAgICAgICAgICAgICAvLyBGaXJlIFBob25lXG4gICAgICAgICAgICBdLCBbW01PREVMLCBtYXBwZXIuc3RyLCBtYXBzLmRldmljZS5hbWF6b24ubW9kZWxdLCBbVkVORE9SLCAnQW1hem9uJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvXFwoKGlwW2hvbmVkfFxcc1xcdypdKyk7LisoYXBwbGUpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlQb2QvaVBob25lXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFZFTkRPUiwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvXFwoKGlwW2hvbmVkfFxcc1xcdypdKyk7L2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlQb2QvaVBob25lXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdBcHBsZSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgLyhibGFja2JlcnJ5KVtcXHMtXT8oXFx3KykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJsYWNrQmVycnlcbiAgICAgICAgICAgIC8oYmxhY2tiZXJyeXxiZW5xfHBhbG0oPz1cXC0pfHNvbnllcmljc3NvbnxhY2VyfGFzdXN8ZGVsbHxtZWl6dXxtb3Rvcm9sYXxwb2x5dHJvbilbXFxzXy1dPyhbXFx3LV0rKSovaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmVuUS9QYWxtL1NvbnktRXJpY3Nzb24vQWNlci9Bc3VzL0RlbGwvTWVpenUvTW90b3JvbGEvUG9seXRyb25cbiAgICAgICAgICAgIC8oaHApXFxzKFtcXHdcXHNdK1xcdykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhQIGlQQVFcbiAgICAgICAgICAgIC8oYXN1cyktPyhcXHcrKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFzdXNcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC9cXChiYjEwO1xccyhcXHcrKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmxhY2tCZXJyeSAxMFxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnQmxhY2tCZXJyeSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXN1cyBUYWJsZXRzXG4gICAgICAgICAgICAvYW5kcm9pZC4rKHRyYW5zZm9bcHJpbWVcXHNdezQsMTB9XFxzXFx3K3xlZWVwY3xzbGlkZXJcXHNcXHcrfG5leHVzIDd8cGFkZm9uZSkvaVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnQXN1cyddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgLyhzb255KVxccyh0YWJsZXRcXHNbcHNdKVxcc2J1aWxkXFwvL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNvbnlcbiAgICAgICAgICAgIC8oc29ueSk/KD86c2dwLispXFxzYnVpbGRcXC8vaVxuICAgICAgICAgICAgXSwgW1tWRU5ET1IsICdTb255J10sIFtNT0RFTCwgJ1hwZXJpYSBUYWJsZXQnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG4gICAgICAgICAgICAvYW5kcm9pZC4rXFxzKFtjLWddXFxkezR9fHNvWy1sXVxcdyspXFxzYnVpbGRcXC8vaVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnU29ueSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL1xccyhvdXlhKVxccy9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE91eWFcbiAgICAgICAgICAgIC8obmludGVuZG8pXFxzKFt3aWRzM3VdKykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5pbnRlbmRvXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIENPTlNPTEVdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rO1xccyhzaGllbGQpXFxzYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTnZpZGlhXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdOdmlkaWEnXSwgW1RZUEUsIENPTlNPTEVdXSwgW1xuXG4gICAgICAgICAgICAvKHBsYXlzdGF0aW9uXFxzWzM0cG9ydGFibGV2aV0rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQbGF5c3RhdGlvblxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnU29ueSddLCBbVFlQRSwgQ09OU09MRV1dLCBbXG5cbiAgICAgICAgICAgIC8oc3ByaW50XFxzKFxcdyspKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTcHJpbnQgUGhvbmVzXG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgbWFwcGVyLnN0ciwgbWFwcy5kZXZpY2Uuc3ByaW50LnZlbmRvcl0sIFtNT0RFTCwgbWFwcGVyLnN0ciwgbWFwcy5kZXZpY2Uuc3ByaW50Lm1vZGVsXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8obGVub3ZvKVxccz8oUyg/OjUwMDB8NjAwMCkrKD86Wy1dW1xcdytdKSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMZW5vdm8gdGFibGV0c1xuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvKGh0YylbO19cXHMtXSsoW1xcd1xcc10rKD89XFwpKXxcXHcrKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSFRDXG4gICAgICAgICAgICAvKHp0ZSktKFxcdyspKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBaVEVcbiAgICAgICAgICAgIC8oYWxjYXRlbHxnZWVrc3Bob25lfGxlbm92b3xuZXhpYW58cGFuYXNvbmljfCg/PTtcXHMpc29ueSlbX1xccy1dPyhbXFx3LV0rKSovaVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBbGNhdGVsL0dlZWtzUGhvbmUvTGVub3ZvL05leGlhbi9QYW5hc29uaWMvU29ueVxuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgW01PREVMLCAvXy9nLCAnICddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgLyhuZXh1c1xcczkpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSFRDIE5leHVzIDlcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0hUQyddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2RcXC9odWF3ZWkoW1xcd1xccy1dKylbO1xcKV0vaSxcbiAgICAgICAgICAgIC8obmV4dXNcXHM2cCkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEh1YXdlaVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnSHVhd2VpJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvKG1pY3Jvc29mdCk7XFxzKGx1bWlhW1xcc1xcd10rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1pY3Jvc29mdCBMdW1pYVxuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvW1xcc1xcKDtdKHhib3goPzpcXHNvbmUpPylbXFxzXFwpO10vaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTWljcm9zb2Z0IFhib3hcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ01pY3Jvc29mdCddLCBbVFlQRSwgQ09OU09MRV1dLCBbXG4gICAgICAgICAgICAvKGtpblxcLltvbmV0d117M30pL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNaWNyb3NvZnQgS2luXG4gICAgICAgICAgICBdLCBbW01PREVMLCAvXFwuL2csICcgJ10sIFtWRU5ET1IsICdNaWNyb3NvZnQnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW90b3JvbGFcbiAgICAgICAgICAgIC9cXHMobWlsZXN0b25lfGRyb2lkKD86WzItNHhdfFxccyg/OmJpb25pY3x4Mnxwcm98cmF6cikpPyg6P1xcczRnKT8pW1xcd1xcc10rYnVpbGRcXC8vaSxcbiAgICAgICAgICAgIC9tb3RbXFxzLV0/KFxcdyspKi9pLFxuICAgICAgICAgICAgLyhYVFxcZHszLDR9KSBidWlsZFxcLy9pLFxuICAgICAgICAgICAgLyhuZXh1c1xcczYpL2lcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ01vdG9yb2xhJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgL2FuZHJvaWQuK1xccyhtejYwXFxkfHhvb21bXFxzMl17MCwyfSlcXHNidWlsZFxcLy9pXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdNb3Rvcm9sYSddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2hiYnR2XFwvXFx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gICAgICAvKHNhbVtzdW5nXSopW1xccy1dKihcXHcrLT9bXFx3LV0qKSovaSxcbiAgICAgICAgICAgIC9zZWMtKChzZ2hcXHcrKSkvaVxuICAgICAgICAgICAgXSwgW1tWRU5ET1IsICdTYW1zdW5nJ10sIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL3NpZS0oXFx3KykqL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2llbWVuc1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnU2llbWVucyddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgLyhtYWVtb3xub2tpYSkuKihuOTAwfGx1bWlhXFxzXFxkKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5va2lhXG4gICAgICAgICAgICAvKG5va2lhKVtcXHNfLV0/KFtcXHctXSspKi9pXG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgJ05va2lhJ10sIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWRcXHMzXFwuW1xcc1xcdzstXXsxMH0oYVxcZHszfSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFjZXJcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0FjZXInXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLisoW3ZsXWtcXC0/XFxkezN9KVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTEcgVGFibGV0XG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdMRyddLCBbVFlQRSwgVEFCTEVUXV0sIFtcbiAgICAgICAgICAgIC9hbmRyb2lkXFxzM1xcLltcXHNcXHc7LV17MTB9KGxnPyktKFswNmN2OV17Myw0fSkvaSAgICAgICAgICAgICAgICAgICAgIC8vIExHIFRhYmxldFxuICAgICAgICAgICAgXSwgW1tWRU5ET1IsICdMRyddLCBNT0RFTCwgW1RZUEUsIFRBQkxFVF1dLCBbXG4gICAgICAgICAgICAvKGxnKSBuZXRjYXN0XFwudHYvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMRyBTbWFydFRWXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIFNNQVJUVFZdXSwgW1xuICAgICAgICAgICAgLyhuZXh1c1xcc1s0NV0pL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTEdcbiAgICAgICAgICAgIC9sZ1tlO1xcc1xcLy1dKyhcXHcrKSovaSxcbiAgICAgICAgICAgIC9hbmRyb2lkLitsZyhcXC0/W1xcZFxcd10rKVxccytidWlsZC9pXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdMRyddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuKyhpZGVhdGFiW2EtejAtOVxcLVxcc10rKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIExlbm92b1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTGVub3ZvJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvbGludXg7LisoKGpvbGxhKSk7L2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEpvbGxhXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8oKHBlYmJsZSkpYXBwXFwvW1xcZFxcLl0rXFxzL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBlYmJsZVxuICAgICAgICAgICAgXSwgW1ZFTkRPUiwgTU9ERUwsIFtUWVBFLCBXRUFSQUJMRV1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLis7XFxzKG9wcG8pXFxzPyhbXFx3XFxzXSspXFxzYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPUFBPXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC9jcmtleS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR29vZ2xlIENocm9tZWNhc3RcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdDaHJvbWVjYXN0J10sIFtWRU5ET1IsICdHb29nbGUnXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuKztcXHMoZ2xhc3MpXFxzXFxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHb29nbGUgR2xhc3NcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0dvb2dsZSddLCBbVFlQRSwgV0VBUkFCTEVdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rO1xccyhwaXhlbCBjKVxccy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR29vZ2xlIFBpeGVsIENcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ0dvb2dsZSddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuKztcXHMocGl4ZWwgeGx8cGl4ZWwpXFxzL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdvb2dsZSBQaXhlbFxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnR29vZ2xlJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rKFxcdyspXFxzK2J1aWxkXFwvaG1cXDEvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBYaWFvbWkgSG9uZ21pICdudW1lcmljJyBtb2RlbHNcbiAgICAgICAgICAgIC9hbmRyb2lkLisoaG1bXFxzXFwtX10qbm90ZT9bXFxzX10qKD86XFxkXFx3KT8pXFxzK2J1aWxkL2ksICAgICAgICAgICAgICAgLy8gWGlhb21pIEhvbmdtaVxuICAgICAgICAgICAgL2FuZHJvaWQuKyhtaVtcXHNcXC1fXSooPzpvbmV8b25lW1xcc19dcGx1c3xub3RlIGx0ZSk/W1xcc19dKig/OlxcZFxcdyk/KVxccytidWlsZC9pLCAgICAvLyBYaWFvbWkgTWlcbiAgICAgICAgICAgIC9hbmRyb2lkLisocmVkbWlbXFxzXFwtX10qKD86bm90ZSk/KD86W1xcc19dKltcXHdcXHNdKyk/KVxccytidWlsZC9pICAgICAgLy8gUmVkbWkgUGhvbmVzXG4gICAgICAgICAgICBdLCBbW01PREVMLCAvXy9nLCAnICddLCBbVkVORE9SLCAnWGlhb21pJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuICAgICAgICAgICAgL2FuZHJvaWQuKyhtaVtcXHNcXC1fXSooPzpwYWQpPyg/OltcXHNfXSpbXFx3XFxzXSspPylcXHMrYnVpbGQvaSAgICAgICAgICAvLyBNaSBQYWQgdGFibGV0c1xuICAgICAgICAgICAgXSxbW01PREVMLCAvXy9nLCAnICddLCBbVkVORE9SLCAnWGlhb21pJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuICAgICAgICAgICAgL2FuZHJvaWQuKztcXHMobVsxLTVdXFxzbm90ZSlcXHNidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNZWl6dSBUYWJsZXRcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ01laXp1J10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rYTAwMCgxKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPbmVQbHVzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdPbmVQbHVzJ10sIFtUWVBFLCBNT0JJTEVdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rWztcXC9dXFxzKihSQ1RbXFxkXFx3XSspXFxzK2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUkNBIFRhYmxldHNcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1JDQSddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooVmVudWVbXFxkXFxzXSopXFxzK2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIERlbGwgVmVudWUgVGFibGV0c1xuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnRGVsbCddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooUVtUfE1dW1xcZFxcd10rKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFZlcml6b24gVGFibGV0XG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdWZXJpem9uJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rWztcXC9dXFxzKyhCYXJuZXNbJlxcc10rTm9ibGVcXHMrfEJOW1JUXSkoVj8uKilcXHMrYnVpbGQvaSAgICAgLy8gQmFybmVzICYgTm9ibGUgVGFibGV0XG4gICAgICAgICAgICBdLCBbW1ZFTkRPUiwgJ0Jhcm5lcyAmIE5vYmxlJ10sIE1PREVMLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccysoVE1cXGR7M30uKlxcYilcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJhcm5lcyAmIE5vYmxlIFRhYmxldFxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnTnVWaXNpb24nXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKHp0ZSk/Lisoa1xcZHsyfSlcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgIC8vIFpURSBLIFNlcmllcyBUYWJsZXRcbiAgICAgICAgICAgIF0sIFtbVkVORE9SLCAnWlRFJ10sIE1PREVMLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuK1s7XFwvXVxccyooZ2VuXFxkezN9KVxccytidWlsZC4qNDloL2kgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3dpc3MgR0VOIE1vYmlsZVxuICAgICAgICAgICAgXSwgW01PREVMLCBbVkVORE9SLCAnU3dpc3MnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLitbO1xcL11cXHMqKHp1clxcZHszfSlcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFN3aXNzIFpVUiBUYWJsZXRcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1N3aXNzJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuXG4gICAgICAgICAgICAvYW5kcm9pZC4rWztcXC9dXFxzKigoWmVraSk/VEIuKlxcYilcXHMrYnVpbGQvaSAgICAgICAgICAgICAgICAgICAgICAgICAvLyBaZWtpIFRhYmxldHNcbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1pla2knXSwgW1RZUEUsIF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GQvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSb3RvciBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdSb3RvciddLCBbVFlQRSwgVEFCTEVUXV0sIFtcblxuICAgICAgICAgICAgL2FuZHJvaWQuKyhLUyguKykpXFxzK2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQW1hem9uIEtpbmRsZSBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdBbWF6b24nXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9hbmRyb2lkLisoR2lnYXNldClbXFxzXFwtXSsoUS4rKVxccytidWlsZC9pICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2lnYXNldCBUYWJsZXRzXG4gICAgICAgICAgICBdLCBbVkVORE9SLCBNT0RFTCwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC9cXHModGFibGV0fHRhYilbO1xcL10vaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVbmlkZW50aWZpYWJsZSBUYWJsZXRcbiAgICAgICAgICAgIC9cXHMobW9iaWxlKSg/Ols7XFwvXXxcXHNzYWZhcmkpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVW5pZGVudGlmaWFibGUgTW9iaWxlXG4gICAgICAgICAgICBdLCBbW1RZUEUsIHV0aWwubG93ZXJpemVdLCBWRU5ET1IsIE1PREVMXSwgW1xuXG4gICAgICAgICAgICAvKGFuZHJvaWQuKylbO1xcL10uK2J1aWxkL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHZW5lcmljIEFuZHJvaWQgRGV2aWNlXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdHZW5lcmljJ11dXG5cblxuICAgICAgICAvKi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXG4gICAgICAgICAgICAvLyBUT0RPOiBtb3ZlIHRvIHN0cmluZyBtYXBcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cblxuICAgICAgICAgICAgLyhDNjYwMykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb255IFhwZXJpYSBaIEM2NjAzXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnWHBlcmlhIFogQzY2MDMnXSwgW1ZFTkRPUiwgJ1NvbnknXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKEM2OTAzKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNvbnkgWHBlcmlhIFogMVxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ1hwZXJpYSBaIDEnXSwgW1ZFTkRPUiwgJ1NvbnknXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8oU00tRzkwMFtGfEhdKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2Ftc3VuZyBHYWxheHkgUzVcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdHYWxheHkgUzUnXSwgW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKFNNLUc3MTAyKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmcgR2FsYXh5IEdyYW5kIDJcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdHYWxheHkgR3JhbmQgMiddLCBbVkVORE9SLCAnU2Ftc3VuZyddLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC8oU00tRzUzMEgpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2Ftc3VuZyBHYWxheHkgR3JhbmQgUHJpbWVcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdHYWxheHkgR3JhbmQgUHJpbWUnXSwgW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKFNNLUczMTNIWikvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmcgR2FsYXh5IFZcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdHYWxheHkgViddLCBbVkVORE9SLCAnU2Ftc3VuZyddLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC8oU00tVDgwNSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2Ftc3VuZyBHYWxheHkgVGFiIFMgMTAuNVxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ0dhbGF4eSBUYWIgUyAxMC41J10sIFtWRU5ET1IsICdTYW1zdW5nJ10sIFtUWVBFLCBUQUJMRVRdXSwgW1xuICAgICAgICAgICAgLyhTTS1HODAwRikvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTYW1zdW5nIEdhbGF4eSBTNSBNaW5pXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnR2FsYXh5IFM1IE1pbmknXSwgW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG4gICAgICAgICAgICAvKFNNLVQzMTEpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhbXN1bmcgR2FsYXh5IFRhYiAzIDguMFxuICAgICAgICAgICAgXSwgW1tNT0RFTCwgJ0dhbGF4eSBUYWIgMyA4LjAnXSwgW1ZFTkRPUiwgJ1NhbXN1bmcnXSwgW1RZUEUsIFRBQkxFVF1dLCBbXG5cbiAgICAgICAgICAgIC8oVDNDKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWR2YW4gVmFuZHJvaWQgVDNDXG4gICAgICAgICAgICBdLCBbTU9ERUwsIFtWRU5ET1IsICdBZHZhbiddLCBbVFlQRSwgVEFCTEVUXV0sIFtcbiAgICAgICAgICAgIC8oQURWQU4gVDFKXFwrKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkdmFuIFZhbmRyb2lkIFQxSitcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdWYW5kcm9pZCBUMUorJ10sIFtWRU5ET1IsICdBZHZhbiddLCBbVFlQRSwgVEFCTEVUXV0sIFtcbiAgICAgICAgICAgIC8oQURWQU4gUzRBKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWR2YW4gVmFuZHJvaWQgUzRBXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnVmFuZHJvaWQgUzRBJ10sIFtWRU5ET1IsICdBZHZhbiddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgLyhWOTcyTSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBaVEUgVjk3Mk1cbiAgICAgICAgICAgIF0sIFtNT0RFTCwgW1ZFTkRPUiwgJ1pURSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcblxuICAgICAgICAgICAgLyhpLW1vYmlsZSlcXHMoSVFcXHNbXFxkXFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaS1tb2JpbGUgSVFcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC8oSVE2LjMpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaS1tb2JpbGUgSVEgSVEgNi4zXG4gICAgICAgICAgICBdLCBbW01PREVMLCAnSVEgNi4zJ10sIFtWRU5ET1IsICdpLW1vYmlsZSddLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC8oaS1tb2JpbGUpXFxzKGktc3R5bGVcXHNbXFxkXFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGktbW9iaWxlIGktU1RZTEVcbiAgICAgICAgICAgIF0sIFtWRU5ET1IsIE1PREVMLCBbVFlQRSwgTU9CSUxFXV0sIFtcbiAgICAgICAgICAgIC8oaS1TVFlMRTIuMSkvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaS1tb2JpbGUgaS1TVFlMRSAyLjFcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdpLVNUWUxFIDIuMSddLCBbVkVORE9SLCAnaS1tb2JpbGUnXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8obW9iaWlzdGFyIHRvdWNoIExBSSA1MTIpL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbW9iaWlzdGFyIHRvdWNoIExBSSA1MTJcbiAgICAgICAgICAgIF0sIFtbTU9ERUwsICdUb3VjaCBMQUkgNTEyJ10sIFtWRU5ET1IsICdtb2JpaXN0YXInXSwgW1RZUEUsIE1PQklMRV1dLCBbXG5cbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy9cbiAgICAgICAgICAgIC8vIEVORCBUT0RPXG4gICAgICAgICAgICAvLy8vLy8vLy8vLyovXG5cbiAgICAgICAgXSxcblxuICAgICAgICBlbmdpbmUgOiBbW1xuXG4gICAgICAgICAgICAvd2luZG93cy4rXFxzZWRnZVxcLyhbXFx3XFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBFZGdlSFRNTFxuICAgICAgICAgICAgXSwgW1ZFUlNJT04sIFtOQU1FLCAnRWRnZUhUTUwnXV0sIFtcblxuICAgICAgICAgICAgLyhwcmVzdG8pXFwvKFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQcmVzdG9cbiAgICAgICAgICAgIC8od2Via2l0fHRyaWRlbnR8bmV0ZnJvbnR8bmV0c3VyZnxhbWF5YXxseW54fHczbSlcXC8oW1xcd1xcLl0rKS9pLCAgICAgLy8gV2ViS2l0L1RyaWRlbnQvTmV0RnJvbnQvTmV0U3VyZi9BbWF5YS9MeW54L3czbVxuICAgICAgICAgICAgLyhraHRtbHx0YXNtYW58bGlua3MpW1xcL1xcc11cXCg/KFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEtIVE1ML1Rhc21hbi9MaW5rc1xuICAgICAgICAgICAgLyhpY2FiKVtcXC9cXHNdKFsyM11cXC5bXFxkXFwuXSspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlDYWJcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvcnZcXDooW1xcd1xcLl0rKS4qKGdlY2tvKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdlY2tvXG4gICAgICAgICAgICBdLCBbVkVSU0lPTiwgTkFNRV1cbiAgICAgICAgXSxcblxuICAgICAgICBvcyA6IFtbXG5cbiAgICAgICAgICAgIC8vIFdpbmRvd3MgYmFzZWRcbiAgICAgICAgICAgIC9taWNyb3NvZnRcXHMod2luZG93cylcXHModmlzdGF8eHApL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaW5kb3dzIChpVHVuZXMpXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcbiAgICAgICAgICAgIC8od2luZG93cylcXHNudFxcczZcXC4yO1xccyhhcm0pL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdpbmRvd3MgUlRcbiAgICAgICAgICAgIC8od2luZG93c1xcc3Bob25lKD86XFxzb3MpKilbXFxzXFwvXT8oW1xcZFxcLlxcc10rXFx3KSovaSwgICAgICAgICAgICAgICAgICAvLyBXaW5kb3dzIFBob25lXG4gICAgICAgICAgICAvKHdpbmRvd3NcXHNtb2JpbGV8d2luZG93cylbXFxzXFwvXT8oW250Y2VcXGRcXC5cXHNdK1xcdykvaVxuICAgICAgICAgICAgXSwgW05BTUUsIFtWRVJTSU9OLCBtYXBwZXIuc3RyLCBtYXBzLm9zLndpbmRvd3MudmVyc2lvbl1dLCBbXG4gICAgICAgICAgICAvKHdpbig/PTN8OXxuKXx3aW5cXHM5eFxccykoW250XFxkXFwuXSspL2lcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ1dpbmRvd3MnXSwgW1ZFUlNJT04sIG1hcHBlci5zdHIsIG1hcHMub3Mud2luZG93cy52ZXJzaW9uXV0sIFtcblxuICAgICAgICAgICAgLy8gTW9iaWxlL0VtYmVkZGVkIE9TXG4gICAgICAgICAgICAvXFwoKGJiKSgxMCk7L2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCbGFja0JlcnJ5IDEwXG4gICAgICAgICAgICBdLCBbW05BTUUsICdCbGFja0JlcnJ5J10sIFZFUlNJT05dLCBbXG4gICAgICAgICAgICAvKGJsYWNrYmVycnkpXFx3KlxcLz8oW1xcd1xcLl0rKSovaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCbGFja2JlcnJ5XG4gICAgICAgICAgICAvKHRpemVuKVtcXC9cXHNdKFtcXHdcXC5dKykvaSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaXplblxuICAgICAgICAgICAgLyhhbmRyb2lkfHdlYm9zfHBhbG1cXHNvc3xxbnh8YmFkYXxyaW1cXHN0YWJsZXRcXHNvc3xtZWVnb3xjb250aWtpKVtcXC9cXHMtXT8oW1xcd1xcLl0rKSovaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQW5kcm9pZC9XZWJPUy9QYWxtL1FOWC9CYWRhL1JJTS9NZWVHby9Db250aWtpXG4gICAgICAgICAgICAvbGludXg7Lisoc2FpbGZpc2gpOy9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNhaWxmaXNoIE9TXG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sIFtcbiAgICAgICAgICAgIC8oc3ltYmlhblxccz9vc3xzeW1ib3N8czYwKD89OykpW1xcL1xccy1dPyhbXFx3XFwuXSspKi9pICAgICAgICAgICAgICAgICAvLyBTeW1iaWFuXG4gICAgICAgICAgICBdLCBbW05BTUUsICdTeW1iaWFuJ10sIFZFUlNJT05dLCBbXG4gICAgICAgICAgICAvXFwoKHNlcmllczQwKTsvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTZXJpZXMgNDBcbiAgICAgICAgICAgIF0sIFtOQU1FXSwgW1xuICAgICAgICAgICAgL21vemlsbGEuK1xcKG1vYmlsZTsuK2dlY2tvLitmaXJlZm94L2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmlyZWZveCBPU1xuICAgICAgICAgICAgXSwgW1tOQU1FLCAnRmlyZWZveCBPUyddLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvLyBDb25zb2xlXG4gICAgICAgICAgICAvKG5pbnRlbmRvfHBsYXlzdGF0aW9uKVxccyhbd2lkczM0cG9ydGFibGV2dV0rKS9pLCAgICAgICAgICAgICAgICAgICAvLyBOaW50ZW5kby9QbGF5c3RhdGlvblxuXG4gICAgICAgICAgICAvLyBHTlUvTGludXggYmFzZWRcbiAgICAgICAgICAgIC8obWludClbXFwvXFxzXFwoXT8oXFx3KykqL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1pbnRcbiAgICAgICAgICAgIC8obWFnZWlhfHZlY3RvcmxpbnV4KVs7XFxzXS9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1hZ2VpYS9WZWN0b3JMaW51eFxuICAgICAgICAgICAgLyhqb2xpfFtreGxuXT91YnVudHV8ZGViaWFufFtvcGVuXSpzdXNlfGdlbnRvb3woPz1cXHMpYXJjaHxzbGFja3dhcmV8ZmVkb3JhfG1hbmRyaXZhfGNlbnRvc3xwY2xpbnV4b3N8cmVkaGF0fHplbndhbGt8bGlucHVzKVtcXC9cXHMtXT8oPyFjaHJvbSkoW1xcd1xcLi1dKykqL2ksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEpvbGkvVWJ1bnR1L0RlYmlhbi9TVVNFL0dlbnRvby9BcmNoL1NsYWNrd2FyZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGZWRvcmEvTWFuZHJpdmEvQ2VudE9TL1BDTGludXhPUy9SZWRIYXQvWmVud2Fsay9MaW5wdXNcbiAgICAgICAgICAgIC8oaHVyZHxsaW51eClcXHM/KFtcXHdcXC5dKykqL2ksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSHVyZC9MaW51eFxuICAgICAgICAgICAgLyhnbnUpXFxzPyhbXFx3XFwuXSspKi9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHTlVcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSwgW1xuXG4gICAgICAgICAgICAvKGNyb3MpXFxzW1xcd10rXFxzKFtcXHdcXC5dK1xcdykvaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENocm9taXVtIE9TXG4gICAgICAgICAgICBdLCBbW05BTUUsICdDaHJvbWl1bSBPUyddLCBWRVJTSU9OXSxbXG5cbiAgICAgICAgICAgIC8vIFNvbGFyaXNcbiAgICAgICAgICAgIC8oc3Vub3MpXFxzPyhbXFx3XFwuXStcXGQpKi9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNvbGFyaXNcbiAgICAgICAgICAgIF0sIFtbTkFNRSwgJ1NvbGFyaXMnXSwgVkVSU0lPTl0sIFtcblxuICAgICAgICAgICAgLy8gQlNEIGJhc2VkXG4gICAgICAgICAgICAvXFxzKFtmcmVudG9wYy1dezAsNH1ic2R8ZHJhZ29uZmx5KVxccz8oW1xcd1xcLl0rKSovaSAgICAgICAgICAgICAgICAgICAvLyBGcmVlQlNEL05ldEJTRC9PcGVuQlNEL1BDLUJTRC9EcmFnb25GbHlcbiAgICAgICAgICAgIF0sIFtOQU1FLCBWRVJTSU9OXSxbXG5cbiAgICAgICAgICAgIC8oaGFpa3UpXFxzKFxcdyspL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhhaWt1XG4gICAgICAgICAgICBdLCBbTkFNRSwgVkVSU0lPTl0sW1xuXG4gICAgICAgICAgICAvY2ZuZXR3b3JrXFwvLitkYXJ3aW4vaSxcbiAgICAgICAgICAgIC9pcFtob25lYWRdKyg/Oi4qb3NcXHMoW1xcd10rKVxcc2xpa2VcXHNtYWN8O1xcc29wZXJhKS9pICAgICAgICAgICAgICAgICAvLyBpT1NcbiAgICAgICAgICAgIF0sIFtbVkVSU0lPTiwgL18vZywgJy4nXSwgW05BTUUsICdpT1MnXV0sIFtcblxuICAgICAgICAgICAgLyhtYWNcXHNvc1xcc3gpXFxzPyhbXFx3XFxzXFwuXStcXHcpKi9pLFxuICAgICAgICAgICAgLyhtYWNpbnRvc2h8bWFjKD89X3Bvd2VycGMpXFxzKS9pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTWFjIE9TXG4gICAgICAgICAgICBdLCBbW05BTUUsICdNYWMgT1MnXSwgW1ZFUlNJT04sIC9fL2csICcuJ11dLCBbXG5cbiAgICAgICAgICAgIC8vIE90aGVyXG4gICAgICAgICAgICAvKCg/Om9wZW4pP3NvbGFyaXMpW1xcL1xccy1dPyhbXFx3XFwuXSspKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb2xhcmlzXG4gICAgICAgICAgICAvKGFpeClcXHMoKFxcZCkoPz1cXC58XFwpfFxccylbXFx3XFwuXSopKi9pLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBSVhcbiAgICAgICAgICAgIC8ocGxhblxcczl8bWluaXh8YmVvc3xvc1xcLzJ8YW1pZ2Fvc3xtb3JwaG9zfHJpc2NcXHNvc3xvcGVudm1zKS9pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQbGFuOS9NaW5peC9CZU9TL09TMi9BbWlnYU9TL01vcnBoT1MvUklTQ09TL09wZW5WTVNcbiAgICAgICAgICAgIC8odW5peClcXHM/KFtcXHdcXC5dKykqL2kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVU5JWFxuICAgICAgICAgICAgXSwgW05BTUUsIFZFUlNJT05dX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5nZXREZXZpY2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZGV2aWNlID0geyB2ZW5kb3I6IHVuZGVmaW5lZCwgbW9kZWw6IHVuZGVmaW5lZCwgdHlwZTogdW5kZWZpbmVkIH07XG4gICAgICAgICAgICBtYXBwZXIucmd4LmNhbGwoZGV2aWNlLCB1YSwgcmd4bWFwLmRldmljZSk7XG4gICAgICAgICAgICByZXR1cm4gZGV2aWNlO1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLmdldEVuZ2luZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBlbmdpbmUgPSB7IG5hbWU6IHVuZGVmaW5lZCwgdmVyc2lvbjogdW5kZWZpbmVkIH07XG4gICAgICAgICAgICBtYXBwZXIucmd4LmNhbGwoZW5naW5lLCB1YSwgcmd4bWFwLmVuZ2luZSk7XG4gICAgICAgICAgICByZXR1cm4gZW5naW5lO1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLmdldE9TID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIG9zID0geyBuYW1lOiB1bmRlZmluZWQsIHZlcnNpb246IHVuZGVmaW5lZCB9O1xuICAgICAgICAgICAgbWFwcGVyLnJneC5jYWxsKG9zLCB1YSwgcmd4bWFwLm9zKTtcbiAgICAgICAgICAgIHJldHVybiBvcztcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5nZXRSZXN1bHQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHVhICAgICAgOiB0aGlzLmdldFVBKCksXG4gICAgICAgICAgICAgICAgYnJvd3NlciA6IHRoaXMuZ2V0QnJvd3NlcigpLFxuICAgICAgICAgICAgICAgIGVuZ2luZSAgOiB0aGlzLmdldEVuZ2luZSgpLFxuICAgICAgICAgICAgICAgIG9zICAgICAgOiB0aGlzLmdldE9TKCksXG4gICAgICAgICAgICAgICAgZGV2aWNlICA6IHRoaXMuZ2V0RGV2aWNlKCksXG4gICAgICAgICAgICAgICAgY3B1ICAgICA6IHRoaXMuZ2V0Q1BVKClcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuZ2V0VUEgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdWE7XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuc2V0VUEgPSBmdW5jdGlvbiAodWFzdHJpbmcpIHtcbiAgICAgICAgICAgIHVhID0gdWFzdHJpbmc7XG4gICAgICAgICAgICAvL2Jyb3dzZXIgPSBuZXcgQnJvd3NlcigpO1xuICAgICAgICAgICAgLy9jcHUgPSBuZXcgQ1BVKCk7XG4gICAgICAgICAgICAvL2RldmljZSA9IG5ldyBEZXZpY2UoKTtcbiAgICAgICAgICAgIC8vZW5naW5lID0gbmV3IEVuZ2luZSgpO1xuICAgICAgICAgICAgLy9vcyA9IG5ldyBPUygpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG5cbiAgICBVQVBhcnNlci5WRVJTSU9OID0gTElCVkVSU0lPTjtcbiAgICBVQVBhcnNlci5CUk9XU0VSID0ge1xuICAgICAgICBOQU1FICAgIDogTkFNRSxcbiAgICAgICAgTUFKT1IgICA6IE1BSk9SLCAvLyBkZXByZWNhdGVkXG4gICAgICAgIFZFUlNJT04gOiBWRVJTSU9OXG4gICAgfTtcbiAgICBVQVBhcnNlci5DUFUgPSB7XG4gICAgICAgIEFSQ0hJVEVDVFVSRSA6IEFSQ0hJVEVDVFVSRVxuICAgIH07XG4gICAgVUFQYXJzZXIuREVWSUNFID0ge1xuICAgICAgICBNT0RFTCAgIDogTU9ERUwsXG4gICAgICAgIFZFTkRPUiAgOiBWRU5ET1IsXG4gICAgICAgIFRZUEUgICAgOiBUWVBFLFxuICAgICAgICBDT05TT0xFIDogQ09OU09MRSxcbiAgICAgICAgTU9CSUxFICA6IE1PQklMRSxcbiAgICAgICAgU01BUlRUViA6IFNNQVJUVFYsXG4gICAgICAgIFRBQkxFVCAgOiBUQUJMRVQsXG4gICAgICAgIFdFQVJBQkxFOiBXRUFSQUJMRSxcbiAgICAgICAgRU1CRURERUQ6IEVNQkVEREVEXG4gICAgfTtcbiAgICBVQVBhcnNlci5FTkdJTkUgPSB7XG4gICAgICAgIE5BTUUgICAgOiBOQU1FLFxuICAgICAgICBWRVJTSU9OIDogVkVSU0lPTlxuICAgIH07XG4gICAgVUFQYXJzZXIuT1MgPSB7XG4gICAgICAgIE5BTUUgICAgOiBOQU1FLFxuICAgICAgICBWRVJTSU9OIDogVkVSU0lPTlxuICAgIH07XG4gICAgLy9VQVBhcnNlci5VdGlscyA9IHV0aWw7XG5cbiAgICAvLy8vLy8vLy8vL1xuICAgIC8vIEV4cG9ydFxuICAgIC8vLy8vLy8vLy9cblxuXG4gICAgLy8gY2hlY2sganMgZW52aXJvbm1lbnRcbiAgICBpZiAodHlwZW9mKGV4cG9ydHMpICE9PSBVTkRFRl9UWVBFKSB7XG4gICAgICAgIC8vIG5vZGVqcyBlbnZcbiAgICAgICAgaWYgKHR5cGVvZiBtb2R1bGUgIT09IFVOREVGX1RZUEUgJiYgbW9kdWxlLmV4cG9ydHMpIHtcbiAgICAgICAgICAgIGV4cG9ydHMgPSBtb2R1bGUuZXhwb3J0cyA9IFVBUGFyc2VyO1xuICAgICAgICB9XG4gICAgICAgIC8vIFRPRE86IHRlc3QhISEhISEhIVxuICAgICAgICAvKlxuICAgICAgICBpZiAocmVxdWlyZSAmJiByZXF1aXJlLm1haW4gPT09IG1vZHVsZSAmJiBwcm9jZXNzKSB7XG4gICAgICAgICAgICAvLyBjbGlcbiAgICAgICAgICAgIHZhciBqc29uaXplID0gZnVuY3Rpb24gKGFycikge1xuICAgICAgICAgICAgICAgIHZhciByZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpIGluIGFycikge1xuICAgICAgICAgICAgICAgICAgICByZXMucHVzaChuZXcgVUFQYXJzZXIoYXJyW2ldKS5nZXRSZXN1bHQoKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHByb2Nlc3Muc3Rkb3V0LndyaXRlKEpTT04uc3RyaW5naWZ5KHJlcywgbnVsbCwgMikgKyAnXFxuJyk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaWYgKHByb2Nlc3Muc3RkaW4uaXNUVFkpIHtcbiAgICAgICAgICAgICAgICAvLyB2aWEgYXJnc1xuICAgICAgICAgICAgICAgIGpzb25pemUocHJvY2Vzcy5hcmd2LnNsaWNlKDIpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gdmlhIHBpcGVcbiAgICAgICAgICAgICAgICB2YXIgc3RyID0gJyc7XG4gICAgICAgICAgICAgICAgcHJvY2Vzcy5zdGRpbi5vbigncmVhZGFibGUnLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlYWQgPSBwcm9jZXNzLnN0ZGluLnJlYWQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSByZWFkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcHJvY2Vzcy5zdGRpbi5vbignZW5kJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBqc29uaXplKHN0ci5yZXBsYWNlKC9cXG4kLywgJycpLnNwbGl0KCdcXG4nKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgKi9cbiAgICAgICAgZXhwb3J0cy5VQVBhcnNlciA9IFVBUGFyc2VyO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJlcXVpcmVqcyBlbnYgKG9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gICAgICBmdW5jdGlvbiBvbigpIHtcclxuICAgICAgICAgICAgc2VsZi5vZmYoZXZlbnQsIG9uKTtcclxuICAgICAgICAgICAgZnVuYy5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLm9uKGV2ZW50LCBncm91cCwgb24pO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfTtcclxuXHJcbiAgICAvLyBVbmJpbmRzIGFuIGVudGlyZSBncm91cFxyXG4gICAgcHJvdG90eXBlLnJlbGVhc2VHcm91cCA9IGZ1bmN0aW9uIChncm91cE5hbWUpIHtcclxuICAgICAgICB0aGlzLmNhbGxiYWNrcyA9IHRoaXMuY2FsbGJhY2tzIHx8IHt9O1xyXG4gICAgICAgIHZhciBpdGVtLCBpLCBsZW4sIGhhbmRsZXJzO1xyXG4gICAgICAgIGZvciAoaXRlbSBpbiB0aGlzLmNhbGxiYWNrcykge1xyXG4gICAgICAgICAgICBoYW5kbGVycyA9IHRoaXMuY2FsbGJhY2tzW2l0ZW1dO1xyXG4gICAgICAgICAgICBmb3IgKGkgPSAwLCBsZW4gPSBoYW5kbGVycy5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGhhbmRsZXJzW2ldLl9ncm91cE5hbWUgPT09IGdyb3VwTmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coJ3JlbW92aW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gcmVtb3ZlIGl0IGFuZCBzaG9ydGVuIHRoZSBhcnJheSB3ZSdyZSBsb29waW5nIHRocm91Z2hcclxuICAgICAgICAgICAgICAgICAgICBoYW5kbGVycy5zcGxpY2UoaSwgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xyXG4gICAgICAgICAgICAgICAgICAgIGxlbi0tO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAg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hbmRsZXJzXHJcbiAgICBwcm90b3R5cGUuZW1pdCA9IGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgIHRoaXMuY2FsbGJhY2tzID0gdGhpcy5jYWxsYmFja3MgfHwge307XHJcbiAgICAgICAgdmFyIGFyZ3MgPSBbXS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSksXHJcbiAgICAgICAgICAgIGNhbGxiYWNrcyA9IHRoaXMuY2FsbGJhY2tzW2V2ZW50XSxcclxuICAgICAgICAgICAgc3BlY2lhbENhbGxiYWNrcyA9IHRoaXMuZ2V0V2lsZGNhcmRDYWxsYmFja3MoZXZlbnQpLFxyXG4gICAgICAgICAgICBpLFxyXG4gICAgICAgICAgICBsZW4sXHJcbiAgICAgICAgICAgIGl0ZW0sXHJcbiAgICAgICAgICAgIGxpc3RlbmVycztcclxuXHJcbiAgICAgICAgaWYgKGNhbGxiYWNrcykge1xyXG4gICAgICAgICAgICBsaXN0ZW5lcnMgPSBjYWxsYmFja3Muc2xpY2UoKTtcclxuICAgICAgICAgICAgZm9yIChpID0gMCwgbGVuID0gbGlzdGVuZXJzLmxlbmd0aDsgaSA8IGxlbjsgKytpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWxpc3RlbmVyc1tpXSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGlzdGVuZXJzW2ldLmFwcGx5KHRoaXMsIGFyZ3MpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoc3BlY2lhbENhbGxiYWNrcykge1xyXG4gICAgICAgICAgICBsZW4gPSBzcGVjaWFsQ2FsbGJhY2tzLmxlbmd0aDtcclxuICAgICAgICAgICAgbGlzdGVuZXJzID0gc3BlY2lhbENhbGxiYWNrcy5zbGljZSgpO1xyXG4gICAgICAgICAgICBmb3IgKGkgPSAwLCBsZW4gPSBsaXN0Z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BlcnR5KGkpICYmICh2YWx1ZSA9IGV2dFtpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gUGFzcyB0aGUgc2luZ2xlIGxpc3RlbmVyIHN0cmFpZ2h0IHRocm91Z2ggdG8gdGhlIHNpbmd1bGFyIG1ldGhvZFxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaW5nbGUuY2FsbCh0aGlzLCBpLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPdGhlcndpc2UgcGFzcyBiYWNrIHRvIHRoZSBtdWx0aXBsZSBmdW5jdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUuY2FsbCh0aGlzLCBpLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAvLyBTbyBldnQgbXVzdCBiZSBhIHN0cmluZ1xuICAgICAgICAgICAgLy8gQW5kIGxpc3RlbmVycyBtdXN0IGJlIGFuIGFycmF5IG9mIGxpc3RlbmVyc1xuICAgICAgICAgICAgLy8gTG9vcCBvdmVyIGl0IGFuZCBwYXNzIGVhY2ggb25lIHRvIHRoZSBtdWx0aXBsZSBtZXRob2RcbiAgICAgICAgICAgIGkgPSBsaXN0ZW5lcnMubGVuZ3RoO1xuICAgICAgICAgICAgd2hpbGUgKGktLSkge1xuICAgICAgICAgICAgICAgIHNpbmdsZS5jYWxsKHRoaXMsIGV2dCwgbGlzdGVuZXJzW2ldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG5cbiAgICAvKipcbiAgIC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GlzdGVuZXJzTWFwLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnNNYXBba2V5XS5zbGljZSgwKTtcblxuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsaXN0ZW5lcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIGxpc3RlbmVyIHJldHVybnMgdHJ1ZSB0aGVuIGl0IHNoYWxsIGJlIHJlbW92ZWQgZnJvbSB0aGUgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhlIGZ1bmN0aW9uIGlzIGV4ZWN1dGVkIGVpdGhlciB3aXRoIGEgYmFzaWMgY2FsbCBvciBhbiBhcHBseSBpZiB0aGVyZSBpcyBhbiBhcmdzIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIGxpc3RlbmVyID0gbGlzdGVuZXJzW2ldO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0ZW5lci5vbmNlID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUxpc3RlbmVyKGV2dCwgbGlzdGVuZXIubGlzdGVuZXIpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBsaXN0ZW5lci5saXN0ZW5lci5hcHBseSh0aGlzLCBhcmdzIHx8IFtdKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UgPT09IHRoaXMuX2dldE9uY2VSZXR1cm5WYWx1ZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUxpc3RlbmVyKGV2dCwgbGlzdGVuZXIubGlzdGVuZXIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJu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IgZXhhbXBsZSlcbiAgICAgKi9cbiAgICBkYXRhOiBzdHJpbmc7XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgc3RyZWFtOiBTdHJlYW07XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgb3B0aW9uczogQ29ubmVjdGlvbk9wdGlvbnMgfCB1bmRlZmluZWQ7XG5cbiAgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgZGlzcG9zZWQgPSBmYWxzZTtcblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBjb25zdHJ1Y3Rvcihwcml2YXRlIHNlc3Npb246IFNlc3Npb24sIG9wdHM/OiBDb25uZWN0aW9uT3B0aW9ucykge1xuXG4gICAgICAgIGxldCBtc2cgPSBcIidDb25uZWN0aW9uJyBjcmVhdGVkIFwiO1xuICAgICAgICBpZiAoISFvcHRzKSB7XG4gICAgICAgICAgICBtc2cgKz0gXCIocmVtb3RlKSB3aXRoICdjb25uZWN0aW9uSWQnIFtcIiArIG9wdHMuaWQgKyAnXSc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBtc2cgKz0gJyhsb2NhbCknO1xuICAgICAgICB9XG4gICAgICAgIGNvbnNvbGUuaW5mbyhtc2cpO1xuXG4gICAgICAgIHRoaXMub3B0aW9ucyA9IG9wdHM7XG5cbiAgICAgICAgaWYgKCEhb3B0cykge1xuICAgICAgICAgICAgLy8gQ29ubmVjdGlvbiBpcyByZW1vdGVcbiAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbklkID0gb3B0cy5pZDtcbiAgICAgICAgICAgIGlmIChvcHRzLm1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kYXRhID0gb3B0cy5tZXRhZGF0YTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChvcHRzLnN0cmVhbXMpIHtcbiAgICAgICAgICA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ICd2aWRlby93ZWJtO2NvZGVjcz1oMjY0JyB9O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKE1lZGlhUmVjb3JkZXIuaXNUeXBlU3VwcG9ydGVkKCd2aWRlby93ZWJtO2NvZGVjcz12cDgnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucyA9IHsgbWltZVR5cGU6ICd2aWRlby93ZWJtO2NvZGVjcz12cDgnIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ1VzaW5nIG1pbWVUeXBlICcgKyBvcHRpb25zLm1pbWVUeXBlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyID0gbmV3IE1lZGlhUmVjb3JkZXIodGhpcy5zdHJlYW0uZ2V0TWVkaWFTdHJlYW0oKSwgb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdpc1R5cGVTdXBwb3J0ZWQgaXMgbm90IHN1cHBvcnRlZCwgdXNpbmcgZGVmYXVsdCBjb2RlY3MgZm9yIGJyb3dzZXInKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyID0gbmV3IE1lZGlhUmVjb3JkZXIodGhpcy5zdHJlYW0uZ2V0TWVkaWFTdHJlYW0oKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyLnN0YXJ0KDEwKTtcblxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbmRhdGFhdmFpbGFibGUgPSAoZSkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuY2h1bmtzLnB1c2goZS5kYXRhKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbmVycm9yID0gKGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdNZWRpYVJlY29yZGVyIGVycm9yOiAnLCBlKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbnN0YXJ0ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdNZWRpYVJlY29yZGVyIHN0YXJ0ZWQgKHN0YXRlPScgKyB0aGlzLm1lZGlhUmVjb3JkZXIuc3RhdGUgKyAnKScpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5tZWRpYVJlY29yZGVyLm9uc3RvcCA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLm9uU3RvcERlZmF1bHQoKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubWVkaWFSZWNvcmRlci5vbnBhdXNlID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdNZWRpYVJlY29yZGVyIHBhdXNlZCAoc3RhdGU9JyArIHRoaXMubWVkaWFSZWNvcmRlci5zdGF0ZSArICcpJyk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLm1lZGlhUmVjb3JkZXIub25yZXN1bWUgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ01lZGlhUmVjb3JkZXIgcmVzdW1lZCAoc3RhdGU9JyArIHRoaXMubWVkaWFSZWNvcmRlci5zdGF0ZSArICcpJyk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLm1lZGlhUmVjb3JkZXIub253YXJuaW5nID0gKGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnTWVkaWFSZWNvcmRlciB3YXJuaW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gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaHR0cC5vbnJlYWR5c3RhdGVjaGFuZ2UgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChodHRwLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChodHRwLnN0YXR1cy50b1N0cmluZygpLmNoYXJBdCgwKSA9PT0gJzInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3VjY2VzcyByZXNwb25zZSBmcm9tIHNlcnZlciAoSFRUUCBzdGF0dXMgc3RhbmRhcmQ6IDJYWCBpcyBzdWNjZXNzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoaHR0cC5yZXNwb25zZVRleHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoaHR0cC5zdGF0dXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBodHRwLnNlbmQodGhpcy5ibG9iKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG5cbiAgICAvKipcbiAgICAgKiBVcGxvYWRzIHRoZSByZWNvcmRlZCB2aWRlbyBhcyBhIG11bHRpcGFydCBmaWxlIHBlcmZvcm1pbmcgYW4gSFRUUC9QT1NUIG9wZXJhdGlvbiB0byBVUkwgYGVuZHBvaW50YC4gW1tzdGF0ZV1dIHByb3BlcnR5IG11c3QgYmUgYEZJTklTSEVEYC4gT3B0aW9uYWwgSFRUUCBoZWFkZXJzIGNhbiBiZSBwYXNzZWQgYXMgc2Vjb25kIHBhcmFtZXRlci4gRm9yIGV4YW1wbGU6XG4gICAgICogYGBgXG4gICAgICogdmFyIGhlYWRlcnMgPSB7XG4gICAgICogIFwiQ29va2llXCI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AgICAgICAgIGh0dHAub3BlbignUE9TVCcsIGVuZHBvaW50LCB0cnVlKTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaGVhZGVycyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgb2YgT2JqZWN0LmtleXMoaGVhZGVycykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0dHAuc2V0UmVxdWVzdEhlYWRlcihrZXksIGhlYWRlcnNba2V5XSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzZW5kYWJsZSA9IG5ldyBGb3JtRGF0YSgpO1xuICAgICAgICAgICAgICAgIHNlbmRhYmxlLmFwcGVuZCgnZmlsZScsIHRoaXMuYmxvYiwgdGhpcy5pZCArICcud2VibScpO1xuXG4gICAgICAgICAgICAgICAgaHR0cC5vbnJlYWR5c3RhdGVjaGFuZ2UgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChodHRwLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChodHRwLnN0YXR1cy50b1N0cmluZygpLmNoYXJBdCgwKSA9PT0gJzInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3VjY2VzcyByZXNwb25zZSBmcm9tIHNlcnZlciAoSFRUUCBzdGF0dXMgc3RhbmRhcmQ6IDJYWCBpcyBzdWNjZXNzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoaHR0cC5yZXNwb25zZVRleHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoaHR0cC5zdGF0dXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblx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Q3VzdG9tIHNjcmVlbiBzaGFyaW5nIGV4dGVuc2lvbiBmb3IgQ2hyb21lXG5cbiAgICAgICAgICAgICAgICBjb25zdCBleHRlbnNpb25JZCA9IHRoaXMuYWR2YW5jZWRDb25maWd1cmF0aW9uLnNjcmVlblNoYXJlQ2hyb21lRXh0ZW5zaW9uLnNwbGl0KCcvJykucG9wKCkhIS50cmltKCk7XG4gICAgICAgICAgICAgICAgc2NyZWVuU2hhcmluZy5nZXRDaHJvbWVFeHRlbnNpb25TdGF0dXMoZXh0ZW5zaW9uSWQsIChzdGF0dXMpID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmIChzdGF0dXMgPT09ICdpbnN0YWxsZWQtZW5hYmxlZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NyZWVuU2hhcmluZy5nZXRTY3JlZW5Db25zdHJhaW50cygoZXJyb3IsIHNjcmVlbkNvbnN0cmFpbnRzKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKCEhZXJyb3IgJiYgZXJyb3IgPT09ICdwZXJtaXNzaW9uLWRlbmllZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0NBUFRVUkVfREVOSUVELCAnWW91IG11c3QgYWxsb3cgYWNjZXNzIHRvIG9uZSB3aW5kb3cgb2YgeW91ciBkZXNrdG9wJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHMudmlkZW8gPSBzY3JlZW5Db25zdHJhaW50cztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUobWVkaWFDb25zdHJhaW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGlmIChzdGF0dXMgPT09ICdpbnN0YWxsZWQtZGlzYWJsZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0VYVEVOU0lPTl9ESVNBQkxFRCwgJ1lvdSBtdXN0IGVuYWJsZSB0aGUgc2NyZWVuIGV4dGVuc2lvbicpO1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGlmIChzdGF0dXMgPT09ICdub3QtaW5zdGFsbGVkJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLlNDUkVFTl9FWFRFTlNJT05fTk9UX0lOU1RBTExFRCwgKDxzdHJpbmc+dGhpcy5hZHZhbmNlZENvbmZpZ3VyYXRpb24uc2NyZWVuU2hhcmVDaHJvbWVFeHRlbnNpb24pKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAvLyBEZWZhdWx0IHNjcmVlbiBzaGFyaW5nIGV4dGVuc2lvbiBmb3IgQ2hyb21lXG5cbiAgICAgICAgICAgICAgICBzY3JlZW5TaGFyaW5nQXV0by5nZXRTY3JlZW5JZCgoZXJyb3IsIHNvdXJjZUlkLCBzY3JlZW5Db25zdHJhaW50cykgPT4ge1xuICAgICAgICAgICAgICAgICAgaWYgKCEhZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yID09PSAnbm90LWluc3RhbGxlZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLlNDUkVFTl9FWFRFTlNJT05fTk9UX0lOU1RBTExFRCwgJ2h0dHBzOi8vY2hyb21lLmdvb2dsZS5jb20vd2Vic3RvcmUvZGV0YWlsL3NjcmVlbi1jYXB0dXJpbmcvYWpoaWZkZGlta2FwZ2NpZmdjb2RtbWZkbGtuYWhmZmsnKTtcbiAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGVycm9yID09PSAnaW5zdGFsbGVkLWRpc2FibGVkJykge1xuICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IE9wZW5WaWR1RXJyb3IoT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0VYVEVOU0lPTl9ESVNBQkxFRCwgJ1lvdSBtdXN0IGVuYWJsZSB0aGUgc2NyZWVuIGV4dGVuc2lvbicpO1xuICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXJyb3IgPT09ICdwZXJtaXNzaW9uLWRlbmllZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLlNDUkVFTl9DQVBUVVJFX0RFTklFRCwgJ1lvdSBtdXN0IGFsbG93IGFjY2VzcyB0byBvbmUgd2luZG93IG9mIHlvdXIgZGVza3RvcCcpO1xuICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHMudmlkZW8gPSBzY3JlZW5Db25zdHJhaW50cy52aWRlbztcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShtZWRpYUNvbnN0cmFpbnRzKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHB1Ymxpc2hlclByb3BlcnRpZXMudmlkZW9Tb3VyY2UgPSAnc2NyZWVuJztcblxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tc3RyaW5nLWxpdGVyYWxcbiAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHMudmlkZW9bJ2RldmljZUlkJ10gPSB7IGV4YWN0OiBwdWJsaXNoZXJQcm9wZXJ0aWVzLnZpZGVvU291cmNlIH07XG4gICAgICAgICAgICByZXNvbHZlKG1lZGlhQ29uc3RyYWludHMpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXNvbHZlKG1lZGlhQ29uc3RyYWludHMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXNvbHZlKG1lZGlhQ29uc3RyYWludHMpO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqIEBoaWRkZW5cbiAgICovXG4gIHN0YXJ0V3Mob25Db25uZ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50LWNyZWF0ZWQtYnktc3RyZWFtJywgKGVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pZCA9IGVsZW1lbnQuaWQ7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCd2aWRlb0VsZW1lbnRDcmVhdGVkJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudChlbGVtZW50LmVsZW1lbnQsIHRoaXMsICd2aWRlb0VsZW1lbnRDcmVhdGVkJyldKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAodHlwZSA9PT0gJ3ZpZGVvUGxheWluZycpIHtcbiAgICAgICAgICAgIGNvbnN0IHZpZGVvID0gdGhpcy5zdHJlYW0uZ2V0VmlkZW9FbGVtZW50KCk7XG4gICAgICAgICAgICBpZiAoIXRoaXMuc3RyZWFtLmRpc3BsYXlNeVJlbW90ZSgpICYmIHZpZGVvICYmXG4gICAgICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPiAwICYmXG4gICAgICAgICAgICAgICAgdmlkZW8ucGF1c2VkID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLmVuZGVkID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudCh0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKSwgdGhpcywgJ3ZpZGVvUGxheWluZycpXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyZWFtLm9uKCd2aWRlby1pcy1wbGF5aW5nJywgKGVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbn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5wcm9wZXJ0aWVzLnZpZGVvU291cmNlKSkge1xuICAgICAgICAgICAgICAgICAgICBtZWRpYVN0cmVhbS5yZW1vdmVUcmFjayhtZWRpYVN0cmVhbS5nZXRWaWRlb1RyYWNrcygpWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgbWVkaWFTdHJlYW0uYWRkVHJhY2soKDxNZWRpYVN0cmVhbVRyYWNrPnRoaXMucHJvcGVydGllcy52aWRlb1NvdXJjZSkpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFwcGx5IFB1Ymxpc2hlclByb3BlcnRpZXMucHVibGlzaEF1ZGlvIGFuZCBQdWJsaXNoZXJQcm9wZXJ0aWVzLnB1Ymxpc2hWaWRlb1xuICAgICAgICAgICAgICAgIGlmICghIW1lZGlhU3RyZWFtLmdldEF1ZGlvVHJhY2tzKClbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgbWVkaWFTdHJlYW0uZ2V0QXVkaW9UcmFja3MoKVswXS5lbmFibGVkID0gISF0aGlzLnN0cmVhbS5vdXRib3VuZFN0cmVhbU9wdHMucHVibGlzaGVyUHJvcGVydGllcy5wdWJsaXNoQXVkaW87XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghIW1lZGlhU3RyZWFtLmdldFZpZGVvVHJhY2tzKClbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgbWVkaWFTdHJlYW0uZ2V0VmlkZW9UcmFja3MoKVswXS5lbmFibGVkID0gISF0aGlzLnN0cmVhbS5vdXRib3VuZFN0cmVhbU9wdHMucHVibGlzaGVyUHJvcGVydGllcy5wdWJsaXNoVmlkZW87XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0uc2V0TWVkaWFTdHJlYW0obWVkaWFTdHJlYW0pO1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyZWFtLmluc2VydFZpZGVvKHRoaXMuZWxlbWVudCwgPFZp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FpbnRzID0ge307XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRpbWVGb3JEaWFsb2dFdmVudCA9IDEyNTA7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RyZWFtLmlzU2VuZFZpZGVvKCkpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHNBdXguYXVkaW8gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzQXV4LnZpZGVvID0gY29uc3RyYWludHMudmlkZW87XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGFydFRpbWUgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRQZXJtaXNzaW9uRGlhbG9nVGltZXIodGltZUZvckRpYWxvZ0V2ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdG9yLm1lZGlhRGV2aWNlcy5nZXRVc2VyTWVkaWEoY29uc3RyYWludHNBdXgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4odmlkZW9Pbmx5U3RyZWFtID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhclBlcm1pc3Npb25EaWFsb2dUaW1lcihzdGFydFRpbWUsIHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RyZWFtLmlzU2VuZEF1ZGlvKCkpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHNBdXguYXVkaW8gPSAoY29uc3RyYWludHMuYXVkaW8gPT09IHVuZGVmaW5lZCkgPyB0cnVlIDogY29uc3RyYWludHMuYXVkaW87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50c0F1eC52aWRlbyA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydFRpbWUgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRQZXJtaXNzaW9uRGlhbG9nVGltZXIodGltZUZvckRpYWxvZ0V2ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdG9yLm1lZGlhRGV2aWNlcy5nZXRVc2VyTWVkaWEoY29uc3RyYWludHNBdXgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oYXVkaW9Pbmx5U3RyZWFtID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhclBlcm1pc3Npb25EaWFsb2dUaW1lcihzdGFydFRpbWUsIHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Pbmx5U3RyZWFtLmFkZFRyYWNrKGF1ZGlvT25seVN0cmVhbS5nZXRBdWRpb1RyYWNrcygpWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc0NhbGxiYWNrKHZpZGVvT25seVN0cmVhbSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNsZWFyUGVybWlzc2lvbkRpYWxvZ1RpbWVyKHN0YXJ0VGltZSwgdGltZUZvckRpYWxvZ0V2ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb09ubHlTdHJlYW0uZ2V0VmlkZW9UcmFja3MoKS5mb3JFYWNoKCh0cmFjaykgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2suc3RvcCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChlcnJvci5uYW1lLnRvTG93ZXJDYXNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGZvdW5kZXJyb3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLklOUFVUX0FVRElPX0RFVklDRV9OT1RfRk9VTkQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGFsbG93ZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuTUlDUk9QSE9ORV9BQ0NFU1NfREVOSUVEO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdvdmVyY29uc3RyYWluZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLmNvbnN0cmFpbnQudG9Mb3dlckNhc2UoKSA9PT0gJ2RldmljZWlkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5JTlBVVF9BVURJT19ERVZJQ0VfTk9UX0ZPVU5EO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSBcIkF1ZGlvIGlucHV0IGRldmljZSB3aXRoIGRldmljZUlkICdcIiArICg8Q29uc3RyYWluRE9NU3RyaW5nUGFyYW1ldGVycz4oPE1lZGlhVHJhY2tDb25zdHJhaW50cz5jb25zdHJhaW50cy5hdWRpbykuZGV2aWNlSWQhISkuZXhhY3QgKyBcIicgbm90IGZvdW5kXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuUFVCTElTSEVSX1BST1BFUlRJRVNfRVJST1I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IFwiQXVkaW8gaW5wdXQgZGV2aWNlIGRvZXNuJ3Qgc3VwcG9ydCB0aGUgdmFsdWUgcGFzc2VkIGZvciBjb25zdHJhaW50ICdcIiArIGVycm9yLmNvbnN0cmFpbnQgKyBcIidcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JDYWxsYmFjayhuZXcgT3BlblZpZHVFcnJvcihlcnJvck5hbWUsIGVycm9yTWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc0NhbGxiYWNrKHZpZGVvT25seVN0cmVhbSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJQZXJtaXNzaW9uRGlhbG9nVGltZXIoc3RhcnRUaW1lLCB0aW1lRm9yRGlhbG9nRXZlbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlcnJvck5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlcnJvck1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZXJyb3IubmFtZS50b0xvd2VyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdub3Rmb3VuZGVycm9yJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5JTlBVVF9WSURFT19ERVZJQ0VfTk9UX0ZPVU5EO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdub3RhbGxvd2VkZXJyb3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IHRoaXMuc3RyZWFtLmlzU2VuZFNjcmVlbigpID8gT3BlblZpZHVFcnJvck5hbWUuU0NSRUVOX0NBUFRVUkVfREVOSUVEIDogT3BlblZpZHVFcnJvck5hbWUuQ0FNRVJBX0FDQ0VTU19ERU5JRUQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ292ZXJjb25zdHJhaW5lZGVycm9yJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IuY29uc3RyYWludC50b0xvd2VyQ2FzZSgpID09PSAnZGV2aWNlaWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLklOUFVUX1ZJREVPX0RFVklDRV9OT1RfRk9VTkQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IFwiVmlkZW8gaW5wdXQgZGV2aWNlIHdpdGggZGV2aWNlSWQgJ1wiICsgKDxDb25zdHJhaW5ET01TdHJpbmdQYXJhbWV0ZXJzPig8TWVkaWFUcmFja0NvbnN0cmFpbnRzPmNvbnN0cmFpbnRzLnZpZGVvKS5kZXZpY2VJZCEhKS5leGFjdCArIFwiJyBub3QgZm91bmRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5QVUJMSVNIRVJfUFJPUEVSVElFU19FUlJPUjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gXCJWaWRlbyBpbnB1dCBkZXZpY2UgZG9lc24ndCBzdXBwb3J0IHRoZSB2YWx1ZSBwYXNzZWQgZm9yIGNvbnN0cmFpbnQgJ1wiICsgZXJyb3IuY29uc3RyYWludCArIFwiJ1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvckNhbGxiYWNrKG5ldyBPcGVuVmlkdUVycm9yKGVycm9yTmFtZSwgZXJyb3JNZXNzYWdlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnN0cmVhbS5pc1NlbmRBdWRpbygpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzQXV4LmF1ZGlvID0gKGNvbnN0cmFpbnRzLmF1ZGlvID09PSB1bmRlZmluZWQpID8gdHJ1ZSA6IGNvbnN0cmFpbnRzLmF1ZGlvO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHNBdXgudmlkZW8gPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RhcnRUaW1lID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0UGVybWlzc2lvbkRpYWxvZ1RpbWVyKHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIG5hdmlnYXRvci5tZWRpYURldmljZXMuZ2V0VXNlck1lZGlhKGNvbnN0cmFpbnRzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKGF1ZGlvT25seVN0cmVhbSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJQZXJtaXNzaW9uRGlhbG9nVGltZXIoc3RhcnRUaW1lLCB0aW1lRm9yRGlhbG9nRXZlbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NDYWxsYmFjayhhdWRpb09ubHlTdHJlYW0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhclBlcm1pc3Npb25EaWFsb2dUaW1lcihzdGFydFRpbWUsIHRpbWVGb3JEaWFsb2dFdmVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yTWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChlcnJvci5uYW1lLnRvTG93ZXJDYXNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGZvdW5kZXJyb3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTmFtZSA9IE9wZW5WaWR1RXJyb3JOYW1lLklOUFVUX0FVRElPX0RFVklDRV9OT1RfRk9VTkQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gZXJyb3IudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdGFsbG93ZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuTUlDUk9QSE9ORV9BQ0NFU1NfREVOSUVEO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVycm9yLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdvdmVyY29uc3RyYWluZWRlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLmNvbnN0cmFpbnQudG9Mb3dlckNhc2UoKSA9PT0gJ2RldmljZWlkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck5hbWUgPSBPcGVuVmlkdUVycm9yTmFtZS5JTlBVVF9BVURJT19ERVZJQ0VfTk9UX0ZPVU5EO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSBcIkF1ZGlvIGlucHV0IGRldmljZSB3aXRoIGRldmljZUlkICdcIiArICg8Q29uc3RyYWluRE9NU3RyaW5nUGFyYW1ldGVycz4oPE1lZGlhVHJhY2tDb25zdHJhaW50cz5jb25zdHJhaW50cy5hdWRpbykuZGV2aWNlSWQhISkuZXhhY3QgKyBcIicgbm90IGZvdW5kXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JOYW1lID0gT3BlblZpZHVFcnJvck5hbWUuUFVCTElTSEVSX1BST1BFUlRJRVNfRVJST1I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IFwiQXVkaW8gaW5wdXQgZGV2aWNlIGRvZXNuJ3Qgc3VwcG9ydCB0aGUgdmFsdWUgcGFzc2VkIGZvciBjb25zdHJhaW50ICdcIiArIGVycm9yLmNvbnN0cmFpbnQgKyBcIidcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JDYWxsYmFjayhuZXcgT3BlblZpZHVFcnJvcihlcnJvck5hbWUsIGVycm9yTWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBPcGVuVmlkdUVycm9yKE9wZW5WaWR1RXJyb3JOYW1lLk5PX0lOUFVUX1NPVVJDRV9TRVQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJQcm9wZXJ0aWVzICdhdWRpb1NvdXJjZScgYW5kICd2aWRlb1NvdXJjZScgY2Fubm90IGJlIHNldCB0byBmYWxzZSBvciBudWxsIGF0IHRoZSBzYW1lIHRpbWUgd2hlbiBjYWxsaW5nICdPcGVuVmlkdS5pbml0UHVibGlzaGVyJ1wiKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaCgoZXJy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UaW1lKSA+IHdhaXRUaW1lKSB7XG4gICAgICAgICAgICAvLyBQZXJtaXNzaW9uIGRpYWxvZyB3YXMgc2hvd24gYW5kIG5vdyBpcyBjbG9zZWRcbiAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCdhY2Nlc3NEaWFsb2dDbG9zZWQnLCBbXSk7XG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIC8qIFByaXZhdGUgbWV0aG9kcyAqL1xuXG4gICAgcHJpdmF0ZSB1c2VyTWVkaWFIYXNWaWRlbyhjYWxsYmFjayk6IFByb21pc2U8YW55PiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxhbnk+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIC8vIElmIHRoZSB1c2VyIGlzIGdvaW5nIHRvIHB1Ymxpc2ggaXRzIHNjcmVlbiB0aGVyZSdzIGEgdmlkZW8gc291cmNlXG4gICAgICAgICAgICBpZiAoKHR5cGVvZiB0aGlzLnByb3BlcnRpZXMudmlkZW9Tb3VyY2UgPT09ICdzdHJpbmcnKSAmJiB0aGlzLnByb3BlcnRpZXMudmlkZW9Tb3VyY2UgPT09ICdzY3JlZW4nKSB7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vcGVudmlkdS5nZXREZXZpY2VzKClcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oZGV2aWNlcyA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICEhKGRldmljZXMuZmlsdGVyKChkZXZpY2UpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRldmljZS5raW5kID09PSAndmlkZW9pbnB1dCc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlbMF0pKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHVzZXJNZWRpYUhhc0F1ZGlvKGNhbGxiYWNrKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPGFueT4oKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5vcGVudmlkdS5nZXREZXZpY2VzKClcbiAgICAgICAgICAgICAgICAudGhlbihkZXZpY2VzID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICEhKGRldmljZXMuZmlsdGVyKChkZXZpY2UpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGV2aWNlLmtpbmQgPT09ICdhdWRpb2lucHV0JztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pWzBdKSk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbn0iLCIvKlxuICogKEMpIENvcHlyaWdodCAyMDE3LTIwMTggT3BlblZpZHUgKGh0dHBzOi8vb3BlbnZpZHUuaW8vKVxuICpcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSBcIkxpY2Vuc2VcIik7XG4gKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIEx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gICAgICAgICAgICBjb21wbGV0aW9uSGFuZGxlciA9IHBhcmFtMztcbiAgICAgICAgfSBlbHNlIGlmICghIXBhcmFtNCkge1xuICAgICAgICAgICAgY29tcGxldGlvbkhhbmRsZXIgPSBwYXJhbTQ7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zb2xlLmluZm8oJ1N1YnNjcmliaW5nIHRvICcgKyBzdHJlYW0uY29ubmVjdGlvbi5jb25uZWN0aW9uSWQpO1xuXG4gICAgICAgIHN0cmVhbS5zdWJzY3JpYmUoKVxuICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbygnU3Vic2NyaWJlZCBjb3JyZWN0bHkgdG8gJyArIHN0cmVhbS5jb25uZWN0aW9uLmNvbm5lY3Rpb25JZCk7XG4gICAgICAgICAgICAgICAgaWYgKGNvbXBsZXRpb25IYW5kbGVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGlvbkhhbmRsZXIodW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoY29tcGxldGlvbkhhbmRsZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBjb21wbGV0aW9uSGFuZGxlcihlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIGNvbnN0IHN1YnNjcmliZXIgPSBuZXcgU3Vic2NyaWJlcihzdHJlYW0sIHRhcmdldEVsZW1lbnQsIHByb3BlcnRpZXMpO1xuICAgICAgICBzdHJlYW0uaW5zZXJ0VmlkZW8oc3Vic2NyaWJlci5lbGVtZW50LCA8VmlkZW9JbnNlcnRNb2RlPnByb3BlcnRpZXMuaW5zZXJ0TW9kZSk7XG4gICAgICAgIHJldHVybiBzdWJzY3JpYmV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1xuXG4gICAgICAgICAgICBpZiAoIXB1Ymxpc2hlci5zdHJlYW0uaXNQdWJsaXNoZXJQdWJsaXNoZWQpIHtcbiAgICAgICAgICAgICAgICAvLyAnU2Vzc2lvbi51bnB1Ymxpc2goUHVibGlzaGVyKScgaGFzIE5PVCBiZWVuIGNhbGxlZFxuICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbi5hZGRTdHJlYW0ocHVibGlzaGVyLnN0cmVhbSk7XG4gICAgICAgICAgICAgICAgcHVibGlzaGVyLnN0cmVhbS5wdWJsaXNoKClcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vICdTZXNzaW9uLnVucHVibGlzaChQdWJsaXNoZXIpJyBoYXMgYmVlbiBjYWxsZWQuIE11c3QgaW5pdGlhbGl6ZSBhZ2FpbiBQdWJsaXNoZXJcbiAgICAgICAgICAgICAgICBwdWJsaXNoZXIuaW5pdGlhbGl6ZSgpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbi5hZGRTdHJlYW0ocHVibGlzaGVyLnN0cmVhbSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwdWJsaXNoZXIuc3RyZWFtLnB1Ymxpc2goKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIC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AgICAqIG1lYW4gdGhhdCBvcGVudmlkdS1zZXJ2ZXIgY291bGQgcmVzZW5kIHRoZSBtZXNzYWdlIHRvIGFsbCB0aGUgbGlzdGVkIHJlY2VpdmVycy5fXG4gICAgICovXG4gICAgLyogdHNsaW50OmRpc2FibGU6bm8tc3RyaW5nLWxpdGVyYWwgKi9cbiAgICBzaWduYWwoc2lnbmFsOiBTaWduYWxPcHRpb25zKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgICAgICAgY29uc3Qgc2lnbmFsTWVzc2FnZSA9IHt9O1xuXG4gICAgICAgICAgICBpZiAoc2lnbmFsLnRvICYmIHNpZ25hbC50by5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgY29ubmVjdGlvbklkczogc3RyaW5nW10gPSBbXTtcblxuICAgICAgICAgICAgICAgIHNpZ25hbC50by5mb3JFYWNoKGNvbm5lY3Rpb24gPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25uZWN0aW9uSWRzLnB1c2goY29ubmVjdGlvbi5jb25uZWN0aW9uSWQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHNpZ25hbE1lc3NhZ2VbJ3RvJ10gPSBjb25uZWN0aW9uSWRzO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzaWduYWxNZXNzYWdlWyd0byddID0gW107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNpZ25hbE1lc3NhZ2VbJ2RhdGEnXSA9IHNpZ25hbC5kYXRhID8gc2lnbmFsLmRhdGEgOiAnJztcbiAgICAgICAgICAgIHNpZ25hbE1lc3NhZ2VbJ3R5cGUnXSA9IHNpZ25hbC50eXBlID8gc2lnbmFsLnR5cGUgOiAnJztcblxuICAgICAgICAgICAgdGhpcy5vcGVudmlkdS5zZW5kUmVxdWVzdCgnc2VuZE1lc3NhZ2UnLCB7XG4gICAgICAgICAgICAgICAgbWVzc2FnZTogSlNPTi5zdHJpbmdpZnkoc2lnbmFsTWVzc2FnZSlcbiAgICAgICAgICAgIH0sIChlcnJvciwgcmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoISFlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIC8qIHRzbGludDplbmFibGU6bm8tc3RyaW5nLWxpdGVyYWwgKi9cblxuXG4gICAgLyoqXG4gICAgICogU2VlIFtbRXZlbnREaXNwYXRjaGVyLm9uXV1cbiAgICAgKi9cbiAgICBvbih0eXBlOiBzdHJpbmcsIGhhbmRsZXI6IChldmVudDogU2Vzc2lvbkRpc2Nvbm5lY3RlZEV2ZW50IHwgU2lnbmFsRXZlbnQgfCBTdHJlYW1FdmVudCB8IENvbm5lY3Rpb25FdmVudCB8IFB1Ymxpc2hlclNwZWFraW5nRXZlbnQgfCBSZWNvcmRpbmdFdmVudCkgPT4gdm9pZCk6IEV2ZW50RGlzcGF0Y2hlciB7XG5cbiAgICAgICAgdGhpcy5lZS5vbih0eXBlLCBldmVudCA9PiB7XG4gICAgICAgICAgICBpZiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmluZm8oXCJFdmVudCAnXCIgKyB0eXBlICsgXCInIHRyaWdnZXJlZCBieSAnU2Vzc2lvbidcIiwgZXZlbnQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmluZm8oXCJFdmVudCAnXCIgKyB0eXBlICsgXCInIHRyaWdnZXJlZCBieSAnU2Vzc2lvbidcIik7XG4gICAgICAgICAgICB9XG4gICAgICA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c3Npb24ge1xuICAgICAgICB0aGlzLmVlLm9uY2UodHlwZSwgZXZlbnQgPT4ge1xuICAgICAgICAgICAgaWYgKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKFwiRXZlbnQgJ1wiICsgdHlwZSArIFwiJyB0cmlnZ2VyZWQgYnkgJ1Nlc3Npb24nXCIsIGV2ZW50KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKFwiRXZlbnQgJ1wiICsgdHlwZSArIFwiJyB0cmlnZ2VyZWQgYnkgJ1Nlc3Npb24nXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaGFuZGxlcihldmVudCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmICh0eXBlID09PSAncHVibGlzaGVyU3RhcnRTcGVha2luZycgfHwgdHlwZSA9PT0gJ3B1Ymxpc2hlclN0b3BTcGVha2luZycpIHtcbiAgICAgICAgICAgIHRoaXMuc3BlYWtpbmdFdmVudHNFbmFibGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgLy8gSWYgdGhlcmUgYXJlIGFscmVhZHkgYXZhaWxhYmxlIHJlbW90ZSBzdHJlYW1zLCBlbmFibGUgaGFyayBpbiBhbGwgb2YgdGhlbVxuICAgICAgICAgICAgZm9yIChjb25zdCBjb25uZWN0aW9uSWQgaW4gdGhpcy5yZW1vdGVDb25uZWN0aW9ucykge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0ciA9IHRoaXMucmVtb3RlQ29ubmVjdGlvbnNbY29ubmVjdGlvbklkXS5zdHJlYW07XG4gICAgICAgICAgICAgICAgaWYgKCEhc3RyICYmICFzdHIuc3BlZWNoRXZlbnQgJiYgc3RyLmhhc0F1ZGlvKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0ci5lbmFibGVPbmNlU3BlYWtpbmdFdmVudHMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4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5zcGVlY2hFdmVudCkge1xuICAgICAgICAgICAgICAgICAgICBzdHIuZGlzYWJsZVNwZWFraW5nRXZlbnRzKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuXG4gICAgLyogSGlkZGVuIG1ldGhvZHMgKi9cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBvblBhcnRpY2lwYW50Sm9pbmVkKHJlc3BvbnNlOiBDb25uZWN0aW9uT3B0aW9ucyk6IHZvaWQge1xuICAgICAgICAvLyBDb25uZWN0aW9uIHNob3VsZG4ndCBleGlzdFxuICAgICAgICB0aGlzLmdldENvbm5lY3Rpb24ocmVzcG9uc2UuaWQsICcnKVxuXG4gICAgICAgICAgICAudGhlbihjb25uZWN0aW9uID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ0Nvbm5lY3Rpb24gJyArIHJlc3BvbnNlLmlkICsgJyBhbHJlYWR5IGV4aXN0cyBpbiBjb25uZWN0aW9ucyBsaXN0Jyk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKG9wZW5WaWR1RXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBuZXcgQ29ubmVjdGlvbih0aGlzLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdGVDb25uZWN0aW9uc1tyZXNwb25zZS5pZF0gPSBjb25uZWN0aW9uO1xuICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCdjb25uZWN0aW9uQ3JlYXRlZCcsIFtuZXcgQ29ubmVjdGlvbkV2ZW50KGZhbHNlLCB0aGlzLCAnY29ubmVjdGlvbkNyZWF0ZWQnLCBjb25uZWN0aW9uLCAnJyldKTtcbiAgICAgICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuIC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gICAgICAgICAgIGNvbm5lY3Rpb24gPSBjb247XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UubWV0YWRhdGEgPSBjb24uZGF0YTtcbiAgICAgICAgICAgICAgICBjb25uZWN0aW9uLm9wdGlvbnMgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICBjb25uZWN0aW9uLmluaXRSZW1vdGVTdHJlYW1zKHJlc3BvbnNlLnN0cmVhbXMpO1xuICAgICAgICAgICAgICAgIGFmdGVyQ29ubmVjdGlvbkZvdW5kKGNvbm5lY3Rpb24pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYXRjaChvcGVuVmlkdUVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgbmV3IENvbm5lY3Rpb25cbiAgICAgICAgICAgICAgICBjb25uZWN0aW9uID0gbmV3IENvbm5lY3Rpb24odGhpcywgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgIGFmdGVyQ29ubmVjdGlvbkZvdW5kKGNvbm5lY3Rpb24pO1xuICAgICAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIG9uUGFydGljaXBhbnRVbnB1Ymxpc2hlZChtc2cpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5nZXRSZW1vdGVDb25uZWN0aW9uKG1zZy5uYW1lLCBcIlJlbW90ZSBjb25uZWN0aW9uICdcIiArIG1zZy5uYW1lICsgXCInIHVua25vd24gd2hlbiAnb25QYXJ0aWNpcGFudFVucHVibGlzaGVkJy4gXCIgK1xuICAgICAgICAgICAgJ0V4aXN0aW5nIHJlbW90ZSBjb25uZWN0aW9uczogJyArIEpTT04uc3RyaW5naWZ5KE9iamVjdC5rZXlzKHRoaXMucmVtb3RlQ29ubmVjdGlvbnMpKSlcblxuICAgICAgICAgICAgLnRoZW4oY29ubmVjdGlvbiA9PiB7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW1Fd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AgICAvKipcbiAgICAgKiBAaGlkZGVuXG4gICAgICovXG4gICAgcmVjdkljZUNhbmRpZGF0ZShtc2cpOiB2b2lkIHtcbiAgICAgICAgY29uc3QgY2FuZGlkYXRlID0ge1xuICAgICAgICAgICAgY2FuZGlkYXRlOiBtc2cuY2FuZGlkYXRlLFxuICAgICAgICAgICAgc2RwTWlkOiBtc2cuc2RwTWlkLFxuICAgICAgICAgICAgc2RwTUxpbmVJbmRleDogbXNnLnNkcE1MaW5lSW5kZXhcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5nZXRDb25uZWN0aW9uKG1zZy5lbmRwb2ludE5hbWUsICdDb25uZWN0aW9uIG5vdCBmb3VuZCBmb3IgZW5kcG9pbnQgJyArIG1zZy5lbmRwb2ludE5hbWUgKyAnLiBJY2UgY2FuZGlkYXRlIHdpbGwgYmUgaWdub3JlZDogJyArIGNhbmRpZGF0ZSlcblxuICAgICAgICAgICAgLnRoZW4oY29ubmVjdGlvbiA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gY29ubmVjdGlvbi5zdHJlYW07XG4gICAgICAgICAgICAgICAgc3RyZWFtLmdldFdlYlJ0Y1BlZXIoKS5hZGRJY2VDYW5kaWRhdGUoY2FuZGlkYXRlLCAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdFcnJvciBhZGRpbmcgY2FuZGlkYXRlIGZvciAnICsgc3RyZWFtLnN0cmVhbUlkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnIHN0cmVhbSBvZiBlbmRwb2ludCAnICsgbXNnLmVuZHBvaW50TmFtZSArICc6ICcgKyBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2gob3BlblZpZHVFcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihvcGVuVmlkdUVycm9yKTtcbiAgICAgICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBvblNlc3Npb25DbG9zZWQobXNnKTogdm9pZCB7XG4gICAgICAgIGNvbnNvbGUuaW5mbygnU2Vzc2lvbiBjbG9zZWQ6ICcgKyBKU09OLnN0cmluZ2lmeShtc2cpKTtcbiAgICAgICAgY29uc3QgcyA9IG1zZy5yb29tO1xuICAgICAgICBpZiAocyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnc2Vzc2lvbi1jbG9zZWQnLCBbe1xuICAgICAgICAgICAgICAgIHNlc3Npb246IHNcbiAgICAgICAgICAgIH1dKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUud2FybignU2Vzc2lvbiB1bmRlZmluZWQgb24gc2Vzc2lvbiBjbG9zZWQnLCBtc2cpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIG9uTG9zdENvbm5lY3Rpb24oKTogdm9pZCB7XG5cbiAgICAgICAgaWYgKCF0aGlzLmNvbm5lY3Rpb24pIHtcblxuICAgICAgICAgICAgY29uc29sZS53YXJuKCdOb3QgY29ubmVjdGVkIHRvIHNlc3Npb246IGlmIHlvdSBhcmUgbm90IGRlYnVnZ2luZywgdGhpcyBpcyBwcm9iYWJseSBhIGNlcnRpZmljYXRlIGVycm9yJyk7XG5cbiAgICAgICAgICAgIGNvbnN0IHVybCA9ICdodHRwczovLycgKyB0aGlzLm9wZW52aWR1LmdldFdzVXJpKCkuc3BsaXQoJ3dzczovLycpWzFdLnNwbGl0KCcvb3BlbnZpZHUnKVswXTtcbiAgICAgICAgICAgIGlmICh3aW5kb3cuY29uZmlybSgnSWYgeW91IGFyZSBub3QgZGVidWdnaW5nLCB0aGlzIGlzIHByb2JhYmx5IGEgY2VydGlmaWNhdGUgZXJyb3IgYXQgXFxcIicgKyB1cmwgKyAnXFxcIlxcblxcbkNsaWNrIE9LIHRvIG5hdmlnYXRlIGFuZCBhY2NlcHQgaXQnKSkge1xuICAgICAgICAgICAgICAgIGxvY2F0aW9uLmFzc2lnbih1cmwgKyAnL2FjY2VwdC1jZXJ0aWZpY2F0ZScpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc29sZS53YXJuKCdMb3N0IGNvbm5lY3Rpb24gaW4gU2Vzc2lvbiAnICsgdGhpcy5zZXNzaW9uSWQpO1xuICAgICAgICBpZiAoISF0aGlzLnNlc3Npb25JZCAmJiAhdGhpcy5jb25uZWN0aW9uLmRpc3Bvc2VkKSB7XG4gICAgICAgICAgICB0aGlzLmxlYXZlKHRydWUsICduZXR3b3JrRGlzY29ubmVjdCcpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIG9uTWVkaWFFcnJvcihwYXJhbXMpOiB2b2lkIHtcblxuICAgICAgICBjb25zb2xlLmVycm9yKCdNZWRpYSBlcnJvcjogJyArIEpTT04uc3RyaW5naWZ5KHBhcmFtcykpO1xuICAgICAgICBjb25zdCBlcnIgPSBwYXJhbXMuZXJyb3I7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCdlcnJvci1tZWRpYScsIFt7XG4gICAgICAgICAgICAgICAgZXJyb3I6IGVyclxuICAgICAgICAgICAgfV0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc29sZS53YXJuKCdSZWNlaXZlZCB1bmRlZmluZWQgbWVkaWEgZXJyb3IuIFBhcmFtczonLCBwYXJhbXMpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICA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0RXZlbnQgPSBuZXcgU2Vzc2lvbkRpc2Nvbm5lY3RlZEV2ZW50KHRoaXMsIHJlYXNvbik7XG4gICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ3Nlc3Npb25EaXNjb25uZWN0ZWQnLCBbc2Vzc2lvbkRpc2Nvbm5lY3RFdmVudF0pO1xuICAgICAgICAgICAgICAgIHNlc3Npb25EaXNjb25uZWN0RXZlbnQuY2FsbERlZmF1bHRCZWhhdmlvdXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUud2FybignWW91IHdlcmUgbm90IGNvbm5lY3RlZCB0byB0aGUgc2Vzc2lvbiAnICsgdGhpcy5zZXNzaW9uSWQpO1xuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICAvKiBQcml2YXRlIG1ldGhvZHMgKi9cblxuICAgIHByaXZhdGUgY29ubmVjdEF1eCh0b2tlbjogc3RyaW5nKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIHRoaXMub3BlbnZpZHUuc3RhcnRXcygoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoISFlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgam9pblBhcmFtcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuOiAoISF0b2tlbikgPyB0b2tlbiA6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbjogdGhpcy5zZXNzaW9uSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRhZGF0YTogISF0aGlzLm9wdGlvbnMubWV0YWRhdGEgPyB0aGlzLm9wdGlvbnMubWV0YWRhdGEgOiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY3JldDogdGhpcy5vcGVudmlkdS5nZXRTZWNyZXQoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZGVyOiB0aGlzLm9wZW52aWR1LmdldFJlY29yZGVyKCksXG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcGVudmlkdS5zZW5kUmVxdWVzdCgnam9pblJvb20nLCBqb2luUGFyYW1zLCAoZXJyb3IsIHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoISFlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW5pdGlhbGl6ZSBsb2NhbCBDb25uZWN0aW9uIG9iamVjdCB3aXRoIHZhbHVlcyByZXR1cm5lZCBieSBvcGVudmlkdS1zZXJ2ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbm5lY3Rpb24gPSBuZXcgQ29ubmVjdGlvbih0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbm5lY3Rpb24uY29ubmVjdGlvbklkID0gcmVzcG9uc2UuaWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uLmRhdGEgPSByZXNwb25zZS5tZXRhZGF0YTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEluaXRpYWxpemUgcmVtb3RlIENvbm5lY3Rpb25zIHdpdGggdmFsdWUgcmV0dXJuZWQgYnkgb3BlbnZpZHUtc2VydmVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXZlbnRzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25uZWN0aW9uczogbmV3IEFycmF5PENvbm5lY3Rpb24+KCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbXM6IG5ldyBBcnJheTxTdHJlYW0+KClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV4aXN0aW5nUGFydGljaXBhbnRzOiBDb25uZWN0aW9uT3B0aW9uc1tdID0gcmVzcG9uc2UudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdQYXJ0aWNpcGFudHMuZm9yRWFjaChwYXJ0aWNpcGFudCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBuZXcgQ29ubmVjdGlvbih0aGlzLCBwYXJ0aWNpcGFudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3RlQ29ubmVjdGlvbnNbY29ubmVjdGlvbi5jb25uZWN0aW9uSWRdID0gY29ubmVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzLmNvbm5lY3Rpb25zLnB1c2goY29ubmVjdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghIWNvbm5lY3Rpb24uc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW90ZVN0cmVhbXNDcmVhdGVkW2Nvbm5lY3Rpb24uc3RyZWFtLnN0cmVhbUlkXSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudHMuc3RyZWFtcy5wdXNoKGNvbm5lY3Rpb24uc3RyZWFtKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT3duICdjb25uZWN0aW9uQ3JlYXRlZCcgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnY29ubmVjdGlvbkNyZWF0ZWQnLCBbbmV3IENvbm5lY3Rpb25FdmVudChmYWxzZSwgdGhpcywgJ2Nvbm5lY3Rpb25DcmVhdGVkJywgdGhpcy5jb25uZWN0aW9uLCAnJyldKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9uZSAnY29ubmVjdGlvbkNyZWF0ZWQnIGV2ZW50IGZvciBlYWNoIGV4aXN0aW5nIGNvbm5lY3Rpb24gaW4gdGhlIHNlc3Npb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudHMuY29ubmVjdGlvbnMuZm9yRWFjaChjb25uZWN0aW9uID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ2Nvbm5lY3Rpb25DcmVhdGVkJywgW25ldyBDb25uZWN0aW9uRXZlbnQoZmFsc2UsIHRoaXMsICdjb25uZWN0aW9uQ3JlYXRlZCcsIGNvbm5lY3Rpb24sICcnKV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25lICdzdHJlYW1DcmVhdGVkJyBldmVudCBmb3IgZWFjaCBhY3RpdmUgc3RyZWFtIGluIHRoZSBzZXNzaW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzLnN0cmVhbXMuZm9yRWFjaChzdHJlYW0gPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnc3RyZWFtQ3JlYXRlZCcsIFtuZXcgU3RyZWFtRXZlbnQoZmFsc2UsIHRoaXMsICdzdHJlYW1DcmVhdGVkJywgc3RyZWFtLCAnJyldKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHByaXZhdGUgc3RyaW5nQ2xpZW50TWV0YWRhdGEobWV0YWRhdGE6IGFueSk6IHN0cmluZyB7XG4gICAgICAgIGlmICh0eXBlb2YgbWV0YWRhdGEgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkobWV0YWRhdGEpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG1ldGFkYXRhO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBnZXRDb25uZWN0aW9uKGNvbm5lY3Rpb25JZDogc3RyaW5nLCBlcnJvck1lc3NhZ2U6IHN0cmluZyk6IFByb21pc2U8Q29ubmVjdGlvbj4ge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8Q29ubmVjdGlvbj4oKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgY29ubmVjdGlvbiA9IHRoaXMucmVtb3RlQ29ubmVjdGlvbnNbY29ubmVjdGlvbklkXTtcbiAgICAgICAgICAgIGlmICghIWNvbm5lY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAvLyBSZXNvbHZlIHJlbW90ZSBjb25uZWN0aW9uXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShjb25uZWN0aW9uKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29ubmVjdGlvbi5jb25uZWN0aW9uSWQgPT09IGNvbm5lY3Rpb25JZCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBSZXNvbHZlIGxvY2FsIGNvbm5lY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh0aGlzLmNvbm5lY3Rpb24pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIENvbm5lY3Rpb24gbm90IGZvdW5kLiBSZWplY3Qgd2l0aCBPcGVuVmlkdUVycm9yXG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgT3BlblZpZHVFcnJvcihPcGVuVmlkdUVycm9yTmFtZS5HRU5FUklDX0VSUk9SLCBlcnJvck1lc3NhZ2UpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHByaXZhdGUgZ2V0UmVtb3RlQ29ubmVjdGlvbihjb25uZWN0aW9uSWQ6IHN0cmluZywgZXJyb3JNZXNzYWdlOiBzdHJpbmcpOiBQcm9taXNlPENvbm5lY3Rpb24+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPENvbm5lY3Rpb24+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSB0aGlzLnJlbW90ZUNvbm5lY3Rpb25zW2Nvbm5lY3Rpb25JZF07XG4gICAgICAgICAgICBpZiAoISFjb25uZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSByZW1vdGUgY29ubmVjdGlvblxuICAgICAgICAgICAgICAgIHJlc29sdmUoY29ubmVjdGlvbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFJlbW90ZSBjb25uZWN0aW9uIG5vdCBmb3VuZC4gUmVqZWN0IHdpdGggT3BlblZpZHVFcnJvclxuICAgICAgICAgICAgICAgIHJlamVjdChuZXcgT3BlblZpZHVFcnJvcihPcGVuVmlkdUVycm9yTmFtZS5HRU5FUklDX0VSUk9SLCBlcnJvck1lc3NhZ2UpKTtcbiAgICAgICAgICAg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xuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBzdWJzY3JpYmUoKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgIHRoaXMuaW5pdFdlYlJ0Y1BlZXJSZWNlaXZlKClcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBwdWJsaXNoKCk6IFByb21pc2U8YW55PiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc1JlYWR5VG9QdWJsaXNoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbml0V2ViUnRjUGVlclNlbmQoKVxuICAgICAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lZS5vbmNlKCdzdHJlYW0tcmVhZHktdG8tcHVibGlzaCcsIHN0cmVhbUV2ZW50ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wdWJsaXNoKClcbiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBoaWRkZW5cbiAgICAgKi9cbiAgICBkaXNwb3NlV2ViUnRjUGVlcigpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMud2ViUnRjUGVlcikge1xuICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyLmRpc3Bvc2UoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5zcGVlY2hFdmVudCkge1xuICAgICAgICAgICAgdGhpcy5zcGVlY2hFdmVudC5zdG9wKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnN0b3BXZWJSdGNTdGF0cygpO1xuXG4gICAgICAgIGNvbnNvbGUuaW5mbygoISF0aGlzLm91dGJvdW5kU3RyZWFtT3B0cyA/ICdPdXRib3VuZCAnIDogJ0luYm91bmQgJykgKyBcIldlYlJUQ1BlZXIgZnJvbSAnU3RyZWFtJyB3aXRoIGlkIFtcIiArIHRoaXMuc3RyZWFtSWQgKyAnXSBpcyBub3cgY2xvc2VkJyk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGhpZGRlblxuICAgICAqL1xuICAgIGRpc3Bvc2VNZWRpYVN0cmVhbSgpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMubWVkaWFTdHJlYW0pIHtcbiAgICAgICAgICAgIHRoaXMubWVkaWFTdHJlYW0uZ2V0QXVkaW9UcmFja3MoKS5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1vZGU/OiBWaWRlb0luc2VydE1vZGUpOiBIVE1MVmlkZW9FbGVtZW50IHtcbiAgICAgICAgaWYgKCEhdGFyZ2V0RWxlbWVudCkge1xuXG4gICAgICAgICAgICB0aGlzLnZpZGVvID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndmlkZW8nKTtcblxuICAgICAgICAgICAgdGhpcy52aWRlby5pZCA9ICh0aGlzLmlzTG9jYWwoKSA/ICdsb2NhbC0nIDogJ3JlbW90ZS0nKSArICd2aWRlby0nICsgdGhpcy5zdHJlYW1JZDtcbiAgICAgICAgICAgIHRoaXMudmlkZW8uYXV0b3BsYXkgPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy52aWRlby5jb250cm9scyA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy52aWRlby5zcmNPYmplY3QgPSB0aGlzLm1lZGlhU3RyZWFtO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5pc0xvY2FsKCkgJiYgIXRoaXMuZGlzcGxheU15UmVtb3RlKCkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpZGVvLm11dGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLm91dGJvdW5kU3RyZWFtT3B0cy5wdWJsaXNoZXJQcm9wZXJ0aWVzLm1pcnJvcikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm1pcnJvclZpZGVvKHRoaXMudmlkZW8pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMudmlkZW8ub25jYW5wbGF5ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmluZm8oXCJMb2NhbCAnU3RyZWFtJyB3aXRoIGlkIFtcIiArIHRoaXMuc3RyZWFtSWQgKyAnXSB2aWRlbyBpcyBub3cgcGxheWluZycpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW8taXMtcGxheWluZycsIFt7XG4gICAgICAgICA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B0aGlzLmlzU2VuZEF1ZGlvKCksXG4gICAgICAgICAgICAgICAgdmlkZW86IHRoaXMuaXNTZW5kVmlkZW8oKVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgY29uc3Qgb3B0aW9uczogYW55ID0ge1xuICAgICAgICAgICAgICAgIHZpZGVvU3RyZWFtOiB0aGlzLm1lZGlhU3RyZWFtLFxuICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHM6IHVzZXJNZWRpYUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgIG9uaWNlY2FuZGlkYXRlOiB0aGlzLmNvbm5lY3Rpb24uc2VuZEljZUNhbmRpZGF0ZS5iaW5kKHRoaXMuY29ubmVjdGlvbiksXG4gICAgICAgICAgICAgICAgaWNlU2VydmVyczogdGhpcy5zZXNzaW9uLm9wZW52aWR1LmFkdmFuY2VkQ29uZmlndXJhdGlvbi5pY2VTZXJ2ZXJzXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjb25zdCBzdWNjZXNzQ2FsbGJhY2sgPSAoZXJyb3IsIHNkcE9mZmVyUGFyYW0sIHdwKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoJyhwdWJsaXNoKSBTRFAgb2ZmZXIgZXJyb3I6ICcgKyBKU09OLnN0cmluZ2lmeShlcnJvcikpKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zb2xlLmRlYnVnKCdTZW5kaW5nIFNEUCBvZmZlciB0byBwdWJsaXNoIGFzICdcbiAgICAgICAgICAgICAgICAgICAgKyB0aGlzLnN0cmVhbUlkLCBzZHBPZmZlclBhcmFtKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuc2Vzc2lvbi5vcGVudmlkdS5zZW5kUmVxdWVzdCgncHVibGlzaFZpZGVvJywge1xuICAgICAgICAgICAgICAgICAgICBzZHBPZmZlcjogc2RwT2ZmZXJQYXJhbSxcbiAgICAgICAgICAgICAgICAgICAgZG9Mb29wYmFjazogdGhpcy5kaXNwbGF5TXlSZW1vdGUoKSB8fCBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgYXVkaW9BY3RpdmU6IHRoaXMuaXNTZW5kQXVkaW8oKSxcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9BY3RpdmU6IHRoaXMuaXNTZW5kVmlkZW8oKSxcbiAgICAgICAgICAgICAgICAgICAgdHlwZU9mVmlkZW86ICgodGhpcy5pc1NlbmRWaWRlbygpKSA/ICh0aGlzLmlzU2VuZFNjcmVlbigpID8gJ1NDUkVFTicgOiAnQ0FNRVJBJykgOiAnJyksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lUmF0ZTogISF0aGlzLmZyYW1lUmF0ZSA/IHRoaXMuZnJhbWVSYXRlIDogLTFcbiAgICAgICAgICAgICAgICB9LCAoZXJyb3IsIHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KCdFcnJvciBvbiBwdWJsaXNoVmlkZW86ICcgKyBKU09OLnN0cmluZ2lmeShlcnJvcikpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzU2RwQW5zd2VyKHJlc3BvbnNlLnNkcEFuc3dlcilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCdzdHJlYW0tY3JlYXRlZC1ieS1wdWJsaXNoZXInKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbyhcIidQdWJsaXNoZXInIHN1Y2Nlc3NmdWxseSBwdWJsaXNoZWQgdG8gc2Vzc2lvblwiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuZGlzcGxheU15UmVtb3RlKCkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLndlYlJ0Y1BlZXIgPSBrdXJlbnRvVXRpbHMuV2ViUnRjUGVlci5XZWJSdGNQZWVyU2VuZHJlY3Yob3B0aW9ucywgZXJyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyLmdlbmVyYXRlT2ZmZXIoc3VjY2Vzc0NhbGxiYWNrKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyID0ga3VyZW50b1V0aWxzLldlYlJ0Y1BlZXIuV2ViUnRjUGVlclNlbmRvbmx5KG9wdGlvbnMsIGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMud2ViUnRjUGVlci5nZW5lcmF0ZU9mZmVyKHN1Y2Nlc3NDYWxsYmFjayk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmlzUHVibGlzaGVyUHVibGlzaGVkID0gdHJ1ZTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBpbml0V2ViUnRjUGVlclJlY2VpdmUoKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcblxuICAgICAgICAgICAgY29uc3Qgb2ZmZXJDb25zdHJhaW50cyA9IHtcbiAgICAgICAgICAgICAgICBhdWRpbzogdGhpcy5pbmJvdW5kU3RyZWFtT3B0cy5yZWN2QXVkaW8sXG4gICAgICAgICAgICAgICAgdmlkZW86IHRoaXMuaW5ib3VuZFN0cmVhbU9wdHMucmVjdlZpZGVvXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgY29uc29sZS5kZWJ1ZyhcIidTZXNzaW9uLnN1YnNjcmliZShTdHJlYW0pJyBjYWxsZWQuIENvbnN0cmFpbnRzIG9mIGdlbmVyYXRlIFNEUCBvZmZlclwiLFxuICAgICAgICAgICAgICAgIG9mZmVyQ29uc3RyYWludHMpO1xuICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHtcbiAgICAgICAgICAgICAgICBvbmljZWNhbmRpZGF0ZTogdGhpcy5jb25uZWN0aW9uLnNlbmRJY2VDYW5kaWRhdGUuYmluZCh0aGlzLmNvbm5lY3Rpb24pLFxuICAgICAgICAgICAgICAgIG1lZGlhQ29uc3RyYWludHM6IG9mZmVyQ29uc3RyYWludHNcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHN1Y2Nlc3NDYWxsYmFjayA9IChlcnJvciwgc2RwT2ZmZXJQYXJhbSwgd3ApID0+IHtcblxuICAgICAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKCcoc3Vic2NyaWJlKSBTRFAgb2ZmZXIgZXJyb3I6ICcgKyBKU09OLnN0cmluZ2lmeShlcnJvcikpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc29sZS5kZWJ1ZygnU2VuZGluZyBTRFAgb2ZmZXIgdG8gc3Vic2NyaWJlIHRvICdcbiAgICAgICAgICAgICAgICAgICAgKyB0aGlzLnN0cmVhbUlkLCBzZHBPZmZlclBhcmFtKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNlc3Npb24ub3BlbnZpZHUuc2VuZFJlcXVlc3QoJ3JlY2VpdmVWaWRlb0Zyb20nLCB7XG4gICAgICAgICAgICAgICAgICAgIHNlbmRlcjogdGhpcy5zdHJlYW1JZCxcbiAgICAgICAgICAgICAgICAgICAgc2RwT2ZmZXI6IHNkcE9mZmVyUGFyYW1cbiAgICAgICAgICAgICAgICB9LCAoZXJyb3IsIHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcignRXJyb3Igb24gcmVjdlZpZGVvRnJvbTogJyArIEpTT04uc3RyaW5naWZ5KGVycm9yKSkpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzU2RwQW5zd2VyKHJlc3BvbnNlLnNkcEFuc3dlcikudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy53ZWJSdGNQZWVyID0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WFtIHJlbW90ZWx5XG4gICAgICAgICAgICAgICAgLy8gZXhjZXB0IHdoZW4gc2hvd015UmVtb3RlIGlzIHRydWVcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaXNMb2NhbCgpIHx8IHRoaXMuZGlzcGxheU15UmVtb3RlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tZWRpYVN0cmVhbSA9IHBlZXJDb25uZWN0aW9uLmdldFJlbW90ZVN0cmVhbXMoKVswXTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5kZWJ1ZygnUGVlciByZW1vdGUgc3RyZWFtJywgdGhpcy5tZWRpYVN0cmVhbSk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCEhdGhpcy5tZWRpYVN0cmVhbSkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgnbWVkaWFzdHJlYW0tdXBkYXRlZCcpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoISF0aGlzLm1lZGlhU3RyZWFtLmdldEF1ZGlvVHJhY2tzKClbMF0gJiYgdGhpcy5zZXNzaW9uLnNwZWFraW5nRXZlbnRzRW5hYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZW5hYmxlU3BlYWtpbmdFdmVudHMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICghIXRoaXMudmlkZW8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxldCB0aHVtYm5haWxJZCA9IHRoaXMudmlkZW8udGh1bWI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZGVvLm9uY2FucGxheSA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5pc0xvY2FsKCkgJiYgdGhpcy5kaXNwbGF5TXlSZW1vdGUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmluZm8oXCJZb3VyIG93biByZW1vdGUgJ1N0cmVhbScgd2l0aCBpZCBbXCIgKyB0aGlzLnN0cmVhbUlkICsgJ10gdmlkZW8gaXMgbm93IHBsYXlpbmcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lZS5lbWl0RXZlbnQoJ3JlbW90ZS12aWRlby1pcy1wbGF5aW5nJywgW3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQ6IHRoaXMudmlkZW9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoIXRoaXMuaXNMb2NhbCgpICYmICF0aGlzLmRpc3BsYXlNeVJlbW90ZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbyhcIlJlbW90ZSAnU3RyZWFtJyB3aXRoIGlkIFtcIiArIHRoaXMuc3RyZWFtSWQgKyAnXSB2aWRlbyBpcyBub3cgcGxheWluZycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW8taXMtcGxheWluZycsIFt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50OiB0aGlzLnZpZGVvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hvdyh0aHVtYm5haWxJZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhpcy5oaWRlU3Bpbm5lcih0aGlzLnN0cmVhbUlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgIC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ghdGhpcy5pbmJvdW5kU3RyZWFtT3B0cyAmJiAhIXRoaXMub3V0Ym91bmRTdHJlYW1PcHRzKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGluc2VydEVsZW1lbnRXaXRoTW9kZShlbGVtZW50OiBIVE1MRWxlbWVudCwgaW5zZXJ0TW9kZTogVmlkZW9JbnNlcnRNb2RlKTogdm9pZCB7XG4gICAgICAgIGlmICghIXRoaXMudGFyZ2V0RWxlbWVudCkge1xuICAgICAgICAgICAgc3dpdGNoIChpbnNlcnRNb2RlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSBWaWRlb0luc2VydE1vZGUuQUZURVI6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0RWxlbWVudC5wYXJlbnROb2RlISEuaW5zZXJ0QmVmb3JlKGVsZW1lbnQsIHRoaXMudGFyZ2V0RWxlbWVudC5uZXh0U2libGluZyk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgVmlkZW9JbnNlcnRNb2RlLkFQUEVORDpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50YXJnZXRFbGVtZW50LmFwcGVuZENoaWxkKGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFZpZGVvSW5zZXJ0TW9kZS5CRUZPUkU6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0RWxlbWVudC5wYXJlbnROb2RlISEuaW5zZXJ0QmVmb3JlKGVsZW1lbnQsIHRoaXMudGFyZ2V0RWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgVmlkZW9JbnNlcnRNb2RlLlBSRVBFTkQ6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0RWxlbWVudC5pbnNlcnRCZWZvcmUoZWxlbWVudCwgdGhpcy50YXJnZXRFbGVtZW50LmN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ICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAodHlwZSA9PT0gJ3ZpZGVvUGxheWluZycpIHtcbiAgICAgICAgICAgIGNvbnN0IHZpZGVvID0gdGhpcy5zdHJlYW0uZ2V0VmlkZW9FbGVtZW50KCk7XG4gICAgICAgICAgICBpZiAoIXRoaXMuc3RyZWFtLmRpc3BsYXlNeVJlbW90ZSgpICYmIHZpZGVvICYmXG4gICAgICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPiAwICYmXG4gICAgICAgICAgICAgICAgdmlkZW8ucGF1c2VkID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLmVuZGVkID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgIHZpZGVvLnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudCh0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKSwgdGhpcywgJ3ZpZGVvUGxheWluZycpXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuc3RyZWFtLm9uY2UoJ3ZpZGVvLWlzLXBsYXlpbmcnLCAoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVlLmVtaXRFdmVudCgndmlkZW9QbGF5aW5nJywgW25ldyBWaWRlb0VsZW1lbnRFdmVudChlbGVtZW50LmVsZW1lbnQsIHRoaXMsICd2aWRlb1BsYXlpbmcnKV0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG5cbiAgICAvKipcbiAgICAgKiBTZWUgW1tFdmVudERpc3BhdGNoZXIub25jZV1dXG4gICAgICovXG4gICAgb25jZSh0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mlkZW9FbGVtZW50Q3JlYXRlZCcsIFtuZXcgVmlkZW9FbGVtZW50RXZlbnQoZWxlbWVudCwgdGhpcywgJ3ZpZGVvRWxlbWVudENyZWF0ZWQnKV0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSAndmlkZW9QbGF5aW5nJykge1xuICAgICAgICAgICAgY29uc3QgdmlkZW8gPSB0aGlzLnN0cmVhbS5nZXRWaWRlb0VsZW1lbnQoKTtcbiAgICAgICAgICAgIGlmICghdGhpcy5zdHJlYW0uZGlzcGxheU15UmVtb3RlKCkgJiYgdmlkZW8gJiZcbiAgICAgICAgICAgICAgICB2aWRlby5jdXJyZW50VGltZSA+IDAgJiZcbiAgICAgICAgICAgICAgICB2aWRlby5wYXVzZWQgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgdmlkZW8uZW5kZWQgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgdmlkZW8ucmVhZHlTdGF0ZSA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCd2aWRlb1BsYXlpbmcnLCBbbmV3IFZpZGVvRWxlbWVudEV2ZW50KHRoaXMuc3RyZWFtLmdldFZpZGVvRWxlbWVudCgpLCB0aGlzLCAndmlkZW9QbGF5aW5nJyldKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdHJlYW0ub25jZSgndmlkZW8taXMtcGxheWluZycsIChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWUuZW1pdEV2ZW50KCd2aWRlb1BsYXlpbmcnLCBbbmV3IFZpZGVvRWxlbWVudEV2ZW50KGVsZW1lbnQuZWxlbWVudCwgdGhpcywgJ3ZpZGVvUGxheWluZycpXSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblx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yb3IuZGF0YSkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cbiAgICAgICAgICAgICAgICBlcnJvci5yZXF1ZXN0VGltZSA9IHJlcXVlc3RUaW1lO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdCAhPSB1bmRlZmluZWQgJiYgcmVzdWx0LnZhbHVlICE9PSAncG9uZycpIHtcbiAgICAgICAgICAgICAgICAgICAgTG9nZ2VyLmRlYnVnKCdSZXNwb25zZTogJyArIEpTT04uc3RyaW5naWZ5KHJlc3VsdCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYWxsYmFjayhlcnJvciwgcmVzdWx0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gdXBkYXRlTm90UmVjb25uZWN0SWZMZXNzVGhhbigpIHtcbiAgICAgICAgTG9nZ2VyLmRlYnVnKFwibm90UmVjb25uZWN0SWZOdW1MZXNzVGhhbiA9IFwiICsgcGluZ05leHROdW0gKyAnIChvbGQ9JyArXG4gICAgICAgICAgICBub3RSZWNvbm5lY3RJZk51bUxlc3NUaGFuICsgJyknKTtcbiAgICAgICAgbm90UmVjb25uZWN0SWZOdW1MZXNzVGhhbiA9IHBpbmdOZXh0TnVtO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNlbmRQaW5nKCkge1xuICAgICAgICBpZiAoZW5hYmxlZFBpbmdzKSB7XG4gICAgICAgICAgICB2YXIgcGFyYW1zID0gbnVsbDtcbiAgICAgICAgICAgIGlmIChwaW5nTmV4dE51bSA9PSAwIHx8IHBpbmdOZXh0TnVtID09IG5vdFJlY29ubmVjdElmTnVtTGVzc1RoYW4pIHtcbiAgICAgICAgICAgICAgICBwYXJhbXMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGludGVydmFsOiBjb25maWd1cmF0aW9uLmhlYXJ0YmVhdCB8fCBQSU5HX0lOVEVSVkFMXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBpbmdOZXh0TnVtKys7XG5cbiAgICAgICAgICAgIHNlbGYuc2VuZCgncGluZycsIHBhcmFtcywgKGZ1bmN0aW9uKHBpbmdOdW0pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oZXJyb3IsIHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIExvZ2dlci5kZWJ1ZyhcIkVycm9yIGluIHBpbmcgcmVxdWVzdCAjXCIgKyBwaW5nTnVtICsgXCIgKFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvci5tZXNzYWdlICsgXCIpXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBpbmdOdW0gPiBub3RSZWNvbm5lY3RJZk51bUxlc3NUaGFuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZFBpbmdzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlTm90UmVjb25uZWN0SWZMZXNzVGhhbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIExvZ2dlci5kZWJ1ZyhcIlNlcnZlciBkaWQgbm90IHJlc3BvbmQgdG8gcGluZyBtZXNzYWdlICNcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpbmdOdW0gKyBcIi4gUmVjb25uZWN0aW5nLi4uIFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cy5yZWNvbm5lY3RXcygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSkocGluZ05leHROdW0pKT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zICsgXCIpXCIpO1xuXG4gICAgICAgIGlmIChudW1SZXRyaWVzID09PSAxKSB7XG4gICAgICAgICAgICBpZiAocmVjb25uZWN0aW5nKSB7XG4gICAgICAgICAgICAgICAgTG9nZ2VyLndhcm4oXCJUcnlpbmcgdG8gcmVjb25uZWN0VG9OZXdVcmkgd2hlbiByZWNvbm5lY3RpbmcuLi4gSWdub3JpbmcgdGhpcyByZWNvbm5lY3Rpb24uXCIpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWNvbm5lY3RpbmcgPSB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY29uZmlnLm9ucmVjb25uZWN0aW5nKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLm9ucmVjb25uZWN0aW5nKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZm9yY2luZ0Rpc2Nvbm5lY3Rpb24pIHtcbiAgICAgICAgICAgIHJlY29ubmVjdFRvTmV3VXJpKG1heFJldHJpZXMsIG51bVJldHJpZXMsIHdzVXJpKTtcblxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGNvbmZpZy5uZXdXc1VyaU9uUmVjb25uZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLm5ld1dzVXJpT25SZWNvbm5lY3Rpb24oZnVuY3Rpb24oZXJyb3IsIG5ld1dzVXJpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBMb2dnZXIuZGVidWcoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNvbm5lY3RUb1NhbWVVcmkobWF4UmV0cmllcywgbnVtUmV0cmllcyArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgUkVUUllfVElNRV9NUyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWNvbm5lY3RUb05ld1VyaShtYXhSZXRyaWVzLCBudW1SZXRyaWVzLCBuZXdXc1VyaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWNvbm5lY3RUb05ld1VyaShtYXhSZXRyaWVzLCBudW1SZXRyaWVzLCB3c1VyaSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUT0RPIFRlc3QgcmV0cmllcy4gSG93IHRvIGZvcmNlIG5vdCBjb25uZWN0aW9uP1xuICAgIGZ1bmN0aW9uIHJlY29ubmVjdFRvTmV3VXJpKG1heFJldHJpZXMsIG51bVJldHJpZXMsIHJlY29ubmVjdFdzVXJpKSB7XG4gICAgICAgIExvZ2dlci5kZWJ1ZyhcIlJlY29ubmVjdGlvbiBhdHRlbXB0ICNcIiArIG51bVJldHJpZXMpO1xuXG4gICAgICAgIHdzLmNsb3NlKCk7XG5cbiAgICAgICAgd3NVcmkgPSByZWNvbm5lY3RXc1VyaSB8fCB3c1VyaTtcblxuICAgICAgICB2YXIgbmV3V3M7XG4gICAgICAgIGlmICh1c2VTb2NrSlMpIHtcbiAgICAgICAgICAgIG5ld1dzID0gbmV3IFNvY2tKUyh3c1VyaSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBuZXdXcyA9IG5ldyBXZWJTb2NrZXQod3NVcmkpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3V3Mub25vcGVuID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBMb2dnZXIuZGVidWcoXCJSZWNvbm5lY3RlZCBhZnRlciBcIiArIG51bVJldHJpZXMgKyBcIiBhdHRlbXB0cy4uLlwiKTtcbiAgICAgICAgICAgIGxvZ0Nvbm5lY3RlZChuZXdXcywgd3NVcmkpO1xuICAgICAgICAgICAgcmVjb25uZWN0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICByZWdpc3Rlck1lc3NhZ2VIYW5kbGVyKCk7XG4gICAgICAgICAgICBpZiAoY29uZmlnLm9ucmVjb25uZWN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5vbnJlY29ubmVjdGVkKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG5ld1dzLm9uY2xvc2UgPSByZWNvbm5lY3Rpb25PbkNsb3NlO1xuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBvbkVycm9yT3JDbG9zZSA9IGZ1bmN0aW9uKGVycm9yKSB7XG4gICAgICAgICAgICBMb2dnZXIud2FybihcIlJlY29ubmVjdGlvbiBlcnJvcjogXCIsIGVycm9yKTtcblxuICAgICAgICAgICAgaWYgKG51bVJldHJpZXMgPT09IG1heFJldHJpZXMpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLm9uZGlzY29ubmVjdCkge1xuICAgICAgICAgICAgICAgICAgICBjb25maWcub25kaXNjb25uZWN0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICByZWNvbm5lY3RUb1NhbWVVcmkobWF4UmV0cmllcywgbnVtUmV0cmllcyArIDEpO1xuICAgICAgICAgICAgICAgIH0sIFJFVFJZX1RJTUVfTVMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIG5ld1dzLm9uZXJyb3IgPSBvbkVycm9yT3JDbG9zZTtcblxuICAgICAgICB3cyA9IG5ld1dzO1xuICAgIH1cblxuICAgIHRoaXMuY2xvc2UgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgY2xvc2luZyA9IHRydWU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mVkKVxuICAgICAgICB7XG4gICAgICAgICAgaWYoZXJyb3IpXG4gICAgICAgICAgICBlcnJvci5mcm9tID0gc2VsZi5wZWVySUQ7XG4gICAgICAgICAgZWxzZVxuICAgICAgICAgICAgcmVzdWx0LmZyb20gPSBzZWxmLnBlZXJJRDtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFByb3RvY29sIGluZGljYXRlcyB0aGF0IHJlc3BvbnNlcyBoYXMgb3duIHJlcXVlc3QgbWV0aG9kc1xuICAgICAgICBpZihyZXNwb25zZU1ldGhvZClcbiAgICAgICAge1xuICAgICAgICAgIGlmKHJlc3BvbnNlTWV0aG9kLmVycm9yID09IHVuZGVmaW5lZCAmJiBlcnJvcilcbiAgICAgICAgICAgIG1lc3NhZ2UgPVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBlcnJvcjogZXJyb3JcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICBlbHNlXG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIG1ldGhvZCA9IGVycm9yXG4gICAgICAgICAgICAgICAgICAgICAgID8gcmVzcG9uc2VNZXRob2QuZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgOiByZXNwb25zZU1ldGhvZC5yZXNwb25zZTtcblxuICAgICAgICAgICAgbWVzc2FnZSA9XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIG1ldGhvZDogbWV0aG9kLFxuICAgICAgICAgICAgICBwYXJhbXM6IGVycm9yIHx8IHJlc3VsdFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICAgIG1lc3NhZ2UgPVxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGVycm9yOiAgZXJyb3IsXG4gICAgICAgICAgICByZXN1bHQ6IHJlc3VsdFxuICAgICAgICAgIH07XG5cbiAgICAgICAgbWVzc2FnZSA9IHBhY2tlci5wYWNrKG1lc3NhZ2UsIGlkKTtcbiAgICAgI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pZihkZXN0ICE9IHVuZGVmaW5lZClcbiAgICB7XG4gICAgICBwYXJhbXMgPSBwYXJhbXMgfHwge307XG5cbiAgICAgIHBhcmFtcy5kZXN0ID0gZGVzdDtcbiAgICB9O1xuXG4gICAgLy8gRW5jb2RlIG1lc3NhZ2VcbiAgICB2YXIgbWVzc2FnZSA9XG4gICAge1xuICAgICAgbWV0aG9kOiBtZXRob2QsXG4gICAgICBwYXJhbXM6IHBhcmFtc1xuICAgIH07XG5cbiAgICBpZihjYWxsYmFjaylcbiAgICB7XG4gICAgICB2YXIgaWQgPSByZXF1ZXN0SUQrKztcbiAgICAgIHZhciByZXRyaWVkID0gMDtcblxuICAgICAgbWVzc2FnZSA9IHBhY2tlci5wYWNrKG1lc3NhZ2UsIGlkKTtcblxuICAgICAgZnVuY3Rpb24gZGlzcGF0Y2hDYWxsYmFjayhlcnJvciwgcmVzdWx0KVxuICAgICAge1xuICAgICAgICBzZWxmLmNhbmNlbChtZXNzYWdlKTtcblxuICAgICAgICBjYWxsYmFjayhlcnJvciwgcmVzdWx0KTtcbiAgICAgIH07XG5cbiAgICAgIHZhciByZXF1ZXN0ID1cbiAgICAgIHtcbiAgICAgICAgbWVzc2FnZTogICAgICAgICBtZXNzYWdlLFxuICAgICAgICBjYWxsYmFjazogICAgICAgIGRpc3BhdGNoQ2FsbGJhY2ssXG4gICAgICAgIHJlc3BvbnNlTWV0aG9kczogcmVzcG9uc2VNZXRob2RzW21ldGhvZF0gfHwge31cbiAgICAgIH07XG5cbiAgICAgIHZhciBlbmNvZGVfdHJhbnNwb3J0ID0gdW5pZnlUcmFuc3BvcnQodHJhbnNwb3J0KTtcblxuICAgICAgZnVuY3Rpb24gc2VuZFJlcXVlc3QodHJhbnNwb3J0KVxuICAgICAge1xuICAgICAgICB2YXIgcnQgPSAobWV0aG9kID09PSAncGluZycgPyBwaW5nX3JlcXVlc3RfdGltZW91dCA6IHJlcXVlc3RfdGltZW91dCk7XG4gICAgICAgIHJlcXVlc3QudGlt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SAnZmlyZWZveCdcbiAgICAvLyBzY3JlZW5fY29uc3RyYWludHMgPSB7Li4ufVxuICAgIGlmICghIW5hdmlnYXRvci5tb3pHZXRVc2VyTWVkaWEpIHtcbiAgICAgICAgY2FsbGJhY2sobnVsbCwgJ2ZpcmVmb3gnLCB7XG4gICAgICAgICAgICB2aWRlbzoge1xuICAgICAgICAgICAgICAgIG1vek1lZGlhU291cmNlOiAnd2luZG93JyxcbiAgICAgICAgICAgICAgICBtZWRpYVNvdXJjZTogJ3dpbmRvdydcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIG9uSUZyYW1lQ2FsbGJhY2spO1xuXG4gICAgZnVuY3Rpb24gb25JRnJhbWVDYWxsYmFjayhldmVudCkge1xuICAgICAgICBpZiAoIWV2ZW50LmRhdGEpIHJldHVybjtcblxuICAgICAgICBpZiAoZXZlbnQuZGF0YS5jaHJvbWVNZWRpYVNvdXJjZUlkKSB7XG4gICAgICAgICAgICBpZiAoZXZlbnQuZGF0YS5jaHJvbWVNZWRpYVNvdXJjZUlkID09PSAnUGVybWlzc2lvbkRlbmllZEVycm9yJykge1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrKCdwZXJtaXNzaW9uLWRlbmllZCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjYWxsYmFjayhudWxsLCBldmVudC5kYXRhLmNocm9tZU1lZGlhU291cmNlSWQsIGdldFNjcmVlbkNvbnN0cmFpbnRzKG51bGwsIGV2ZW50LmRhdGEuY2hyb21lTWVkaWFTb3VyY2VJZCkpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyB0aGlzIGV2ZW50IGxpc3RlbmVyIGlzIG5vIG1vcmUgbmVlZGVkXG4gICAgICAgICAgICB3aW5kb3cucmVtb3ZlRXZlbnRMaXN0ZW5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YXRmb3JtJyk7XG5cbmV4cG9ydCBjbGFzcyBXZWJSdGNTdGF0cyB7XG5cbiAgICBwcml2YXRlIHdlYlJ0Y1N0YXRzRW5hYmxlZCA9IGZhbHNlO1xuICAgIHByaXZhdGUgd2ViUnRjU3RhdHNJbnRlcnZhbElkOiBOb2RlSlMuVGltZXI7XG4gICAgcHJpdmF0ZSBzdGF0c0ludGVydmFsID0gMTtcbiAgICBwcml2YXRlIHN0YXRzOiBhbnkgPSB7XG4gICAgICAgIGluYm91bmQ6IHtcbiAgICAgICAgICAgIGF1ZGlvOiB7XG4gICAgICAgICAgICAgICAgYnl0ZXNSZWNlaXZlZDogMCxcbiAgICAgICAgICAgICAgICBwYWNrZXRzUmVjZWl2ZWQ6IDAsXG4gICAgICAgICAgICAgICAgcGFja2V0c0xvc3Q6IDBcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB2aWRlbzoge1xuICAgICAgICAgICAgICAgIGJ5dGVzUmVjZWl2ZWQ6IDAsXG4gICAgICAgICAgICAgICAgcGFja2V0c1JlY2VpdmVkOiAwLFxuICAgICAgICAgICAgICAgIHBhY2tldHNMb3N0OiAwLFxuICAgICAgICAgICAgICAgIGZyYW1lc0RlY29kZWQ6IDAsXG4gICAgICAgICAgICAgICAgbmFja0NvdW50OiAwXG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG91dGJvdW5kOiB7XG4gICAgICAgICAgICBhdWRpbzoge1xuICAgICAgICAgICAgICAgIGJ5dGVzU2VudDogMCxcbiAgICAgICAgICAgICAgICBwYWNrZXRzU2VudDogMCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB2aWRlbzoge1xuICAgICAgICAgICAgICAgIGJ5dGVzU2VudDogMCxcbiAgICAgICAgICAgICAgICBwYWNrZXRzU2VudDogMCxcbiAgICAgICAgICAgICAgICBmcmFtZXNFbmNvZGVkOiAwLFxuICAgICAgICAgICAgICAgIG5hY2tDb3VudDogMFxuICAgICAgICAgICAgf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ICAgICBodHRwLm9wZW4oJ1BPU1QnLCB1cmwsIHRydWUpO1xuXG4gICAgICAgICAgICBodHRwLnNldFJlcXVlc3RIZWFkZXIoJ0NvbnRlbnQtdHlwZScsICdhcHBsaWNhdGlvbi9qc29uJyk7XG5cbiAgICAgICAgICAgIGh0dHAub25yZWFkeXN0YXRlY2hhbmdlID0gKCkgPT4geyAvLyBDYWxsIGEgZnVuY3Rpb24gd2hlbiB0aGUgc3RhdGUgY2hhbmdlcy5cbiAgICAgICAgICAgICAgICBpZiAoaHR0cC5yZWFkeVN0YXRlID09PSA0ICYmIGh0dHAuc3RhdHVzID09PSAyMDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ1dlYlJ0YyBzdGF0cyBzdWNjZXNzZnVsbHkgc2VudCB0byAnICsgdXJsICsgJyBmb3Igc3RyZWFtICcgKyB0aGlzLnN0cmVhbS5zdHJlYW1JZCArICcgb2YgY29ubmVjdGlvbiAnICsgdGhpcy5zdHJlYW0uY29ubmVjdGlvbi5jb25uZWN0aW9uSWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBodHRwLnNlbmQoanNvbik7XG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgZiA9IChzdGF0cykgPT4ge1xuXG4gICAgICAgICAgICBpZiAocGxhdGZvcm0ubmFtZSEuaW5kZXhPZignRmlyZWZveCcpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHN0YXRzLmZvckVhY2goKHN0YXQpID0+IHtcblxuICAgICAgICAgICAgICAgICAgICBsZXQganNvbiA9IHt9O1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgoc3RhdC50eXBlID09PSAnaW5ib3VuZC1ydHAnKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEF2b2lkIGZpcmVmb3ggZW1wdHkgb3V0Ym91bmQtcnRwIHN0YXRpc3RpY3NcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0Lm5hY2tDb3VudCAhPT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXQuaXNSZW1vdGUgPT09IGZhbHNlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdC5pZC5zdGFydHNXaXRoKCdpbmJvdW5kJykgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0LnJlbW90ZUlkLnN0YXJ0c1dpdGgoJ2luYm91bmQnKVxuICAgICAgICAgICAgICAgICAgICAgICAgKSkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNJZCA9ICd3ZWJydGNfaW5ib3VuZF8nICsgc3RhdC5tZWRpYVR5cGUgKyAnXycgKyBzdGF0LnNzcmM7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBqaXQgPSBzdGF0LmppdHRlciAqIDEwMDA7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY3MgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNSZWNlaXZlZDogKHN0YXQuYnl0ZXNSZWNlaXZlZCAtIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNSZWNlaXZlZCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaml0dGVyOiBqaXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c1JlY2VpdmVkOiAoc3RhdC5wYWNrZXRzUmVjZWl2ZWQgLSB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNSZWNlaXZlZCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c0xvc3Q6IChzdGF0LnBhY2tldHNMb3N0IC0gdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5wYWNrZXRzTG9zdCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bml0cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1JlY2VpdmVkOiAnYnl0ZXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGppdHRlcjogJ21zJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzUmVjZWl2ZWQ6ICdwYWNrZXRzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzTG9zdDogJ3BhY2tldHMnXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXQubWVkaWFUeXBlID09PSAndmlkZW8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljc1snZnJhbWVzRGVjb2RlZCddID0gKHN0YXQuZnJhbWVzRGVjb2RlZCAtIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5mcmFtZXNEZWNvZGVkKSAvIHRoaXMuc3RhdHNJbnRlcnZhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRyaWNzWyduYWNrQ291bnQnXSA9IChzdGF0Lm5hY2tDb3VudCAtIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5uYWNrQ291bnQpIC8gdGhpcy5zdGF0c0ludGVydmFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaXRzWydmcmFtZXNEZWNvZGVkJ10gPSAnZnJhbWVzJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bml0c1snbmFja0NvdW50J10gPSAncGFja2V0cyc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmQudmlkZW8uZnJhbWVzRGVjb2RlZCA9IHN0YXQuZnJhbWVzRGVjb2RlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmQudmlkZW8ubmFja0NvdW50ID0gc3RhdC5uYWNrQ291bnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNSZWNlaXZlZCA9IHN0YXQuYnl0ZXNSZWNlaXZlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c1JlY2VpdmVkID0gc3RhdC5wYWNrZXRzUmVjZWl2ZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNMb3N0ID0gc3RhdC5wYWNrZXRzTG9zdDtcblxuICAgICAgICAgICAgICAgICAgICAgICAganNvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQHRpbWVzdGFtcCc6IG5ldyBEYXRlKHN0YXQudGltZXN0YW1wKS50b0lTT1N0cmluZygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleGVjJzogaW5zdHJ1bWVudGF0aW9uLmV4ZWMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbXBvbmVudCc6IGluc3RydW1lbnRhdGlvbi5jb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmVhbSc6ICd3ZWJSdGMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogbWV0cmljSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0cmVhbV90eXBlJzogJ2NvbXBvc2VkX21ldHJpY3MnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1bml0cyc6IHVuaXRzXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAganNvblttZXRyaWNJZF0gPSBtZXRyaWNzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBzZW5kUG9zdChKU09OLnN0cmluZ2lmeShqc29uKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoc3RhdC50eXBlID09PSAnb3V0Ym91bmQtcnRwJykgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBdm9pZCBmaXJlZm94IGVtcHR5IGluYm91bmQtcnRwIHN0YXRpc3RpY3NcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0LmlzUmVtb3RlID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXQuaWQudG9Mb3dlckNhc2UoKS5pbmNsdWRlcygnb3V0Ym91bmQnKVxuICAgICAgICAgICAgICAgICAgICAgICAgKSkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNJZCA9ICd3ZWJydGNfb3V0Ym91bmRfJyArIHN0YXQubWVkaWFUeXBlICsgJ18nICsgc3RhdC5zc3JjO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzU2VudDogKHN0YXQuYnl0ZXNTZW50IC0gdGhpcy5zdGF0cy5vdXRib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNTZW50KSAvIHRoaXMuc3RhdHNJbnRlcnZhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzU2VudDogKHN0YXQucGFja2V0c1NlbnQgLSB0aGlzLnN0YXRzLm91dGJvdW5kW3N0YXQubWVkaWFUeXBlXS5wYWNrZXRzU2VudCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bml0cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1NlbnQ6ICdieXRlcycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c1NlbnQ6ICdwYWNrZXRzJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0Lm1lZGlhVHlwZSA9PT0gJ3ZpZGVvJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3NbJ2ZyYW1lc0VuY29kZWQnXSA9IChzdGF0LmZyYW1lc0VuY29kZWQgLSB0aGlzLnN0YXRzLm91dGJvdW5kLnZpZGVvLmZyYW1lc0VuY29kZWQpIC8gdGhpcy5zdGF0c0ludGVydmFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaXRzWydmcmFtZXNFbmNvZGVkJ10gPSAnZnJhbWVzJztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMub3V0Ym91bmQudmlkZW8uZnJhbWVzRW5jb2RlZCA9IHN0YXQuZnJhbWVzRW5jb2RlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5vdXRib3VuZFtzdGF0Lm1lZGlhVHlwZV0uYnl0ZXNTZW50ID0gc3RhdC5ieXRlc1NlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLm91dGJvdW5kW3N0YXQubWVkaWFUeXBlXS5wYWNrZXRzU2VudCA9IHN0YXQucGFja2V0c1NlbnQ7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0B0aW1lc3RhbXAnOiBuZXcgRGF0ZShzdGF0LnRpbWVzdGFtcCkudG9JU09TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZXhlYyc6IGluc3RydW1lbnRhdGlvbi5leGVjLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb21wb25lbnQnOiBpbnN0cnVtZW50YXRpb24uY29tcG9uZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdHJlYW0nOiAnd2ViUnRjJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6IG1ldHJpY0lkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdHJlYW1fdHlwZSc6ICdjb21wb3NlZF9tZXRyaWNzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndW5pdHMnOiB1bml0c1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzb25bbWV0cmljSWRdID0gbWV0cmljcztcblxuICAgICAgICAgICAgICAgICAgICAgICAgc2VuZFBvc3QoSlNPTi5zdHJpbmdpZnkoanNvbikpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBsYXRmb3JtLm5hbWUhLmluZGV4T2YoJ0Nocm9tZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IG9mIE9iamVjdC5rZXlzKHN0YXRzKSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGF0ID0gc3RhdHNba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXQudHlwZSA9PT0gJ3NzcmMnKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBqc29uID0ge307XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgnYnl0ZXNSZWNlaXZlZCcgaW4gc3RhdCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0YXQubWVkaWFUeXBlID09PSAnYXVkaW8nICYmICdhdWRpb091dHB1dExldmVsJyBpbiBzdGF0KSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzdGF0Lm1lZGlhVHlwZSA9PT0gJ3ZpZGVvJyAmJiAncXBTdW0nIGluIHN0YXQpXG4gICAgICAgICAgICAgICAgICAgICAgICApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW5ib3VuZC1ydHBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNJZCA9ICd3ZWJydGNfaW5ib3VuZF8nICsgc3RhdC5tZWRpYVR5cGUgKyAnXycgKyBzdGF0LnNzcmM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1JlY2VpdmVkOiAoc3RhdC5ieXRlc1JlY2VpdmVkIC0gdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5ieXRlc1JlY2VpdmVkKSAvIHRoaXMuc3RhdHNJbnRlcnZhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaml0dGVyOiBzdGF0Lmdvb2dKaXR0ZXJCdWZmZXJNcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c1JlY2VpdmVkOiAoc3RhdC5wYWNrZXRzUmVjZWl2ZWQgLSB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNSZWNlaXZlZCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tldHNMb3N0OiAoc3RhdC5wYWNrZXRzTG9zdCAtIHRoaXMuc3RhdHMuaW5ib3VuZFtzdGF0Lm1lZGlhVHlwZV0ucGFja2V0c0xvc3QpIC8gdGhpcy5zdGF0c0ludGVydmFsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bml0cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNSZWNlaXZlZDogJ2J5dGVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaml0dGVyOiAnbXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRzUmVjZWl2ZWQ6ICdwYWNrZXRzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c0xvc3Q6ICdwYWNrZXRzJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXQubWVkaWFUeXBlID09PSAndmlkZW8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3NbJ2ZyYW1lc0RlY29kZWQnXSA9IChzdGF0LmZyYW1lc0RlY29kZWQgLSB0aGlzLnN0YXRzLmluYm91bmQudmlkZW8uZnJhbWVzRGVjb2RlZCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3NbJ25hY2tDb3VudCddID0gKHN0YXQuZ29vZ05hY2tzU2VudCAtIHRoaXMuc3RhdHMuaW5ib3VuZC52aWRlby5uYWNrQ291bnQpIC8gdGhpcy5zdGF0c0ludGVydmFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bml0c1snZnJhbWVzRGVjb2RlZCddID0gJ2ZyYW1lcyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaXRzWyduYWNrQ291bnQnXSA9ICdwYWNrZXRzJztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmQudmlkZW8uZnJhbWVzRGVjb2RlZCA9IHN0YXQuZnJhbWVzRGVjb2RlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5pbmJvdW5kLnZpZGVvLm5hY2tDb3VudCA9IHN0YXQuZ29vZ05hY2tzU2VudDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLmJ5dGVzUmVjZWl2ZWQgPSBzdGF0LmJ5dGVzUmVjZWl2ZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5pbmJvdW5kW3N0YXQubWVkaWFUeXBlXS5wYWNrZXRzUmVjZWl2ZWQgPSBzdGF0LnBhY2tldHNSZWNlaXZlZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRzLmluYm91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNMb3N0ID0gc3RhdC5wYWNrZXRzTG9zdDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdAdGltZXN0YW1wJzogbmV3IERhdGUoc3RhdC50aW1lc3RhbXApLnRvSVNPU3RyaW5nKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleGVjJzogaW5zdHJ1bWVudGF0aW9uLmV4ZWMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb21wb25lbnQnOiBpbnN0cnVtZW50YXRpb24uY29tcG9uZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RyZWFtJzogJ3dlYlJ0YycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogbWV0cmljSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdHJlYW1fdHlwZSc6ICdjb21wb3NlZF9tZXRyaWNzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VuaXRzJzogdW5pdHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb25bbWV0cmljSWRdID0gbWV0cmljcztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRQb3N0KEpTT04uc3RyaW5naWZ5KGpzb24pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJ2J5dGVzU2VudCcgaW4gc3RhdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG91dGJvdW5kLXJ0cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY0lkID0gJ3dlYnJ0Y19vdXRib3VuZF8nICsgc3RhdC5tZWRpYVR5cGUgKyAnXycgKyBzdGF0LnNzcmM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1NlbnQ6IChzdGF0LmJ5dGVzU2VudCAtIHRoaXMuc3RhdHMub3V0Ym91bmRbc3RhdC5tZWRpYVR5cGVdLmJ5dGVzU2VudCkgLyB0aGlzLnN0YXRzSW50ZXJ2YWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tldHNTZW50OiAoc3RhdC5wYWNrZXRzU2VudCAtIHRoaXMuc3RhdHMub3V0Ym91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNTZW50KSAvIHRoaXMuc3RhdHNJbnRlcnZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdW5pdHMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzU2VudDogJ2J5dGVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2V0c1NlbnQ6ICdwYWNrZXRzJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXQubWVkaWFUeXBlID09PSAndmlkZW8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3NbJ2ZyYW1lc0VuY29kZWQnXSA9IChzdGF0LmZyYW1lc0VuY29kZWQgLSB0aGlzLnN0YXRzLm91dGJvdW5kLnZpZGVvLmZyYW1lc0VuY29kZWQpIC8gdGhpcy5zdGF0c0ludGVydmFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bml0c1snZnJhbWVzRW5jb2RlZCddID0gJ2ZyYW1lcyc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0cy5vdXRib3VuZC52aWRlby5mcmFtZXNFbmNvZGVkID0gc3RhdC5mcmFtZXNFbmNvZGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMub3V0Ym91bmRbc3RhdC5tZWRpYVR5cGVdLmJ5dGVzU2VudCA9IHN0YXQuYnl0ZXNTZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdHMub3V0Ym91bmRbc3RhdC5tZWRpYVR5cGVdLnBhY2tldHNTZW50ID0gc3RhdC5wYWNrZXRzU2VudDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdAdGltZXN0YW1wJzogbmV3IERhdGUoc3RhdC50aW1lc3RhbXApLnRvSVNPU3RyaW5nKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleGVjJzogaW5zdHJ1bWVudGF0aW9uLmV4ZWMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb21wb25lbnQnOiBpbnN0cnVtZW50YXRpb24uY29tcG9uZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RyZWFtJzogJ3dlYlJ0YycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogbWV0cmljSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdHJlYW1fdHlwZSc6ICdjb21wb3NlZF9tZXRyaWNzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VuaXRzJzogdW5pdHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb25bbWV0cmljSWRdID0gbWV0cmljcztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRQb3N0KEpTT04uc3RyaW5naWZ5KGpzb24pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmdldFN0YXRzQWdub3N0aWModGhpcy5zdHJlYW0uZ2V0UlRDUGVlckNvbm5lY3Rpb24oKSwgZiwgKGVycm9yKSA9PiB7IGNvbnNvbGUubG9nKGVycm9yKTsgfSk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBzdGFuZGFyZGl6ZVJlcG9ydChyZXNwb25zZSkge1xuICAgICAgICBpZiAocGxhdGZvcm0ubmFtZSEuaW5kZXhPZignRmlyZWZveCcpICE9PSAtMSkge1xuICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgc3RhbmRhcmRSZXBvcnQgPSB7fTtcbiAgICAgICAgcmVzcG9uc2UucmVzdWx0KCkuZm9yRWFjaCgocmVwb3J0KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBzdGFuZGF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gQ2hyb21lLCB0aGUgZmlyc3QgdHdvIGFyZ3VtZW50cyBhcmUgcmV2ZXJzZWRcbiAgICAgICAgICAgIHJldHVybiBwYy5nZXRTdGF0cygocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXBvcnQgPSB0aGlzLnN0YW5kYXJkaXplUmVwb3J0KHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICBzdWNjZXNzQ2IocmVwb3J0KTtcbiAgICAgICAgICAgIH0sIG51bGwsIGZhaWx1cmVDYik7XG4gICAgICAgIH1cbiAgICB9XG5cbn0iXX0= diff --git a/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js b/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js index e5ed602ff8..f93e7cd394 100644 --- a/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js +++ b/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js @@ -1 +1 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i1)er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Unhandled "error" event. ('+er+")");err.context=er;throw err}return false}handler=events[type];if(!handler)return false;var isFn=typeof handler==="function";len=arguments.length;switch(len){case 1:emitNone(handler,isFn,this);break;case 2:emitOne(handler,isFn,this,arguments[1]);break;case 3:emitTwo(handler,isFn,this,arguments[1],arguments[2]);break;case 4:emitThree(handler,isFn,this,arguments[1],arguments[2],arguments[3]);break;default:args=new Array(len-1);for(i=1;i0&&existing.length>m){existing.warned=true;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+' "'+String(type)+'" listeners '+"added. Use emitter.setMaxListeners() to "+"increase limit.");w.name="MaxListenersExceededWarning";w.emitter=target;w.type=type;w.count=existing.length;if(typeof console==="object"&&console.warn){console.warn("%s: %s",w.name,w.message)}}}}return target}EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,true)};function onceWrapper(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;switch(arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:var args=new Array(arguments.length);for(var i=0;i=0;i--){if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener;position=i;break}}if(position<0)return this;if(position===0)list.shift();else spliceOne(list,position);if(list.length===1)events[type]=list[0];if(events.removeListener)this.emit("removeListener",type,originalListener||listener)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;events=this._events;if(!events)return this;if(!events.removeListener){if(arguments.length===0){this._events=objectCreate(null);this._eventsCount=0}else if(events[type]){if(--this._eventsCount===0)this._events=objectCreate(null);else delete events[type]}return this}if(arguments.length===0){var keys=objectKeys(events);var key;for(i=0;i=0;i--){this.removeListener(type,listeners[i])}}return this};EventEmitter.prototype.listeners=function listeners(type){var evlistener;var ret;var events=this._events;if(!events)ret=[];else{evlistener=events[type];if(!evlistener)ret=[];else if(typeof evlistener==="function")ret=[evlistener.listener||evlistener];else ret=unwrapListeners(evlistener)}return ret};EventEmitter.listenerCount=function(emitter,type){if(typeof emitter.listenerCount==="function"){return emitter.listenerCount(type)}else{return listenerCount.call(emitter,type)}};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(type){var events=this._events;if(events){var evlistener=events[type];if(typeof evlistener==="function"){return 1}else if(evlistener){return evlistener.length}}return 0}EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;kmaxVolume&&fftBins[i]<0){maxVolume=fftBins[i]}}return maxVolume}var audioContextType;if(typeof window!=="undefined"){audioContextType=window.AudioContext||window.webkitAudioContext}var audioContext=null;module.exports=function(stream,options){var harker=new WildEmitter;if(!audioContextType)return harker;var options=options||{},smoothing=options.smoothing||.1,interval=options.interval||50,threshold=options.threshold,play=options.play,history=options.history||10,running=true;if(!audioContext){audioContext=new audioContextType}var sourceNode,fftBins,analyser;analyser=audioContext.createAnalyser();analyser.fftSize=512;analyser.smoothingTimeConstant=smoothing;fftBins=new Float32Array(analyser.frequencyBinCount);if(stream.jquery)stream=stream[0];if(stream instanceof HTMLAudioElement||stream instanceof HTMLVideoElement){sourceNode=audioContext.createMediaElementSource(stream);if(typeof play==="undefined")play=true;threshold=threshold||-50}else{sourceNode=audioContext.createMediaStreamSource(stream);threshold=threshold||-50}sourceNode.connect(analyser);if(play)analyser.connect(audioContext.destination);harker.speaking=false;harker.suspend=function(){audioContext.suspend()};harker.resume=function(){audioContext.resume()};Object.defineProperty(harker,"state",{get:function(){return audioContext.state}});audioContext.onstatechange=function(){harker.emit("state_change",audioContext.state)};harker.setThreshold=function(t){threshold=t};harker.setInterval=function(i){interval=i};harker.stop=function(){running=false;harker.emit("volume_change",-100,threshold);if(harker.speaking){harker.speaking=false;harker.emit("stopped_speaking")}analyser.disconnect();sourceNode.disconnect()};harker.speakingHistory=[];for(var i=0;ithreshold&&!harker.speaking){for(var i=harker.speakingHistory.length-3;i=2){harker.speaking=true;harker.emit("speaking")}}else if(currentVolumethreshold));looper()},interval)};looper();return harker}},{wildemitter:24}],6:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],7:[function(require,module,exports){(function(isNode){var Public=function(clone){return merge(clone===true,false,arguments)},publicName="merge";Public.recursive=function(clone){return merge(clone===true,true,arguments)};Public.clone=function(input){var output=input,type=typeOf(input),index,size;if(type==="array"){output=[];size=input.length;for(index=0;index1){url=parts[1];parts=parts[0].split(":");output.username=parts[0];output.credential=(input||{}).credential||parts[1]||""}output.url=protocol+url;output.urls=[output.url];return output}},{}],9:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={function:true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var maxSafeInteger=Math.pow(2,53)-1;var reOpera=/\bOpera/;var thisBinding=this;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var toString=objectProto.toString;function capitalize(string){string=String(string);return string.charAt(0).toUpperCase()+string.slice(1)}function cleanupOS(os,pattern,label){var data={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};if(pattern&&label&&/^Win/i.test(os)&&!/^Windows Phone /i.test(os)&&(data=data[/[\d.]+$/.exec(os)])){os="Windows "+data}os=String(os);if(pattern&&label){os=os.replace(RegExp(pattern,"i"),label)}os=format(os.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]);return os}function each(object,callback){var index=-1,length=object?object.length:0;if(typeof length=="number"&&length>-1&&length<=maxSafeInteger){while(++index3&&"WebKit"||/\bOpera\b/.test(name)&&(/\bOPR\b/.test(ua)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(ua)&&!/^(?:Trident|EdgeHTML)$/.test(layout)&&"WebKit"||!layout&&/\bMSIE\b/i.test(ua)&&(os=="Mac OS"?"Tasman":"Trident")||layout=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(name)&&"NetFront"){layout=[data]}if(name=="IE"&&(data=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua)||0)[1])){name+=" Mobile";os="Windows Phone "+(/\+$/.test(data)?data:data+".x");description.unshift("desktop mode")}else if(/\bWPDesktop\b/i.test(ua)){name="IE Mobile";os="Windows Phone 8.x";description.unshift("desktop mode");version||(version=(/\brv:([\d.]+)/.exec(ua)||0)[1])}else if(name!="IE"&&layout=="Trident"&&(data=/\brv:([\d.]+)/.exec(ua))){if(name){description.push("identifying as "+name+(version?" "+version:""))}name="IE";version=data[1]}if(useFeatures){if(isHostType(context,"global")){if(java){data=java.lang.System;arch=data.getProperty("os.arch");os=os||data.getProperty("os.name")+" "+data.getProperty("os.version")}if(rhino){try{version=context.require("ringo/engine").version.join(".");name="RingoJS"}catch(e){if((data=context.system)&&data.global.system==context.system){name="Narwhal";os||(os=data[0].os||null)}}if(!name){name="Rhino"}}else if(typeof context.process=="object"&&!context.process.browser&&(data=context.process)){if(typeof data.versions=="object"){if(typeof data.versions.electron=="string"){description.push("Node "+data.versions.node);name="Electron";version=data.versions.electron}else if(typeof data.versions.nw=="string"){description.push("Chromium "+version,"Node "+data.versions.node);name="NW.js";version=data.versions.nw}}if(!name){name="Node.js";arch=data.arch;os=data.platform;version=/[\d.]+/.exec(data.version);version=version?version[0]:null}}}else if(getClassOf(data=context.runtime)==airRuntimeClass){name="Adobe AIR";os=data.flash.system.Capabilities.os}else if(getClassOf(data=context.phantom)==phantomClass){name="PhantomJS";version=(data=data.version||null)&&data.major+"."+data.minor+"."+data.patch}else if(typeof doc.documentMode=="number"&&(data=/\bTrident\/(\d+)/i.exec(ua))){version=[version,doc.documentMode];if((data=+data[1]+4)!=version[1]){description.push("IE "+version[1]+" mode");layout&&(layout[1]="");version[1]=data}version=name=="IE"?String(version[1].toFixed(1)):version[0]}else if(typeof doc.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(name)){description.push("masking as "+name+" "+version);name="IE";version="11.0";layout=["Trident"];os="Windows"}os=os&&format(os)}if(version&&(data=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version)||/(?:alpha|beta)(?: ?\d)?/i.exec(ua+";"+(useFeatures&&nav.appMinorVersion))||/\bMinefield\b/i.test(ua)&&"a")){prerelease=/b/i.test(data)?"beta":"alpha";version=version.replace(RegExp(data+"\\+?$"),"")+(prerelease=="beta"?beta:alpha)+(/\d+\+?/.exec(data)||"")}if(name=="Fennec"||name=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(os)){name="Firefox Mobile"}else if(name=="Maxthon"&&version){version=version.replace(/\.[\d.]+/,".x")}else if(/\bXbox\b/i.test(product)){if(product=="Xbox 360"){os=null}if(product=="Xbox 360"&&/\bIEMobile\b/.test(ua)){description.unshift("mobile mode")}}else if((/^(?:Chrome|IE|Opera)$/.test(name)||name&&!product&&!/Browser|Mobi/.test(name))&&(os=="Windows CE"||/Mobi/i.test(ua))){name+=" Mobile"}else if(name=="IE"&&useFeatures){try{if(context.external===null){description.unshift("platform preview")}}catch(e){description.unshift("embedded")}}else if((/\bBlackBerry\b/.test(product)||/\bBB10\b/.test(ua))&&(data=(RegExp(product.replace(/ +/g," *")+"/([.\\d]+)","i").exec(ua)||0)[1]||version)){data=[data,/BB10/.test(ua)];os=(data[1]?(product=null,manufacturer="BlackBerry"):"Device Software")+" "+data[0];version=null}else if(this!=forOwn&&product!="Wii"&&(useFeatures&&opera||/Opera/.test(name)&&/\b(?:MSIE|Firefox)\b/i.test(ua)||name=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(os)||name=="IE"&&(os&&!/^Win/.test(os)&&version>5.5||/\bWindows XP\b/.test(os)&&version>8||version==8&&!/\bTrident\b/.test(ua)))&&!reOpera.test(data=parse.call(forOwn,ua.replace(reOpera,"")+";"))&&data.name){data="ing as "+data.name+((data=data.version)?" "+data:"");if(reOpera.test(name)){if(/\bIE\b/.test(data)&&os=="Mac OS"){os=null}data="identify"+data}else{data="mask"+data;if(operaClass){name=format(operaClass.replace(/([a-z])([A-Z])/g,"$1 $2"))}else{name="Opera"}if(/\bIE\b/.test(data)){os=null}if(!useFeatures){version=null}}layout=["Presto"];description.push(data)}if(data=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua)||0)[1]){data=[parseFloat(data.replace(/\.(\d)$/,".0$1")),data];if(name=="Safari"&&data[1].slice(-1)=="+"){name="WebKit Nightly";prerelease="alpha";version=data[1].slice(0,-1)}else if(version==data[1]||version==(data[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ua)||0)[1])){version=null}data[1]=(/\bChrome\/([\d.]+)/i.exec(ua)||0)[1];if(data[0]==537.36&&data[2]==537.36&&parseFloat(data[1])>=28&&layout=="WebKit"){layout=["Blink"]}if(!useFeatures||!likeChrome&&!data[1]){layout&&(layout[1]="like Safari");data=(data=data[0],data<400?1:data<500?2:data<526?3:data<533?4:data<534?"4+":data<535?5:data<537?6:data<538?7:data<601?8:"8")}else{layout&&(layout[1]="like Chrome");data=data[1]||(data=data[0],data<530?1:data<532?2:data<532.05?3:data<533?4:data<534.03?5:data<534.07?6:data<534.1?7:data<534.13?8:data<534.16?9:data<534.24?10:data<534.3?11:data<535.01?12:data<535.02?"13+":data<535.07?15:data<535.11?16:data<535.19?17:data<536.05?18:data<536.1?19:data<537.01?20:data<537.11?"21+":data<537.13?23:data<537.18?24:data<537.24?25:data<537.36?26:layout!="Blink"?"27":"28")}layout&&(layout[1]+=" "+(data+=typeof data=="number"?".x":/[.+]/.test(data)?"":"+"));if(name=="Safari"&&(!version||parseInt(version)>45)){version=data}}if(name=="Opera"&&(data=/\bzbov|zvav$/.exec(os))){name+=" ";description.unshift("desktop mode");if(data=="zvav"){name+="Mini";version=null}else{name+="Mobile"}os=os.replace(RegExp(" *"+data+"$"),"")}else if(name=="Safari"&&/\bChrome\b/.exec(layout&&layout[1])){description.unshift("desktop mode");name="Chrome Mobile";version=null;if(/\bOS X\b/.test(os)){manufacturer="Apple";os="iOS 4.3+"}else{os=null}}if(version&&version.indexOf(data=/[\d.]+$/.exec(os))==0&&ua.indexOf("/"+data+"-")>-1){os=trim(os.replace(data,""))}if(layout&&!/\b(?:Avant|Nook)\b/.test(name)&&(/Browser|Lunascape|Maxthon/.test(name)||name!="Safari"&&/^iOS/.test(os)&&/\bSafari\b/.test(layout[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name)&&layout[1])){(data=layout[layout.length-1])&&description.push(data)}if(description.length){description=["("+description.join("; ")+")"]}if(manufacturer&&product&&product.indexOf(manufacturer)<0){description.push("on "+manufacturer)}if(product){description.push((/^on /.test(description[description.length-1])?"":"on ")+product)}if(os){data=/ ([\d.+]+)$/.exec(os);isSpecialCasedOS=data&&os.charAt(os.length-data[0].length-1)=="/";os={architecture:32,family:data&&!isSpecialCasedOS?os.replace(data[0],""):os,version:data?data[1]:null,toString:function(){var version=this.version;return this.family+(version&&!isSpecialCasedOS?" "+version:"")+(this.architecture==64?" 64-bit":"")}}}if((data=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch))&&!/\bi686\b/i.test(arch)){if(os){os.architecture=64;os.family=os.family.replace(RegExp(" *"+data),"")}if(name&&(/\bWOW64\b/i.test(ua)||useFeatures&&/\w(?:86|32)$/.test(nav.cpuClass||nav.platform)&&!/\bWin64; x64\b/i.test(ua))){description.unshift("32-bit")}}else if(os&&/^OS X/.test(os.family)&&name=="Chrome"&&parseFloat(version)>=39){os.architecture=64}ua||(ua=null);var platform={};platform.description=ua;platform.layout=layout&&layout[0];platform.manufacturer=manufacturer;platform.name=name;platform.prerelease=prerelease;platform.product=product;platform.ua=ua;platform.version=name&&version;platform.os=os||{architecture:null,family:null,version:null,toString:function(){return"null"}};platform.parse=parse;platform.toString=toStringPlatform;if(platform.version){description.unshift(version)}if(platform.name){description.unshift(name)}if(os&&name&&!(os==String(os).split(" ")[0]&&(os==name.split(" ")[0]||product))){description.push(product?"("+os+")":"on "+os)}if(description.length){platform.description=description.join(" ")}return platform}var platform=parse();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){root.platform=platform;define(function(){return platform})}else if(freeExports&&freeModule){forOwn(platform,function(value,key){freeExports[key]=value})}else{root.platform=platform}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],10:[function(require,module,exports){var grammar=module.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(o){return o.encoding?"rtpmap:%d %s/%s/%s":o.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(o){return o.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(o){return o.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["value","uri","config"],format:function(o){return o.config!=null?"extmap:%s %s %s":"extmap:%s %s"}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(o){return o.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation"],format:function(o){var str="candidate:%s %d %s %d %s %d typ %s";str+=o.raddr!=null?" raddr %s rport %d":"%v%v";str+=o.tcptype!=null?" tcptype %s":"%v";if(o.generation!=null){str+=" generation %d"}return str}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_]*):(.*)/,names:["id","attribute","value"],format:"ssrc:%d %s:%s"},{push:"ssrcGroups",reg:/^ssrc-group:(\w*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{push:"invalid",names:["value"]}]};Object.keys(grammar).forEach(function(key){var objs=grammar[key];objs.forEach(function(obj){if(!obj.reg){obj.reg=/(.*)/}if(!obj.format){obj.format="%s"}})})},{}],11:[function(require,module,exports){var parser=require("./parser");var writer=require("./writer");exports.write=writer;exports.parse=parser.parse;exports.parseFmtpConfig=parser.parseFmtpConfig;exports.parsePayloads=parser.parsePayloads;exports.parseRemoteCandidates=parser.parseRemoteCandidates},{"./parser":12,"./writer":13}],12:[function(require,module,exports){var toIntIfInt=function(v){return String(Number(v))===v?Number(v):v};var attachProperties=function(match,location,names,rawName){if(rawName&&!names){location[rawName]=toIntIfInt(match[1])}else{for(var i=0;i=len){return x}var arg=args[i];i+=1;switch(x){case"%%":return"%";case"%s":return String(arg);case"%d":return Number(arg);case"%v":return""}})};var makeLine=function(type,obj,location){var str=obj.format instanceof Function?obj.format(obj.push?location:location[obj.name]):obj.format;var args=[type+"="+str];if(obj.names){for(var i=0;i3||!session.media.every(function(m){return["video","audio","data"].indexOf(m.mid)!==-1})){console.warn("This description does not look like Plan B.");return desc}var mids=[];session.media.forEach(function(m){mids.push(m.mid)});var hasBundle=false;if(typeof session.groups!=="undefined"&&Array.isArray(session.groups)){hasBundle=session.groups.every(function(g){return g.type!=="BUNDLE"||arrayEquals.apply(g.mids.sort(),[mids.sort()])})}if(!hasBundle){var mustBeBundle=false;session.media.forEach(function(m){if(m.direction!=="inactive"){mustBeBundle=true}});if(mustBeBundle){throw new Error("Cannot convert to Unified Plan because m-lines that"+" are not bundled were found.")}}var type;if(desc.type==="answer"){type="offer"}else if(desc.type==="offer"){type="answer"}else{throw new Error("Type '"+desc.type+"' not supported.")}var cached;if(typeof this.cache[type]!=="undefined"){cached=transform.parse(this.cache[type])}var recvonlySsrcs={audio:{},video:{}};var mid2ul={};var bIdx=0;var uIdx=0;var sources2ul={};var candidates;var iceUfrag;var icePwd;var fingerprint;var payloads={};var rtcpFb={};var rtp={};session.media.forEach(function(bLine){if((typeof bLine.rtcpMux!=="string"||bLine.rtcpMux!=="rtcp-mux")&&bLine.direction!=="inactive"){throw new Error("Cannot convert to Unified Plan because m-lines "+"without the rtcp-mux attribute were found.")}if(bLine.type==="application"){mid2ul[bLine.mid]=bLine;return}var sources=bLine.sources;var ssrcGroups=bLine.ssrcGroups;var port=bLine.port;if(typeof bLine.candidates!="undefined"){if(typeof candidates!="undefined"){candidates=candidates.concat(bLine.candidates)}else{candidates=bLine.candidates}}if(typeof iceUfrag!="undefined"&&typeof bLine.iceUfrag!="undefined"&&iceUfrag!=bLine.iceUfrag){throw new Error("Only BUNDLE supported, iceUfrag must be the same for all m-lines.\n"+"\tLast iceUfrag: "+iceUfrag+"\n"+"\tNew iceUfrag: "+bLine.iceUfrag)}if(typeof bLine.iceUfrag!="undefined"){iceUfrag=bLine.iceUfrag}if(typeof icePwd!="undefined"&&typeof bLine.icePwd!="undefined"&&icePwd!=bLine.icePwd){throw new Error("Only BUNDLE supported, icePwd must be the same for all m-lines.\n"+"\tLast icePwd: "+icePwd+"\n"+"\tNew icePwd: "+bLine.icePwd)}if(typeof bLine.icePwd!="undefined"){icePwd=bLine.icePwd}if(typeof fingerprint!="undefined"&&typeof bLine.fingerprint!="undefined"&&(fingerprint.type!=bLine.fingerprint.type||fingerprint.hash!=bLine.fingerprint.hash)){throw new Error("Only BUNDLE supported, fingerprint must be the same for all m-lines.\n"+"\tLast fingerprint: "+JSON.stringify(fingerprint)+"\n"+"\tNew fingerprint: "+JSON.stringify(bLine.fingerprint))}if(typeof bLine.fingerprint!="undefined"){fingerprint=bLine.fingerprint}payloads[bLine.type]=bLine.payloads;rtcpFb[bLine.type]=bLine.rtcpFb;rtp[bLine.type]=bLine.rtp;var ssrc2group={};if(typeof ssrcGroups!=="undefined"&&Array.isArray(ssrcGroups)){ssrcGroups.forEach(function(ssrcGroup){if(typeof ssrcGroup.ssrcs!=="undefined"&&Array.isArray(ssrcGroup.ssrcs)){ssrcGroup.ssrcs.forEach(function(ssrc){if(typeof ssrc2group[ssrc]==="undefined"){ssrc2group[ssrc]=[]}ssrc2group[ssrc].push(ssrcGroup)})}})}var ssrc2ml={};if(typeof sources==="object"){delete bLine.sources;delete bLine.ssrcGroups;delete bLine.candidates;delete bLine.iceUfrag;delete bLine.icePwd;delete bLine.fingerprint;delete bLine.port;delete bLine.mid;Object.keys(sources).forEach(function(ssrc){var uLine;if(desc.type==="offer"){if(!sources[ssrc].msid){recvonlySsrcs[bLine.type][ssrc]=sources[ssrc];return}}if(typeof ssrc2group[ssrc]!=="undefined"&&Array.isArray(ssrc2group[ssrc])){ssrc2group[ssrc].some(function(ssrcGroup){return ssrcGroup.ssrcs.some(function(related){if(typeof ssrc2ml[related]==="object"){uLine=ssrc2ml[related];return true}})})}if(typeof uLine==="object"){uLine.sources[ssrc]=sources[ssrc];delete sources[ssrc].msid}else{uLine=Object.create(bLine);ssrc2ml[ssrc]=uLine;if(typeof sources[ssrc].msid!=="undefined"){uLine.msid=sources[ssrc].msid;delete sources[ssrc].msid}uLine.sources={};uLine.sources[ssrc]=sources[ssrc];uLine.ssrcGroups=ssrc2group[ssrc];if(typeof cached!=="undefined"&&typeof cached.media!=="undefined"&&Array.isArray(cached.media)){cached.media.forEach(function(m){if(typeof m.sources==="object"){Object.keys(m.sources).forEach(function(s){if(s===ssrc){uLine.mid=m.mid}})}})}if(typeof uLine.mid==="undefined"){uLine.mid=[bLine.type,"-",ssrc].join("")}uLine.candidates=candidates;uLine.iceUfrag=iceUfrag;uLine.icePwd=icePwd;uLine.fingerprint=fingerprint;uLine.port=port;mid2ul[uLine.mid]=uLine;sources2ul[uIdx]=uLine.sources;self.cache.mlU2BMap[uIdx]=bIdx;if(typeof self.cache.mlB2UMap[bIdx]==="undefined"){self.cache.mlB2UMap[bIdx]=uIdx}uIdx++}})}else{var uLine=bLine;uLine.candidates=candidates;uLine.iceUfrag=iceUfrag;uLine.icePwd=icePwd;uLine.fingerprint=fingerprint;uLine.port=port;mid2ul[uLine.mid]=uLine;self.cache.mlU2BMap[uIdx]=bIdx;if(typeof self.cache.mlB2UMap[bIdx]==="undefined"){self.cache.mlB2UMap[bIdx]=uIdx}}bIdx++});session.media=[];mids=[];if(desc.type==="answer"){for(var i=0;i0){idx=self.getFirstSendingIndexFromAnswer(type);if(idx===null){for(var i=0;iidx){var mLine=session.media[idx];Object.keys(recvonlySsrcs[type]).forEach(function(ssrc){if(mLine.sources&&mLine.sources[ssrc]){console.warn("Replacing an existing SSRC.")}if(!mLine.sources){mLine.sources={}}mLine.sources[ssrc]=recvonlySsrcs[type][ssrc]})}});if(typeof session.groups!=="undefined"){session.groups.some(function(group){if(group.type==="BUNDLE"){group.mids=mids.join(" ");return true}})}session.msidSemantic={semantic:"WMS",token:"*"};var resStr=transform.write(session);this.cache[desc.type]=resStr;return new RTCSessionDescription({type:desc.type,sdp:resStr})}},{"./array-equals":14,"./transform":17}],17:[function(require,module,exports){var transform=require("sdp-transform");exports.write=function(session,opts){if(typeof session!=="undefined"&&typeof session.media!=="undefined"&&Array.isArray(session.media)){session.media.forEach(function(mLine){if(typeof mLine.sources!=="undefined"&&Object.keys(mLine.sources).length!==0){mLine.ssrcs=[];Object.keys(mLine.sources).forEach(function(ssrc){var source=mLine.sources[ssrc];Object.keys(source).forEach(function(attribute){mLine.ssrcs.push({id:ssrc,attribute:attribute,value:source[attribute]})})});delete mLine.sources}if(typeof mLine.ssrcGroups!=="undefined"&&Array.isArray(mLine.ssrcGroups)){mLine.ssrcGroups.forEach(function(ssrcGroup){if(typeof ssrcGroup.ssrcs!=="undefined"&&Array.isArray(ssrcGroup.ssrcs)){ssrcGroup.ssrcs=ssrcGroup.ssrcs.join(" ")}})}})}if(typeof session!=="undefined"&&typeof session.groups!=="undefined"&&Array.isArray(session.groups)){session.groups.forEach(function(g){if(typeof g.mids!=="undefined"&&Array.isArray(g.mids)){g.mids=g.mids.join(" ")}})}return transform.write(session,opts)};exports.parse=function(sdp){var session=transform.parse(sdp);if(typeof session!=="undefined"&&typeof session.media!=="undefined"&&Array.isArray(session.media)){session.media.forEach(function(mLine){if(typeof mLine.ssrcs!=="undefined"&&Array.isArray(mLine.ssrcs)){mLine.sources={};mLine.ssrcs.forEach(function(ssrc){if(!mLine.sources[ssrc.id])mLine.sources[ssrc.id]={};mLine.sources[ssrc.id][ssrc.attribute]=ssrc.value});delete mLine.ssrcs}if(typeof mLine.ssrcGroups!=="undefined"&&Array.isArray(mLine.ssrcGroups)){mLine.ssrcGroups.forEach(function(ssrcGroup){if(typeof ssrcGroup.ssrcs==="string"){ssrcGroup.ssrcs=ssrcGroup.ssrcs.split(" ")}})}})}if(typeof session!=="undefined"&&typeof session.groups!=="undefined"&&Array.isArray(session.groups)){session.groups.forEach(function(g){if(typeof g.mids==="string"){g.mids=g.mids.split(" ")}})}return session}},{"sdp-transform":11}],18:[function(require,module,exports){(function(window,undefined){"use strict";var LIBVERSION="0.7.17",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded";var util={extend:function(regexes,extensions){var margedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){margedRegexes[i]=extensions[i].concat(regexes[i])}else{margedRegexes[i]=regexes[i]}}return margedRegexes},has:function(str1,str2){if(typeof str1==="string"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}else{return false}},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,"").split(".")[0]:undefined},trim:function(str){return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j>>((i&3)<<3)&255}return rnds}}},{}],22:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=rng();if(node==null){node=_nodeId=[seedBytes[0]|1,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]]}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&16383}}var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf?buf:bytesToUuid(b)}module.exports=v1},{"./lib/bytesToUuid":20,"./lib/rng":21}],23:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options==="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":20,"./lib/rng":21}],24:[function(require,module,exports){module.exports=WildEmitter;function WildEmitter(){}WildEmitter.mixin=function(constructor){var prototype=constructor.prototype||constructor;prototype.isWildEmitter=true;prototype.on=function(event,groupName,fn){this.callbacks=this.callbacks||{};var hasGroup=arguments.length===3,group=hasGroup?arguments[1]:undefined,func=hasGroup?arguments[2]:arguments[1];func._groupName=group;(this.callbacks[event]=this.callbacks[event]||[]).push(func);return this};prototype.once=function(event,groupName,fn){var self=this,hasGroup=arguments.length===3,group=hasGroup?arguments[1]:undefined,func=hasGroup?arguments[2]:arguments[1];function on(){self.off(event,on);func.apply(this,arguments)}this.on(event,group,on);return this};prototype.releaseGroup=function(groupName){this.callbacks=this.callbacks||{};var item,i,len,handlers;for(item in this.callbacks){handlers=this.callbacks[item];for(i=0,len=handlers.length;i0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.on("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}if(type==="remoteVideoPlaying"){var video=this.stream.getVideoElement();if(this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"remoteVideoPlaying")])}else{this.stream.on("remote-video-is-playing",function(element){_this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"remoteVideoPlaying")])})}}if(type==="accessAllowed"){if(this.stream.accessIsAllowed){this.ee.emitEvent("accessAllowed")}}if(type==="accessDenied"){if(this.stream.accessIsDenied){this.ee.emitEvent("accessDenied")}}return this};Publisher.prototype.once=function(type,handler){var _this=this;this.ee.once(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Publisher'",event)}else{console.info("Event '"+type+"' triggered by 'Publisher'")}handler(event)});if(type==="streamCreated"){if(!!this.stream&&this.stream.isPublisherPublished){this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,this,"streamCreated",this.stream,"")])}else{this.stream.once("stream-created-by-publisher",function(){_this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,_this,"streamCreated",_this.stream,"")])})}}if(type==="videoElementCreated"){if(!!this.stream&&this.stream.isVideoELementCreated){this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoElementCreated")])}else{this.stream.once("video-element-created-by-stream",function(element){_this.id=element.id;_this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoElementCreated")])})}}if(type==="videoPlaying"){var video=this.stream.getVideoElement();if(!this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.once("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}if(type==="remoteVideoPlaying"){var video=this.stream.getVideoElement();if(this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"remoteVideoPlaying")])}else{this.stream.once("remote-video-is-playing",function(element){_this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"remoteVideoPlaying")])})}}if(type==="accessAllowed"){if(this.stream.accessIsAllowed){this.ee.emitEvent("accessAllowed")}}if(type==="accessDenied"){if(this.stream.accessIsDenied){this.ee.emitEvent("accessDenied")}}return this};Publisher.prototype.off=function(type,handler){if(!handler){this.ee.removeAllListeners(type)}else{this.ee.off(type,handler)}return this};Publisher.prototype.userMediaHasVideo=function(callback){var _this=this;return new Promise(function(resolve,reject){if(typeof _this.properties.videoSource==="string"&&_this.properties.videoSource==="screen"){resolve(true)}else{_this.openvidu.getDevices().then(function(devices){resolve(!!devices.filter(function(device){return device.kind==="videoinput"})[0])}).catch(function(error){reject(error)})}})};Publisher.prototype.userMediaHasAudio=function(callback){var _this=this;return new Promise(function(resolve,reject){_this.openvidu.getDevices().then(function(devices){resolve(!!devices.filter(function(device){return device.kind==="audioinput"})[0])}).catch(function(error){reject(error)})})};Publisher.prototype.initialize=function(){var _this=this;return new Promise(function(resolve,reject){var errorCallback=function(openViduError){_this.stream.accessIsDenied=true;_this.stream.accessIsAllowed=false;reject(openViduError)};var successCallback=function(mediaStream){_this.stream.accessIsAllowed=true;_this.stream.accessIsDenied=false;if(_this.openvidu.isMediaStreamTrack(_this.properties.audioSource)){mediaStream.removeTrack(mediaStream.getAudioTracks()[0]);mediaStream.addTrack(_this.properties.audioSource)}if(_this.openvidu.isMediaStreamTrack(_this.properties.videoSource)){mediaStream.removeTrack(mediaStream.getVideoTracks()[0]);mediaStream.addTrack(_this.properties.videoSource)}if(!!mediaStream.getAudioTracks()[0]){mediaStream.getAudioTracks()[0].enabled=!!_this.stream.outboundStreamOpts.publisherProperties.publishAudio}if(!!mediaStream.getVideoTracks()[0]){mediaStream.getVideoTracks()[0].enabled=!!_this.stream.outboundStreamOpts.publisherProperties.publishVideo}_this.stream.setMediaStream(mediaStream);_this.stream.insertVideo(_this.element,_this.properties.insertMode);resolve()};_this.openvidu.generateMediaConstraints(_this.properties).then(function(constraints){var outboundStreamOptions={mediaConstraints:constraints,publisherProperties:_this.properties};_this.stream.setOutboundStreamOptions(outboundStreamOptions);var constraintsAux={};var timeForDialogEvent=1e3;if(_this.stream.isSendVideo()){constraintsAux.audio=false;constraintsAux.video=constraints.video;var startTime_1=Date.now();_this.setPermissionDialogTimer(timeForDialogEvent);navigator.mediaDevices.getUserMedia(constraintsAux).then(function(videoOnlyStream){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);if(_this.stream.isSendAudio()){constraintsAux.audio=constraints.audio===undefined?true:constraints.audio;constraintsAux.video=false;startTime_1=Date.now();_this.setPermissionDialogTimer(timeForDialogEvent);navigator.mediaDevices.getUserMedia(constraintsAux).then(function(audioOnlyStream){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);videoOnlyStream.addTrack(audioOnlyStream.getAudioTracks()[0]);successCallback(videoOnlyStream)}).catch(function(error){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);videoOnlyStream.getVideoTracks().forEach(function(track){track.stop()});var errorName;var errorMessage;switch(error.name.toLowerCase()){case"notfounderror":errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage=error.toString();break;case"notallowederror":errorName=OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;errorMessage=error.toString();break;case"overconstrainederror":if(error.constraint.toLowerCase()==="deviceid"){errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage="Audio input device with deviceId '"+constraints.audio.deviceId.exact+"' not found"}else{errorName=OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;errorMessage="Audio input device doesn't support the value passed for constraint '"+error.constraint+"'"}}errorCallback(new OpenViduError_1.OpenViduError(errorName,errorMessage))})}else{successCallback(videoOnlyStream)}}).catch(function(error){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);var errorName;var errorMessage;switch(error.name.toLowerCase()){case"notfounderror":errorName=OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;errorMessage=error.toString();break;case"notallowederror":errorName=_this.stream.isSendScreen()?OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED:OpenViduError_1.OpenViduErrorName.CAMERA_ACCESS_DENIED;errorMessage=error.toString();break;case"overconstrainederror":if(error.constraint.toLowerCase()==="deviceid"){errorName=OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;errorMessage="Video input device with deviceId '"+constraints.video.deviceId.exact+"' not found"}else{errorName=OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;errorMessage="Video input device doesn't support the value passed for constraint '"+error.constraint+"'"}}errorCallback(new OpenViduError_1.OpenViduError(errorName,errorMessage))})}else if(_this.stream.isSendAudio()){constraintsAux.audio=constraints.audio===undefined?true:constraints.audio;constraintsAux.video=false;var startTime_2=Date.now();_this.setPermissionDialogTimer(timeForDialogEvent);navigator.mediaDevices.getUserMedia(constraints).then(function(audioOnlyStream){_this.clearPermissionDialogTimer(startTime_2,timeForDialogEvent);successCallback(audioOnlyStream)}).catch(function(error){_this.clearPermissionDialogTimer(startTime_2,timeForDialogEvent);var errorName;var errorMessage;switch(error.name.toLowerCase()){case"notfounderror":errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage=error.toString();break;case"notallowederror":errorName=OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;errorMessage=error.toString();break;case"overconstrainederror":if(error.constraint.toLowerCase()==="deviceid"){errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage="Audio input device with deviceId '"+constraints.audio.deviceId.exact+"' not found"}else{errorName=OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;errorMessage="Audio input device doesn't support the value passed for constraint '"+error.constraint+"'"}}errorCallback(new OpenViduError_1.OpenViduError(errorName,errorMessage))})}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET,"Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'"))}}).catch(function(error){errorCallback(error)})})};Publisher.prototype.updateSession=function(session){this.session=session;this.stream.session=session};Publisher.prototype.emitEvent=function(type,eventArray){this.ee.emitEvent(type,eventArray)};Publisher.prototype.setPermissionDialogTimer=function(waitTime){var _this=this;this.permissionDialogTimeout=setTimeout(function(){_this.ee.emitEvent("accessDialogOpened",[])},waitTime)};Publisher.prototype.clearPermissionDialogTimer=function(startTime,waitTime){clearTimeout(this.permissionDialogTimeout);if(Date.now()-startTime>waitTime){this.ee.emitEvent("accessDialogClosed",[])}};return Publisher}();exports.Publisher=Publisher},{"..":60,"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Events/StreamEvent":43,"../OpenViduInternal/Events/VideoElementEvent":44,"wolfy87-eventemitter":25}],31:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var __1=require("..");var StreamEvent_1=require("../OpenViduInternal/Events/StreamEvent");var ConnectionEvent_1=require("../OpenViduInternal/Events/ConnectionEvent");var SessionDisconnectedEvent_1=require("../OpenViduInternal/Events/SessionDisconnectedEvent");var SignalEvent_1=require("../OpenViduInternal/Events/SignalEvent");var RecordingEvent_1=require("../OpenViduInternal/Events/RecordingEvent");var OpenViduError_1=require("../OpenViduInternal/Enums/OpenViduError");var VideoInsertMode_1=require("../OpenViduInternal/Enums/VideoInsertMode");var VersionAdapter_1=require("../OpenViduInternal/VersionAdapter");var platform=require("platform");var EventEmitter=require("wolfy87-eventemitter");var Session=function(){function Session(sessionId,openvidu){this.ee=new EventEmitter;this.remoteStreamsCreated={};this.remoteConnections={};this.speakingEventsEnabled=false;this.openvidu=openvidu;this.sessionId=this.openvidu.getUrlWithoutSecret(sessionId);this.openvidu.processOpenViduUrl(sessionId)}Session.prototype.connect=function(token,metadata,param3){var _this=this;return VersionAdapter_1.solveIfCallback("Session.connect",!!param3&&typeof param3==="function"?param3:typeof metadata==="function"?metadata:"",new Promise(function(resolve,reject){if(_this.openvidu.checkSystemRequirements()){_this.options={sessionId:_this.sessionId,participantId:token,metadata:!!metadata?_this.stringClientMetadata(metadata):""};_this.connectAux(token).then(function(){resolve()}).catch(function(error){reject(error)})}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED,"Browser "+platform.name+" "+platform.version+" is not supported in OpenVidu"))}}))};Session.prototype.disconnect=function(){this.leave(false,"disconnect")};Session.prototype.subscribe=function(stream,targetElement,param3,param4){var properties={};if(!!param3&&typeof param3!=="function"){properties={insertMode:typeof param3.insertMode!=="undefined"?param3.insertMode:VideoInsertMode_1.VideoInsertMode.APPEND,subscribeToAudio:typeof param3.subscribeToAudio!=="undefined"?param3.subscribeToAudio:true,subscribeToVideo:typeof param3.subscribeToVideo!=="undefined"?param3.subscribeToVideo:true}}else{properties={insertMode:VideoInsertMode_1.VideoInsertMode.APPEND,subscribeToAudio:true,subscribeToVideo:true}}var completionHandler;if(!!param3&&typeof param3==="function"){completionHandler=param3}else if(!!param4){completionHandler=param4}console.info("Subscribing to "+stream.connection.connectionId);stream.subscribe().then(function(){console.info("Subscribed correctly to "+stream.connection.connectionId);if(completionHandler!==undefined){completionHandler(undefined)}}).catch(function(error){if(completionHandler!==undefined){completionHandler(error)}});var subscriber=new __1.Subscriber(stream,targetElement,properties);stream.insertVideo(subscriber.element,properties.insertMode);return subscriber};Session.prototype.subscribeAsync=function(stream,targetElement,properties){var _this=this;return new Promise(function(resolve,reject){var subscriber;var callback=function(error){if(!!error){reject(error)}else{resolve(subscriber)}};if(!!properties){subscriber=_this.subscribe(stream,targetElement,properties,callback)}else{subscriber=_this.subscribe(stream,targetElement,callback)}})};Session.prototype.unsubscribe=function(subscriber){var connectionId=subscriber.stream.connection.connectionId;console.info("Unsubscribing from "+connectionId);this.openvidu.sendRequest("unsubscribeFromVideo",{sender:subscriber.stream.connection.connectionId},function(error,response){if(error){console.error("Error unsubscribing from "+connectionId,error)}else{console.info("Unsubscribed correctly from "+connectionId)}subscriber.stream.disposeWebRtcPeer();subscriber.stream.disposeMediaStream()});subscriber.stream.removeVideo()};Session.prototype.publish=function(publisher){var _this=this;return new Promise(function(resolve,reject){publisher.session=_this;publisher.stream.session=_this;if(!publisher.stream.isPublisherPublished){_this.connection.addStream(publisher.stream);publisher.stream.publish().then(function(){resolve()}).catch(function(error){reject(error)})}else{publisher.initialize().then(function(){_this.connection.addStream(publisher.stream);publisher.stream.publish().then(function(){resolve()}).catch(function(error){reject(error)})}).catch(function(error){reject(error)})}})};Session.prototype.unpublish=function(publisher){var stream=publisher.stream;if(!stream.connection){console.error("The associated Connection object of this Publisher is null",stream);return}else if(stream.connection!==this.connection){console.error("The associated Connection object of this Publisher is not your local Connection."+"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method",stream);return}else{console.info("Unpublishing local media ("+stream.connection.connectionId+")");this.openvidu.sendRequest("unpublishVideo",function(error,response){if(error){console.error(error)}else{console.info("Media unpublished correctly")}});stream.disposeWebRtcPeer();delete stream.connection.stream;var streamEvent=new StreamEvent_1.StreamEvent(true,publisher,"streamDestroyed",publisher.stream,"unpublish");publisher.emitEvent("streamDestroyed",[streamEvent]);streamEvent.callDefaultBehaviour()}};Session.prototype.signal=function(signal){var _this=this;return new Promise(function(resolve,reject){var signalMessage={};if(signal.to&&signal.to.length>0){var connectionIds_1=[];signal.to.forEach(function(connection){connectionIds_1.push(connection.connectionId)});signalMessage["to"]=connectionIds_1}else{signalMessage["to"]=[]}signalMessage["data"]=signal.data?signal.data:"";signalMessage["type"]=signal.type?signal.type:"";_this.openvidu.sendRequest("sendMessage",{message:JSON.stringify(signalMessage)},function(error,response){if(!!error){reject(error)}else{resolve()}})})};Session.prototype.on=function(type,handler){this.ee.on(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Session'",event)}else{console.info("Event '"+type+"' triggered by 'Session'")}handler(event)});if(type==="publisherStartSpeaking"||type==="publisherStopSpeaking"){this.speakingEventsEnabled=true;for(var connectionId in this.remoteConnections){var str=this.remoteConnections[connectionId].stream;if(!!str&&!str.speechEvent&&str.hasAudio){str.enableSpeakingEvents()}}}return this};Session.prototype.once=function(type,handler){this.ee.once(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Session'",event)}else{console.info("Event '"+type+"' triggered by 'Session'")}handler(event)});if(type==="publisherStartSpeaking"||type==="publisherStopSpeaking"){this.speakingEventsEnabled=true;for(var connectionId in this.remoteConnections){var str=this.remoteConnections[connectionId].stream;if(!!str&&!str.speechEvent&&str.hasAudio){str.enableOnceSpeakingEvents()}}}return this};Session.prototype.off=function(type,handler){if(!handler){this.ee.removeAllListeners(type)}else{this.ee.off(type,handler)}if(type==="publisherStartSpeaking"||type==="publisherStopSpeaking"){this.speakingEventsEnabled=false;for(var connectionId in this.remoteConnections){var str=this.remoteConnections[connectionId].stream;if(!!str&&!!str.speechEvent){str.disableSpeakingEvents()}}}return this};Session.prototype.connectAux=function(token){var _this=this;return new Promise(function(resolve,reject){_this.openvidu.startWs(function(error){if(!!error){reject(error)}else{var joinParams={token:!!token?token:"",session:_this.sessionId,metadata:!!_this.options.metadata?_this.options.metadata:"",secret:_this.openvidu.getSecret(),recorder:_this.openvidu.getRecorder()};_this.openvidu.sendRequest("joinRoom",joinParams,function(error,response){_this.connection=new __1.Connection(_this);_this.connection.connectionId=response.id;_this.connection.data=response.metadata;var events={connections:new Array,streams:new Array};var existingParticipants=response.value;existingParticipants.forEach(function(participant){var connection=new __1.Connection(_this,participant);_this.remoteConnections[connection.connectionId]=connection;events.connections.push(connection);if(!!connection.stream){_this.remoteStreamsCreated[connection.stream.streamId]=true;events.streams.push(connection.stream)}});_this.ee.emitEvent("connectionCreated",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionCreated",_this.connection,"")]);events.connections.forEach(function(connection){_this.ee.emitEvent("connectionCreated",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionCreated",connection,"")])});events.streams.forEach(function(stream){_this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,_this,"streamCreated",stream,"")])});resolve()})}})})};Session.prototype.stringClientMetadata=function(metadata){if(typeof metadata!=="string"){return JSON.stringify(metadata)}else{return metadata}};Session.prototype.getConnection=function(connectionId,errorMessage){var _this=this;return new Promise(function(resolve,reject){var connection=_this.remoteConnections[connectionId];if(!!connection){resolve(connection)}else{if(_this.connection.connectionId===connectionId){resolve(_this.connection)}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR,errorMessage))}}})};Session.prototype.getRemoteConnection=function(connectionId,errorMessage){var _this=this;return new Promise(function(resolve,reject){var connection=_this.remoteConnections[connectionId];if(!!connection){resolve(connection)}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR,errorMessage))}})};Session.prototype.onParticipantJoined=function(response){var _this=this;this.getConnection(response.id,"").then(function(connection){console.warn("Connection "+response.id+" already exists in connections list")}).catch(function(openViduError){var connection=new __1.Connection(_this,response);_this.remoteConnections[response.id]=connection;_this.ee.emitEvent("connectionCreated",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionCreated",connection,"")])})};Session.prototype.onParticipantLeft=function(msg){var _this=this;this.getRemoteConnection(msg.name,"Remote connection "+msg.name+" unknown when 'onParticipantLeft'. "+"Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(connection){if(!!connection.stream){var stream=connection.stream;var streamEvent=new StreamEvent_1.StreamEvent(true,_this,"streamDestroyed",stream,msg.reason);_this.ee.emitEvent("streamDestroyed",[streamEvent]);streamEvent.callDefaultBehaviour();delete _this.remoteStreamsCreated[stream.streamId]}delete _this.remoteConnections[connection.connectionId];_this.ee.emitEvent("connectionDestroyed",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionDestroyed",connection,msg.reason)])}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.onParticipantPublished=function(response){var _this=this;var afterConnectionFound=function(connection){_this.remoteConnections[connection.connectionId]=connection;if(!_this.remoteStreamsCreated[connection.stream.streamId]){_this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,_this,"streamCreated",connection.stream,"")])}_this.remoteStreamsCreated[connection.stream.streamId]=true};var connection;this.getRemoteConnection(response.id,"Remote connection '"+response.id+"' unknown when 'onParticipantPublished'. "+"Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(con){connection=con;response.metadata=con.data;connection.options=response;connection.initRemoteStreams(response.streams);afterConnectionFound(connection)}).catch(function(openViduError){connection=new __1.Connection(_this,response);afterConnectionFound(connection)})};Session.prototype.onParticipantUnpublished=function(msg){var _this=this;this.getRemoteConnection(msg.name,"Remote connection '"+msg.name+"' unknown when 'onParticipantUnpublished'. "+"Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(connection){var streamEvent=new StreamEvent_1.StreamEvent(true,_this,"streamDestroyed",connection.stream,msg.reason);_this.ee.emitEvent("streamDestroyed",[streamEvent]);streamEvent.callDefaultBehaviour();var streamId=connection.stream.streamId;delete _this.remoteStreamsCreated[streamId];connection.removeStream(streamId)}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.onParticipantEvicted=function(msg){};Session.prototype.onNewMessage=function(msg){var _this=this;console.info("New signal: "+JSON.stringify(msg));this.getConnection(msg.from,"Connection '"+msg.from+"' unknow when 'onNewMessage'. Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))+". Existing local connection: "+this.connection.connectionId).then(function(connection){_this.ee.emitEvent("signal",[new SignalEvent_1.SignalEvent(_this,msg.type,msg.data,connection)]);_this.ee.emitEvent("signal:"+msg.type,[new SignalEvent_1.SignalEvent(_this,msg.type,msg.data,connection)])}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.recvIceCandidate=function(msg){var candidate={candidate:msg.candidate,sdpMid:msg.sdpMid,sdpMLineIndex:msg.sdpMLineIndex};this.getConnection(msg.endpointName,"Connection not found for endpoint "+msg.endpointName+". Ice candidate will be ignored: "+candidate).then(function(connection){var stream=connection.stream;stream.getWebRtcPeer().addIceCandidate(candidate,function(error){if(error){console.error("Error adding candidate for "+stream.streamId+" stream of endpoint "+msg.endpointName+": "+error)}})}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.onSessionClosed=function(msg){console.info("Session closed: "+JSON.stringify(msg));var s=msg.room;if(s!==undefined){this.ee.emitEvent("session-closed",[{session:s}])}else{console.warn("Session undefined on session closed",msg)}};Session.prototype.onLostConnection=function(){if(!this.connection){console.warn("Not connected to session: if you are not debugging, this is probably a certificate error");var url="https://"+this.openvidu.getWsUri().split("wss://")[1].split("/room")[0];if(window.confirm('If you are not debugging, this is probably a certificate error at "'+url+'"\n\nClick OK to navigate and accept it')){location.assign(url+"/accept-certificate")}return}console.warn("Lost connection in Session "+this.sessionId);if(!!this.sessionId&&!this.connection.disposed){this.leave(true,"networkDisconnect")}};Session.prototype.onMediaError=function(params){console.error("Media error: "+JSON.stringify(params));var err=params.error;if(err){this.ee.emitEvent("error-media",[{error:err}])}else{console.warn("Received undefined media error. Params:",params)}};Session.prototype.onRecordingStarted=function(response){this.ee.emitEvent("recordingStarted",[new RecordingEvent_1.RecordingEvent(this,"recordingStarted",response.id,response.name)])};Session.prototype.onRecordingStopped=function(response){this.ee.emitEvent("recordingStopped",[new RecordingEvent_1.RecordingEvent(this,"recordingStopped",response.id,response.name)])};Session.prototype.emitEvent=function(type,eventArray){this.ee.emitEvent(type,eventArray)};Session.prototype.leave=function(forced,reason){var _this=this;forced=!!forced;console.info("Leaving Session (forced="+forced+")");if(!!this.connection&&!this.connection.disposed&&!forced){this.openvidu.sendRequest("leaveRoom",function(error,response){if(error){console.error(error)}_this.openvidu.closeWs()})}else{this.openvidu.closeWs()}if(!!this.connection.stream){this.connection.stream.disposeWebRtcPeer();this.connection.stream.emitEvent("stream-destroyed-by-disconnect",[reason])}if(!this.connection.disposed){var sessionDisconnectEvent=new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this,reason);this.ee.emitEvent("sessionDisconnected",[sessionDisconnectEvent]);sessionDisconnectEvent.callDefaultBehaviour()}};return Session}();exports.Session=Session},{"..":60,"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/ConnectionEvent":37,"../OpenViduInternal/Events/RecordingEvent":40,"../OpenViduInternal/Events/SessionDisconnectedEvent":41,"../OpenViduInternal/Events/SignalEvent":42,"../OpenViduInternal/Events/StreamEvent":43,"../OpenViduInternal/VersionAdapter":58,platform:9,"wolfy87-eventemitter":25}],32:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var WebRtcStats_1=require("../OpenViduInternal/WebRtcStats/WebRtcStats");var PublisherSpeakingEvent_1=require("../OpenViduInternal/Events/PublisherSpeakingEvent");var EventEmitter=require("wolfy87-eventemitter");var kurentoUtils=require("../OpenViduInternal/KurentoUtils/kurento-utils-js");var VideoInsertMode_1=require("../OpenViduInternal/Enums/VideoInsertMode");var Stream=function(){function Stream(session,options){var _this=this;this.ee=new EventEmitter;this.isSubscribeToRemote=false;this.isReadyToPublish=false;this.isPublisherPublished=false;this.isVideoELementCreated=false;this.accessIsAllowed=false;this.accessIsDenied=false;this.session=session;if(options.hasOwnProperty("id")){this.inboundStreamOpts=options;this.streamId=this.inboundStreamOpts.id;this.hasAudio=this.inboundStreamOpts.recvAudio;this.hasVideo=this.inboundStreamOpts.recvVideo;this.typeOfVideo=!this.inboundStreamOpts.typeOfVideo?undefined:this.inboundStreamOpts.typeOfVideo;this.frameRate=this.inboundStreamOpts.frameRate===-1?undefined:this.inboundStreamOpts.frameRate}else{this.outboundStreamOpts=options;if(this.isSendVideo()){if(this.isSendScreen()){this.streamId="SCREEN";this.typeOfVideo="SCREEN"}else{this.streamId="CAMERA";this.typeOfVideo="CAMERA"}this.frameRate=this.outboundStreamOpts.publisherProperties.frameRate}else{this.streamId="MICRO";delete this.typeOfVideo}this.hasAudio=this.isSendAudio();this.hasVideo=this.isSendVideo()}this.on("mediastream-updated",function(){if(_this.video)_this.video.srcObject=_this.mediaStream;console.debug("Video srcObject ["+_this.mediaStream+"] updated in stream ["+_this.streamId+"]")})}Stream.prototype.getMediaStream=function(){return this.mediaStream};Stream.prototype.setMediaStream=function(mediaStream){this.mediaStream=mediaStream;this.ee.emitEvent("mediastream-updated")};Stream.prototype.getWebRtcPeer=function(){return this.webRtcPeer};Stream.prototype.getRTCPeerConnection=function(){return this.webRtcPeer.peerConnection};Stream.prototype.getVideoElement=function(){return this.video};Stream.prototype.subscribeToMyRemote=function(){this.isSubscribeToRemote=true};Stream.prototype.setOutboundStreamOptions=function(outboundStreamOpts){this.outboundStreamOpts=outboundStreamOpts};Stream.prototype.subscribe=function(){var _this=this;return new Promise(function(resolve,reject){_this.initWebRtcPeerReceive().then(function(){resolve()}).catch(function(error){reject(error)})})};Stream.prototype.publish=function(){var _this=this;return new Promise(function(resolve,reject){if(_this.isReadyToPublish){_this.initWebRtcPeerSend().then(function(){resolve()}).catch(function(error){reject(error)})}else{_this.ee.once("stream-ready-to-publish",function(streamEvent){_this.publish().then(function(){resolve()}).catch(function(error){reject(error)})})}})};Stream.prototype.disposeWebRtcPeer=function(){if(this.webRtcPeer){this.webRtcPeer.dispose()}if(this.speechEvent){this.speechEvent.stop()}this.stopWebRtcStats();console.info((!!this.outboundStreamOpts?"Outbound ":"Inbound ")+"WebRTCPeer from 'Stream' with id ["+this.streamId+"] is now closed")};Stream.prototype.disposeMediaStream=function(){if(this.mediaStream){this.mediaStream.getAudioTracks().forEach(function(track){track.stop()});this.mediaStream.getVideoTracks().forEach(function(track){track.stop()})}console.info((!!this.outboundStreamOpts?"Local ":"Remote ")+"MediaStream from 'Stream' with id ["+this.streamId+"] is now disposed")};Stream.prototype.displayMyRemote=function(){return this.isSubscribeToRemote};Stream.prototype.on=function(eventName,listener){this.ee.on(eventName,listener)};Stream.prototype.once=function(eventName,listener){this.ee.once(eventName,listener)};Stream.prototype.insertVideo=function(targetElement,insertMode){var _this=this;if(!!targetElement){this.video=document.createElement("video");this.video.id=(this.isLocal()?"local-":"remote-")+"video-"+this.streamId;this.video.autoplay=true;this.video.controls=false;this.video.srcObject=this.mediaStream;if(this.isLocal()&&!this.displayMyRemote()){this.video.muted=true;if(this.outboundStreamOpts.publisherProperties.mirror){this.mirrorVideo(this.video)}this.video.oncanplay=function(){console.info("Local 'Stream' with id ["+_this.streamId+"] video is now playing");_this.ee.emitEvent("video-is-playing",[{element:_this.video}])}}else{this.video.title=this.streamId}this.targetElement=targetElement;this.parentId=targetElement.id;insertMode=!!insertMode?insertMode:VideoInsertMode_1.VideoInsertMode.APPEND;this.insertElementWithMode(this.video,insertMode);this.ee.emitEvent("video-element-created-by-stream",[{element:this.video}]);this.isVideoELementCreated=true}this.isReadyToPublish=true;this.ee.emitEvent("stream-ready-to-publish");return this.video};Stream.prototype.removeVideo=function(){if(this.video){if(document.getElementById(this.parentId)){document.getElementById(this.parentId).removeChild(this.video);this.ee.emitEvent("video-removed",[this.video])}delete this.video}};Stream.prototype.isSendAudio=function(){return!!this.outboundStreamOpts&&this.outboundStreamOpts.publisherProperties.audioSource!==null&&this.outboundStreamOpts.publisherProperties.audioSource!==false};Stream.prototype.isSendVideo=function(){return!!this.outboundStreamOpts&&this.outboundStreamOpts.publisherProperties.videoSource!==null&&this.outboundStreamOpts.publisherProperties.videoSource!==false};Stream.prototype.isSendScreen=function(){return!!this.outboundStreamOpts&&this.outboundStreamOpts.publisherProperties.videoSource==="screen"};Stream.prototype.emitEvent=function(type,eventArray){this.ee.emitEvent(type,eventArray)};Stream.prototype.setSpeechEventIfNotExists=function(){if(!this.speechEvent){var harkOptions=this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions||{};harkOptions.interval=typeof harkOptions.interval==="number"?harkOptions.interval:50;harkOptions.threshold=typeof harkOptions.threshold==="number"?harkOptions.threshold:-50;this.speechEvent=kurentoUtils.WebRtcPeer.hark(this.mediaStream,harkOptions)}};Stream.prototype.enableSpeakingEvents=function(){var _this=this;this.setSpeechEventIfNotExists();this.speechEvent.on("speaking",function(){_this.session.emitEvent("publisherStartSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStartSpeaking",_this.connection,_this.streamId)])});this.speechEvent.on("stopped_speaking",function(){_this.session.emitEvent("publisherStopSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStopSpeaking",_this.connection,_this.streamId)])})};Stream.prototype.enableOnceSpeakingEvents=function(){var _this=this;this.setSpeechEventIfNotExists();this.speechEvent.on("speaking",function(){_this.session.emitEvent("publisherStartSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStartSpeaking",_this.connection,_this.streamId)]);_this.disableSpeakingEvents()});this.speechEvent.on("stopped_speaking",function(){_this.session.emitEvent("publisherStopSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStopSpeaking",_this.connection,_this.streamId)]);_this.disableSpeakingEvents()})};Stream.prototype.disableSpeakingEvents=function(){this.speechEvent.stop();this.speechEvent=undefined};Stream.prototype.initWebRtcPeerSend=function(){var _this=this;return new Promise(function(resolve,reject){var userMediaConstraints={audio:_this.isSendAudio(),video:_this.isSendVideo()};var options={videoStream:_this.mediaStream,mediaConstraints:userMediaConstraints,onicecandidate:_this.connection.sendIceCandidate.bind(_this.connection),iceServers:_this.session.openvidu.advancedConfiguration.iceServers};var successCallback=function(error,sdpOfferParam,wp){if(error){reject(new Error("(publish) SDP offer error: "+JSON.stringify(error)))}console.debug("Sending SDP offer to publish as "+_this.streamId,sdpOfferParam);_this.session.openvidu.sendRequest("publishVideo",{sdpOffer:sdpOfferParam,doLoopback:_this.displayMyRemote()||false,audioActive:_this.isSendAudio(),videoActive:_this.isSendVideo(),typeOfVideo:_this.isSendVideo()?_this.isSendScreen()?"SCREEN":"CAMERA":"",frameRate:!!_this.frameRate?_this.frameRate:-1},function(error,response){if(error){reject("Error on publishVideo: "+JSON.stringify(error))}else{_this.processSdpAnswer(response.sdpAnswer).then(function(){_this.ee.emitEvent("stream-created-by-publisher");resolve()}).catch(function(error){reject(error)});console.info("'Publisher' successfully published to session")}})};if(_this.displayMyRemote()){_this.webRtcPeer=kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,function(err){if(err){reject(err)}_this.webRtcPeer.generateOffer(successCallback)})}else{_this.webRtcPeer=kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options,function(error){if(error){reject(error)}_this.webRtcPeer.generateOffer(successCallback)})}_this.isPublisherPublished=true})};Stream.prototype.initWebRtcPeerReceive=function(){var _this=this;return new Promise(function(resolve,reject){var offerConstraints={audio:_this.inboundStreamOpts.recvAudio,video:_this.inboundStreamOpts.recvVideo};console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer",offerConstraints);var options={onicecandidate:_this.connection.sendIceCandidate.bind(_this.connection),mediaConstraints:offerConstraints};var successCallback=function(error,sdpOfferParam,wp){if(error){reject(new Error("(subscribe) SDP offer error: "+JSON.stringify(error)))}console.debug("Sending SDP offer to subscribe to "+_this.streamId,sdpOfferParam);_this.session.openvidu.sendRequest("receiveVideoFrom",{sender:_this.streamId,sdpOffer:sdpOfferParam},function(error,response){if(error){reject(new Error("Error on recvVideoFrom: "+JSON.stringify(error)))}else{_this.processSdpAnswer(response.sdpAnswer).then(function(){resolve()}).catch(function(error){reject(error)})}})};_this.webRtcPeer=kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options,function(error){if(error){reject(error)}_this.webRtcPeer.generateOffer(successCallback)})})};Stream.prototype.processSdpAnswer=function(sdpAnswer){var _this=this;return new Promise(function(resolve,reject){var answer=new RTCSessionDescription({type:"answer",sdp:sdpAnswer});console.debug(_this.streamId+": set peer connection with recvd SDP answer",sdpAnswer);var streamId=_this.streamId;var peerConnection=_this.webRtcPeer.peerConnection;peerConnection.setRemoteDescription(answer,function(){if(!_this.isLocal()||_this.displayMyRemote()){_this.mediaStream=peerConnection.getRemoteStreams()[0];console.debug("Peer remote stream",_this.mediaStream);if(!!_this.mediaStream){_this.ee.emitEvent("mediastream-updated");if(!!_this.mediaStream.getAudioTracks()[0]&&_this.session.speakingEventsEnabled){_this.enableSpeakingEvents()}}if(!!_this.video){_this.video.oncanplay=function(){if(_this.isLocal()&&_this.displayMyRemote()){console.info("Your own remote 'Stream' with id ["+_this.streamId+"] video is now playing");_this.ee.emitEvent("remote-video-is-playing",[{element:_this.video}])}else if(!_this.isLocal()&&!_this.displayMyRemote()){console.info("Remote 'Stream' with id ["+_this.streamId+"] video is now playing");_this.ee.emitEvent("video-is-playing",[{element:_this.video}])}}}_this.session.emitEvent("stream-subscribed",[{stream:_this}])}_this.initWebRtcStats();resolve()},function(error){reject(new Error(_this.streamId+": Error setting SDP to the peer connection: "+JSON.stringify(error)))})})};Stream.prototype.initWebRtcStats=function(){this.webRtcStats=new WebRtcStats_1.WebRtcStats(this);this.webRtcStats.initWebRtcStats()};Stream.prototype.stopWebRtcStats=function(){if(!!this.webRtcStats&&this.webRtcStats.isEnabled()){this.webRtcStats.stopWebRtcStats()}};Stream.prototype.isLocal=function(){return!this.inboundStreamOpts&&!!this.outboundStreamOpts};Stream.prototype.insertElementWithMode=function(element,insertMode){if(!!this.targetElement){switch(insertMode){case VideoInsertMode_1.VideoInsertMode.AFTER:this.targetElement.parentNode.insertBefore(element,this.targetElement.nextSibling);break;case VideoInsertMode_1.VideoInsertMode.APPEND:this.targetElement.appendChild(element);break;case VideoInsertMode_1.VideoInsertMode.BEFORE:this.targetElement.parentNode.insertBefore(element,this.targetElement);break;case VideoInsertMode_1.VideoInsertMode.PREPEND:this.targetElement.insertBefore(element,this.targetElement.childNodes[0]);break;case VideoInsertMode_1.VideoInsertMode.REPLACE:this.targetElement.parentNode.replaceChild(element,this.targetElement);break;default:this.insertElementWithMode(element,VideoInsertMode_1.VideoInsertMode.APPEND)}}};Stream.prototype.mirrorVideo=function(video){video.style.transform="rotateY(180deg)";video.style.webkitTransform="rotateY(180deg)"};return Stream}();exports.Stream=Stream},{"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/PublisherSpeakingEvent":39,"../OpenViduInternal/KurentoUtils/kurento-utils-js":55,"../OpenViduInternal/WebRtcStats/WebRtcStats":59,"wolfy87-eventemitter":25}],33:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var VideoElementEvent_1=require("../OpenViduInternal/Events/VideoElementEvent");var EventEmitter=require("wolfy87-eventemitter");var Subscriber=function(){function Subscriber(stream,targetElement,properties){var _this=this;this.ee=new EventEmitter;this.stream=stream;this.properties=properties;if(typeof targetElement==="string"){var e=document.getElementById(targetElement);if(!!e){this.element=e}}else if(targetElement instanceof HTMLElement){this.element=targetElement}this.stream.once("video-removed",function(element){_this.ee.emitEvent("videoElementDestroyed",[new VideoElementEvent_1.VideoElementEvent(element,_this,"videoElementDestroyed")])})}Subscriber.prototype.subscribeToAudio=function(value){this.stream.getWebRtcPeer().audioEnabled=value;console.info("'Subscriber' has "+(value?"subscribed":"unsubscribed")+" to its audio stream");return this};Subscriber.prototype.subscribeToVideo=function(value){this.stream.getWebRtcPeer().videoEnabled=value;console.info("'Subscriber' has "+(value?"subscribed":"unsubscribed")+" to its video stream");return this};Subscriber.prototype.on=function(type,handler){var _this=this;this.ee.on(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Subscriber'",event)}else{console.info("Event '"+type+"' triggered by 'Subscriber'")}handler(event)});if(type==="videoElementCreated"){if(this.stream.isVideoELementCreated){this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoElementCreated")])}else{this.stream.once("video-element-created-by-stream",function(element){_this.id=element.id;_this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(element,_this,"videoElementCreated")])})}}if(type==="videoPlaying"){var video=this.stream.getVideoElement();if(!this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.once("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}return this};Subscriber.prototype.once=function(type,handler){var _this=this;this.ee.once(type,function(event){if(event){console.info("Event '"+type+"' triggered once by 'Subscriber'",event)}else{console.info("Event '"+type+"' triggered once by 'Subscriber'")}handler(event)});if(type==="videoElementCreated"){if(this.stream.isVideoELementCreated){this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoElementCreated")])}else{this.stream.once("video-element-created-by-stream",function(element){_this.id=element.id;_this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(element,_this,"videoElementCreated")])})}}if(type==="videoPlaying"){var video=this.stream.getVideoElement();if(!this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.once("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}return this};Subscriber.prototype.off=function(type,handler){if(!handler){this.ee.removeAllListeners(type)}else{this.ee.off(type,handler)}return this};return Subscriber}();exports.Subscriber=Subscriber},{"../OpenViduInternal/Events/VideoElementEvent":44,"wolfy87-eventemitter":25}],34:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var LocalRecoderState;(function(LocalRecoderState){LocalRecoderState["READY"]="READY";LocalRecoderState["RECORDING"]="RECORDING";LocalRecoderState["PAUSED"]="PAUSED";LocalRecoderState["FINISHED"]="FINISHED"})(LocalRecoderState=exports.LocalRecoderState||(exports.LocalRecoderState={}))},{}],35:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var OpenViduErrorName;(function(OpenViduErrorName){OpenViduErrorName["BROWSER_NOT_SUPPORTED"]="BROWSER_NOT_SUPPORTED";OpenViduErrorName["CAMERA_ACCESS_DENIED"]="CAMERA_ACCESS_DENIED";OpenViduErrorName["MICROPHONE_ACCESS_DENIED"]="MICROPHONE_ACCESS_DENIED";OpenViduErrorName["SCREEN_CAPTURE_DENIED"]="SCREEN_CAPTURE_DENIED";OpenViduErrorName["SCREEN_SHARING_NOT_SUPPORTED"]="SCREEN_SHARING_NOT_SUPPORTED";OpenViduErrorName["SCREEN_EXTENSION_NOT_INSTALLED"]="SCREEN_EXTENSION_NOT_INSTALLED";OpenViduErrorName["SCREEN_EXTENSION_DISABLED"]="SCREEN_EXTENSION_DISABLED";OpenViduErrorName["INPUT_VIDEO_DEVICE_NOT_FOUND"]="INPUT_VIDEO_DEVICE_NOT_FOUND";OpenViduErrorName["INPUT_AUDIO_DEVICE_NOT_FOUND"]="INPUT_AUDIO_DEVICE_NOT_FOUND";OpenViduErrorName["NO_INPUT_SOURCE_SET"]="NO_INPUT_SOURCE_SET";OpenViduErrorName["PUBLISHER_PROPERTIES_ERROR"]="PUBLISHER_PROPERTIES_ERROR";OpenViduErrorName["OPENVIDU_PERMISSION_DENIED"]="OPENVIDU_PERMISSION_DENIED";OpenViduErrorName["OPENVIDU_NOT_CONNECTED"]="OPENVIDU_NOT_CONNECTED";OpenViduErrorName["GENERIC_ERROR"]="GENERIC_ERROR"})(OpenViduErrorName=exports.OpenViduErrorName||(exports.OpenViduErrorName={}));var OpenViduError=function(){function OpenViduError(name,message){this.name=name;this.message=message}return OpenViduError}();exports.OpenViduError=OpenViduError},{}],36:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var VideoInsertMode;(function(VideoInsertMode){VideoInsertMode["AFTER"]="AFTER";VideoInsertMode["APPEND"]="APPEND";VideoInsertMode["BEFORE"]="BEFORE";VideoInsertMode["PREPEND"]="PREPEND";VideoInsertMode["REPLACE"]="REPLACE"})(VideoInsertMode=exports.VideoInsertMode||(exports.VideoInsertMode={}))},{}],37:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var ConnectionEvent=function(_super){__extends(ConnectionEvent,_super);function ConnectionEvent(cancelable,target,type,connection,reason){var _this=_super.call(this,cancelable,target,type)||this;_this.connection=connection;_this.reason=reason;return _this}ConnectionEvent.prototype.callDefaultBehaviour=function(){};return ConnectionEvent}(Event_1.Event);exports.ConnectionEvent=ConnectionEvent},{"./Event":38}],38:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Event=function(){function Event(cancelable,target,type){this.hasBeenPrevented=false;this.cancelable=cancelable;this.target=target;this.type=type}Event.prototype.isDefaultPrevented=function(){return this.hasBeenPrevented};Event.prototype.preventDefault=function(){this.callDefaultBehaviour=function(){};this.hasBeenPrevented=true};return Event}();exports.Event=Event},{}],39:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var PublisherSpeakingEvent=function(_super){__extends(PublisherSpeakingEvent,_super);function PublisherSpeakingEvent(target,type,connection,streamId){var _this=_super.call(this,false,target,type)||this;_this.type=type;_this.connection=connection;_this.streamId=streamId;return _this}PublisherSpeakingEvent.prototype.callDefaultBehaviour=function(){};return PublisherSpeakingEvent}(Event_1.Event);exports.PublisherSpeakingEvent=PublisherSpeakingEvent},{"./Event":38}],40:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var RecordingEvent=function(_super){__extends(RecordingEvent,_super);function RecordingEvent(target,type,id,name){var _this=_super.call(this,false,target,type)||this;_this.id=id;if(name!==id){_this.name=name}return _this}RecordingEvent.prototype.callDefaultBehaviour=function(){};return RecordingEvent}(Event_1.Event);exports.RecordingEvent=RecordingEvent},{"./Event":38}],41:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var SessionDisconnectedEvent=function(_super){__extends(SessionDisconnectedEvent,_super);function SessionDisconnectedEvent(target,reason){var _this=_super.call(this,true,target,"sessionDisconnected")||this;_this.reason=reason;return _this}SessionDisconnectedEvent.prototype.callDefaultBehaviour=function(){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Session'");var session=this.target;for(var connectionId in session.remoteConnections){if(!!session.remoteConnections[connectionId].stream){session.remoteConnections[connectionId].stream.disposeWebRtcPeer();session.remoteConnections[connectionId].stream.disposeMediaStream();session.remoteConnections[connectionId].stream.removeVideo();delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId];session.remoteConnections[connectionId].dispose()}delete session.remoteConnections[connectionId]}};return SessionDisconnectedEvent}(Event_1.Event);exports.SessionDisconnectedEvent=SessionDisconnectedEvent},{"./Event":38}],42:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var SignalEvent=function(_super){__extends(SignalEvent,_super);function SignalEvent(target,type,data,from){var _this=_super.call(this,false,target,type)||this;_this.type=type;_this.data=data;_this.from=from;return _this}SignalEvent.prototype.callDefaultBehaviour=function(){};return SignalEvent}(Event_1.Event);exports.SignalEvent=SignalEvent},{"./Event":38}],43:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var __1=require("../..");var StreamEvent=function(_super){__extends(StreamEvent,_super);function StreamEvent(cancelable,target,type,stream,reason){var _this=_super.call(this,cancelable,target,type)||this;_this.stream=stream;_this.reason=reason;return _this}StreamEvent.prototype.callDefaultBehaviour=function(){if(this.type==="streamDestroyed"){if(this.target instanceof __1.Session){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Session'");this.stream.disposeWebRtcPeer();this.stream.disposeMediaStream();this.stream.removeVideo()}else if(this.target instanceof __1.Publisher){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Publisher'");this.stream.disposeMediaStream();this.stream.removeVideo();this.stream.isReadyToPublish=false}delete this.stream.session.remoteStreamsCreated[this.stream.streamId];var remoteConnection=this.stream.session.remoteConnections[this.stream.connection.connectionId];if(!!remoteConnection&&!!remoteConnection.options){var streamOptionsServer=remoteConnection.options.streams;for(var i=streamOptionsServer.length-1;i>=0;--i){if(streamOptionsServer[i].id===this.stream.streamId){streamOptionsServer.splice(i,1)}}}}};return StreamEvent}(Event_1.Event);exports.StreamEvent=StreamEvent},{"../..":60,"./Event":38}],44:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var VideoElementEvent=function(_super){__extends(VideoElementEvent,_super);function VideoElementEvent(element,target,type){var _this=_super.call(this,false,target,type)||this;_this.element=element;return _this}VideoElementEvent.prototype.callDefaultBehaviour=function(){};return VideoElementEvent}(Event_1.Event);exports.VideoElementEvent=VideoElementEvent},{"./Event":38}],45:[function(require,module,exports){function Mapper(){var sources={};this.forEach=function(callback){for(var key in sources){var source=sources[key];for(var key2 in source)callback(source[key2])}};this.get=function(id,source){var ids=sources[source];if(ids==undefined)return undefined;return ids[id]};this.remove=function(id,source){var ids=sources[source];if(ids==undefined)return;delete ids[id];for(var i in ids){return false}delete sources[source]};this.set=function(value,id,source){if(value==undefined)return this.remove(id,source);var ids=sources[source];if(ids==undefined)sources[source]=ids={};ids[id]=value}}Mapper.prototype.pop=function(id,source){var value=this.get(id,source);if(value==undefined)return undefined;this.remove(id,source);return value};module.exports=Mapper},{}],46:[function(require,module,exports){var JsonRpcClient=require("./jsonrpcclient");exports.JsonRpcClient=JsonRpcClient},{"./jsonrpcclient":47}],47:[function(require,module,exports){var RpcBuilder=require("../");var WebSocketWithReconnection=require("./transports/webSocketWithReconnection");Date.now=Date.now||function(){return+new Date};var PING_INTERVAL=5e3;var RECONNECTING="RECONNECTING";var CONNECTED="CONNECTED";var DISCONNECTED="DISCONNECTED";var Logger=console;function JsonRpcClient(configuration){var self=this;var wsConfig=configuration.ws;var notReconnectIfNumLessThan=-1;var pingNextNum=0;var enabledPings=true;var pingPongStarted=false;var pingInterval;var status=DISCONNECTED;var onreconnecting=wsConfig.onreconnecting;var onreconnected=wsConfig.onreconnected;var onconnected=wsConfig.onconnected;var onerror=wsConfig.onerror;configuration.rpc.pull=function(params,request){request.reply(null,"push")};wsConfig.onreconnecting=function(){Logger.debug("--------- ONRECONNECTING -----------");if(status===RECONNECTING){Logger.error("Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it");return}status=RECONNECTING;if(onreconnecting){onreconnecting()}};wsConfig.onreconnected=function(){Logger.debug("--------- ONRECONNECTED -----------");if(status===CONNECTED){Logger.error("Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it");return}status=CONNECTED;enabledPings=true;updateNotReconnectIfLessThan();usePing();if(onreconnected){onreconnected()}};wsConfig.onconnected=function(){Logger.debug("--------- ONCONNECTED -----------");if(status===CONNECTED){Logger.error("Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it");return}status=CONNECTED;enabledPings=true;usePing();if(onconnected){onconnected()}};wsConfig.onerror=function(error){Logger.debug("--------- ONERROR -----------");status=DISCONNECTED;if(onerror){onerror(error)}};var ws=new WebSocketWithReconnection(wsConfig);Logger.debug("Connecting websocket to URI: "+wsConfig.uri);var rpcBuilderOptions={request_timeout:configuration.rpc.requestTimeout,ping_request_timeout:configuration.rpc.heartbeatRequestTimeout};var rpc=new RpcBuilder(RpcBuilder.packers.JsonRPC,rpcBuilderOptions,ws,function(request){Logger.debug("Received request: "+JSON.stringify(request));try{var func=configuration.rpc[request.method];if(func===undefined){Logger.error("Method "+request.method+" not registered in client")}else{func(request.params,request)}}catch(err){Logger.error("Exception processing request: "+JSON.stringify(request));Logger.error(err)}});this.send=function(method,params,callback){if(method!=="ping"){Logger.debug("Request: method:"+method+" params:"+JSON.stringify(params))}var requestTime=Date.now();rpc.encode(method,params,function(error,result){if(error){try{Logger.error("ERROR:"+error.message+" in Request: method:"+method+" params:"+JSON.stringify(params)+" request:"+error.request);if(error.data){Logger.error("ERROR DATA:"+JSON.stringify(error.data))}}catch(e){}error.requestTime=requestTime}if(callback){if(result!=undefined&&result.value!=="pong"){Logger.debug("Response: "+JSON.stringify(result))}callback(error,result)}})};function updateNotReconnectIfLessThan(){Logger.debug("notReconnectIfNumLessThan = "+pingNextNum+" (old="+notReconnectIfNumLessThan+")");notReconnectIfNumLessThan=pingNextNum}function sendPing(){if(enabledPings){var params=null;if(pingNextNum==0||pingNextNum==notReconnectIfNumLessThan){params={interval:configuration.heartbeat||PING_INTERVAL}}pingNextNum++;self.send("ping",params,function(pingNum){return function(error,result){if(error){Logger.debug("Error in ping request #"+pingNum+" ("+error.message+")");if(pingNum>notReconnectIfNumLessThan){enabledPings=false;updateNotReconnectIfLessThan();Logger.debug("Server did not respond to ping message #"+pingNum+". Reconnecting... ");ws.reconnectWs()}}}}(pingNextNum))}else{Logger.debug("Trying to send ping, but ping is not enabled")}}function usePing(){if(!pingPongStarted){Logger.debug("Starting ping (if configured)");pingPongStarted=true;if(configuration.heartbeat!=undefined){pingInterval=setInterval(sendPing,configuration.heartbeat);sendPing()}}}this.close=function(){Logger.debug("Closing jsonRpcClient explicitly by client");if(pingInterval!=undefined){Logger.debug("Clearing ping interval");clearInterval(pingInterval)}pingPongStarted=false;enabledPings=false;if(configuration.sendCloseMessage){Logger.debug("Sending close message");this.send("closeSession",null,function(error,result){if(error){Logger.error("Error sending close message: "+JSON.stringify(error))}ws.close()})}else{ws.close()}};this.forceClose=function(millis){ws.forceClose(millis)};this.reconnect=function(){ws.reconnectWs()}}module.exports=JsonRpcClient},{"../":50,"./transports/webSocketWithReconnection":49}],48:[function(require,module,exports){var WebSocketWithReconnection=require("./webSocketWithReconnection");exports.WebSocketWithReconnection=WebSocketWithReconnection},{"./webSocketWithReconnection":49}],49:[function(require,module,exports){(function(global){"use strict";var BrowserWebSocket=global.WebSocket||global.MozWebSocket;var Logger=console;var MAX_RETRIES=2e3;var RETRY_TIME_MS=3e3;var CONNECTING=0;var OPEN=1;var CLOSING=2;var CLOSED=3;function WebSocketWithReconnection(config){var closing=false;var registerMessageHandler;var wsUri=config.uri;var useSockJS=config.useSockJS;var reconnecting=false;var forcingDisconnection=false;var ws;if(useSockJS){ws=new SockJS(wsUri)}else{ws=new WebSocket(wsUri)}ws.onopen=function(){logConnected(ws,wsUri);if(config.onconnected){config.onconnected()}};ws.onerror=function(error){Logger.error("Could not connect to "+wsUri+" (invoking onerror if defined)",error);if(config.onerror){config.onerror(error)}};function logConnected(ws,wsUri){try{Logger.debug("WebSocket connected to "+wsUri)}catch(e){Logger.error(e)}}var reconnectionOnClose=function(){if(ws.readyState===CLOSED){if(closing){Logger.debug("Connection closed by user")}else{Logger.debug("Connection closed unexpectecly. Reconnecting...");reconnectToSameUri(MAX_RETRIES,1)}}else{Logger.debug("Close callback from previous websocket. Ignoring it")}};ws.onclose=reconnectionOnClose;function reconnectToSameUri(maxRetries,numRetries){Logger.debug("reconnectToSameUri (attempt #"+numRetries+", max="+maxRetries+")");if(numRetries===1){if(reconnecting){Logger.warn("Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.");return}else{reconnecting=true}if(config.onreconnecting){config.onreconnecting()}}if(forcingDisconnection){reconnectToNewUri(maxRetries,numRetries,wsUri)}else{if(config.newWsUriOnReconnection){config.newWsUriOnReconnection(function(error,newWsUri){if(error){Logger.debug(error);setTimeout(function(){reconnectToSameUri(maxRetries,numRetries+1)},RETRY_TIME_MS)}else{reconnectToNewUri(maxRetries,numRetries,newWsUri)}})}else{reconnectToNewUri(maxRetries,numRetries,wsUri)}}}function reconnectToNewUri(maxRetries,numRetries,reconnectWsUri){Logger.debug("Reconnection attempt #"+numRetries);ws.close();wsUri=reconnectWsUri||wsUri;var newWs;if(useSockJS){newWs=new SockJS(wsUri)}else{newWs=new WebSocket(wsUri)}newWs.onopen=function(){Logger.debug("Reconnected after "+numRetries+" attempts...");logConnected(newWs,wsUri);reconnecting=false;registerMessageHandler();if(config.onreconnected()){config.onreconnected()}newWs.onclose=reconnectionOnClose};var onErrorOrClose=function(error){Logger.warn("Reconnection error: ",error);if(numRetries===maxRetries){if(config.ondisconnect){config.ondisconnect()}}else{setTimeout(function(){reconnectToSameUri(maxRetries,numRetries+1)},RETRY_TIME_MS)}};newWs.onerror=onErrorOrClose;ws=newWs}this.close=function(){closing=true;ws.close()};this.forceClose=function(millis){Logger.debug("Testing: Force WebSocket close");if(millis){Logger.debug("Testing: Change wsUri for "+millis+" millis to simulate net failure");var goodWsUri=wsUri;wsUri="wss://21.234.12.34.4:443/";forcingDisconnection=true;setTimeout(function(){Logger.debug("Testing: Recover good wsUri "+goodWsUri);wsUri=goodWsUri;forcingDisconnection=false},millis)}ws.close()};this.reconnectWs=function(){Logger.debug("reconnectWs");reconnectToSameUri(MAX_RETRIES,1,wsUri)};this.send=function(message){ws.send(message)};this.addEventListener=function(type,callback){registerMessageHandler=function(){ws.addEventListener(type,callback)};registerMessageHandler()}}module.exports=WebSocketWithReconnection}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],50:[function(require,module,exports){var defineProperty_IE8=false;if(Object.defineProperty){try{Object.defineProperty({},"x",{})}catch(e){defineProperty_IE8=true}}if(!Function.prototype.bind){Function.prototype.bind=function(oThis){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var aArgs=Array.prototype.slice.call(arguments,1),fToBind=this,fNOP=function(){},fBound=function(){return fToBind.apply(this instanceof fNOP&&oThis?this:oThis,aArgs.concat(Array.prototype.slice.call(arguments)))};fNOP.prototype=this.prototype;fBound.prototype=new fNOP;return fBound}}var EventEmitter=require("events").EventEmitter;var inherits=require("inherits");var packers=require("./packers");var Mapper=require("./Mapper");var BASE_TIMEOUT=5e3;function unifyResponseMethods(responseMethods){if(!responseMethods)return{};for(var key in responseMethods){var value=responseMethods[key];if(typeof value=="string")responseMethods[key]={response:value}}return responseMethods}function unifyTransport(transport){if(!transport)return;if(transport instanceof Function)return{send:transport};if(transport.send instanceof Function)return transport;if(transport.postMessage instanceof Function){transport.send=transport.postMessage;return transport}if(transport.write instanceof Function){transport.send=transport.write;return transport}if(transport.onmessage!==undefined)return;if(transport.pause instanceof Function)return;throw new SyntaxError("Transport is not a function nor a valid object")}function RpcNotification(method,params){if(defineProperty_IE8){this.method=method;this.params=params}else{Object.defineProperty(this,"method",{value:method,enumerable:true});Object.defineProperty(this,"params",{value:params,enumerable:true})}}function RpcBuilder(packer,options,transport,onRequest){var self=this;if(!packer)throw new SyntaxError("Packer is not defined");if(!packer.pack||!packer.unpack)throw new SyntaxError("Packer is invalid");var responseMethods=unifyResponseMethods(packer.responseMethods);if(options instanceof Function){if(transport!=undefined)throw new SyntaxError("There can't be parameters after onRequest");onRequest=options;transport=undefined;options=undefined}if(options&&options.send instanceof Function){if(transport&&!(transport instanceof Function))throw new SyntaxError("Only a function can be after transport");onRequest=transport;transport=options;options=undefined}if(transport instanceof Function){if(onRequest!=undefined)throw new SyntaxError("There can't be parameters after onRequest");onRequest=transport;transport=undefined}if(transport&&transport.send instanceof Function)if(onRequest&&!(onRequest instanceof Function))throw new SyntaxError("Only a function can be after transport");options=options||{};EventEmitter.call(this);if(onRequest)this.on("request",onRequest);if(defineProperty_IE8)this.peerID=options.peerID;else Object.defineProperty(this,"peerID",{value:options.peerID});var max_retries=options.max_retries||0;function transportMessage(event){self.decode(event.data||event)}this.getTransport=function(){return transport};this.setTransport=function(value){if(transport){if(transport.removeEventListener)transport.removeEventListener("message",transportMessage);else if(transport.removeListener)transport.removeListener("data",transportMessage)}if(value){if(value.addEventListener)value.addEventListener("message",transportMessage);else if(value.addListener)value.addListener("data",transportMessage)}transport=unifyTransport(value)};if(!defineProperty_IE8)Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});this.setTransport(transport);var request_timeout=options.request_timeout||BASE_TIMEOUT;var ping_request_timeout=options.ping_request_timeout||request_timeout;var response_timeout=options.response_timeout||BASE_TIMEOUT;var duplicates_timeout=options.duplicates_timeout||BASE_TIMEOUT;var requestID=0;var requests=new Mapper;var responses=new Mapper;var processedResponses=new Mapper;var message2Key={};function storeResponse(message,id,dest){var response={message:message,timeout:setTimeout(function(){responses.remove(id,dest)},response_timeout)};responses.set(response,id,dest)}function storeProcessedResponse(ack,from){var timeout=setTimeout(function(){processedResponses.remove(ack,from)},duplicates_timeout);processedResponses.set(timeout,ack,from)}function RpcRequest(method,params,id,from,transport){RpcNotification.call(this,method,params);this.getTransport=function(){return transport};this.setTransport=function(value){transport=unifyTransport(value)};if(!defineProperty_IE8)Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});var response=responses.get(id,from);if(!(transport||self.getTransport())){if(defineProperty_IE8)this.duplicated=Boolean(response);else Object.defineProperty(this,"duplicated",{value:Boolean(response)})}var responseMethod=responseMethods[method];this.pack=packer.pack.bind(packer,this,id);this.reply=function(error,result,transport){if(error instanceof Function||error&&error.send instanceof Function){if(result!=undefined)throw new SyntaxError("There can't be parameters after callback");transport=error;result=null;error=undefined}else if(result instanceof Function||result&&result.send instanceof Function){if(transport!=undefined)throw new SyntaxError("There can't be parameters after callback");transport=result;result=null}transport=unifyTransport(transport);if(response)clearTimeout(response.timeout);if(from!=undefined){if(error)error.dest=from;if(result)result.dest=from}var message;if(error||result!=undefined){if(self.peerID!=undefined){if(error)error.from=self.peerID;else result.from=self.peerID}if(responseMethod){if(responseMethod.error==undefined&&error)message={error:error};else{var method=error?responseMethod.error:responseMethod.response;message={method:method,params:error||result}}}else message={error:error,result:result};message=packer.pack(message,id)}else if(response)message=response.message;else message=packer.pack({result:null},id);storeResponse(message,id,from);transport=transport||this.getTransport()||self.getTransport();if(transport)return transport.send(message);return message}}inherits(RpcRequest,RpcNotification);function cancel(message){var key=message2Key[message];if(!key)return;delete message2Key[message];var request=requests.pop(key.id,key.dest);if(!request)return;clearTimeout(request.timeout);storeProcessedResponse(key.id,key.dest)}this.cancel=function(message){if(message)return cancel(message);for(var message in message2Key)cancel(message)};this.close=function(){var transport=this.getTransport();if(transport&&transport.close)transport.close();this.cancel();processedResponses.forEach(clearTimeout);responses.forEach(function(response){clearTimeout(response.timeout)})};this.encode=function(method,params,dest,transport,callback){if(params instanceof Function){if(dest!=undefined)throw new SyntaxError("There can't be parameters after callback");callback=params;transport=undefined;dest=undefined;params=undefined}else if(dest instanceof Function){if(transport!=undefined)throw new SyntaxError("There can't be parameters after callback");callback=dest;transport=undefined;dest=undefined}else if(transport instanceof Function){if(callback!=undefined)throw new SyntaxError("There can't be parameters after callback");callback=transport;transport=undefined}if(self.peerID!=undefined){params=params||{};params.from=self.peerID}if(dest!=undefined){params=params||{};params.dest=dest}var message={method:method,params:params};if(callback){var id=requestID++;var retried=0;message=packer.pack(message,id);function dispatchCallback(error,result){self.cancel(message);callback(error,result)}var request={message:message,callback:dispatchCallback,responseMethods:responseMethods[method]||{}};var encode_transport=unifyTransport(transport);function sendRequest(transport){var rt=method==="ping"?ping_request_timeout:request_timeout;request.timeout=setTimeout(timeout,rt*Math.pow(2,retried++));message2Key[message]={id:id,dest:dest};requests.set(request,id,dest);transport=transport||encode_transport||self.getTransport();if(transport)return transport.send(message);return message}function retry(transport){transport=unifyTransport(transport);console.warn(retried+" retry for request message:",message);var timeout=processedResponses.pop(id,dest);clearTimeout(timeout);return sendRequest(transport)}function timeout(){if(retried0){return sdp.slice(0,n)}else{return sdp}}function getSimulcastInfo(videoStream){var videoTracks=videoStream.getVideoTracks();if(!videoTracks.length){logger.warn("No video tracks available in the video stream");return""}var lines=["a=x-google-flag:conference","a=ssrc-group:SIM 1 2 3","a=ssrc:1 cname:localVideo","a=ssrc:1 msid:"+videoStream.id+" "+videoTracks[0].id,"a=ssrc:1 mslabel:"+videoStream.id,"a=ssrc:1 label:"+videoTracks[0].id,"a=ssrc:2 cname:localVideo","a=ssrc:2 msid:"+videoStream.id+" "+videoTracks[0].id,"a=ssrc:2 mslabel:"+videoStream.id,"a=ssrc:2 label:"+videoTracks[0].id,"a=ssrc:3 cname:localVideo","a=ssrc:3 msid:"+videoStream.id+" "+videoTracks[0].id,"a=ssrc:3 mslabel:"+videoStream.id,"a=ssrc:3 label:"+videoTracks[0].id];lines.push("");return lines.join("\n")}function WebRtcPeer(mode,options,callback){if(!(this instanceof WebRtcPeer)){return new WebRtcPeer(mode,options,callback)}WebRtcPeer.super_.call(this);if(options instanceof Function){callback=options;options=undefined}options=options||{};callback=(callback||noop).bind(this);var self=this;var localVideo=options.localVideo;var remoteVideo=options.remoteVideo;var videoStream=options.videoStream;var audioStream=options.audioStream;var mediaConstraints=options.mediaConstraints;var connectionConstraints=options.connectionConstraints;var pc=options.peerConnection;var sendSource=options.sendSource||"webcam";var guid=uuid.v4();var configuration=recursive({iceServers:!!options.iceServers&&options.iceServers.length>0?options.iceServers:freeice()},options.configuration);var onicecandidate=options.onicecandidate;if(onicecandidate)this.on("icecandidate",onicecandidate);var oncandidategatheringdone=options.oncandidategatheringdone;if(oncandidategatheringdone){this.on("candidategatheringdone",oncandidategatheringdone)}var simulcast=options.simulcast;var multistream=options.multistream;var interop=new sdpTranslator.Interop;var candidatesQueueOut=[];var candidategatheringdone=false;Object.defineProperties(this,{peerConnection:{get:function(){return pc}},id:{value:options.id||guid,writable:false},remoteVideo:{get:function(){return remoteVideo}},localVideo:{get:function(){return localVideo}},currentFrame:{get:function(){if(!remoteVideo)return;if(remoteVideo.readyStateUnifiedPlan",dumpSDP(localDescription))}callback(null,localDescription.sdp,self.processAnswer.bind(self))}).catch(callback)};this.getLocalSessionDescriptor=function(){return pc.localDescription};this.getRemoteSessionDescriptor=function(){return pc.remoteDescription};function setRemoteVideo(){if(remoteVideo){remoteVideo.pause();var stream=pc.getRemoteStreams()[0];remoteVideo.srcObject=stream;logger.debug("Remote stream:",stream);remoteVideo.load()}}this.showLocalVideo=function(){localVideo.srcObject=videoStream;localVideo.muted=true};this.processAnswer=function(sdpAnswer,callback){callback=(callback||noop).bind(this);var answer=new RTCSessionDescription({type:"answer",sdp:sdpAnswer});if(multistream&&usePlanB){var planBAnswer=interop.toPlanB(answer);logger.debug("asnwer::planB",dumpSDP(planBAnswer));answer=planBAnswer}logger.debug("SDP answer received, setting remote description");if(pc.signalingState==="closed"){return callback("PeerConnection is closed")}pc.setRemoteDescription(answer,function(){setRemoteVideo();callback()},callback)};this.processOffer=function(sdpOffer,callback){callback=callback.bind(this);var offer=new RTCSessionDescription({type:"offer",sdp:sdpOffer});if(multistream&&usePlanB){var planBOffer=interop.toPlanB(offer);logger.debug("offer::planB",dumpSDP(planBOffer));offer=planBOffer}logger.debug("SDP offer received, setting remote description");if(pc.signalingState==="closed"){return callback("PeerConnection is closed")}pc.setRemoteDescription(offer).then(function(){return setRemoteVideo()}).then(function(){return pc.createAnswer()}).then(function(answer){answer=mangleSdpToAddSimulcast(answer);logger.debug("Created SDP answer");return pc.setLocalDescription(answer)}).then(function(){var localDescription=pc.localDescription;if(multistream&&usePlanB){localDescription=interop.toUnifiedPlan(localDescription);logger.debug("answer::origPlanB->UnifiedPlan",dumpSDP(localDescription))}logger.debug("Local description set",localDescription.sdp);callback(null,localDescription.sdp)}).catch(callback)};function mangleSdpToAddSimulcast(answer){if(simulcast){if(browser.name==="Chrome"||browser.name==="Chromium"){logger.debug("Adding multicast info");answer=new RTCSessionDescription({type:answer.type,sdp:removeFIDFromOffer(answer.sdp)+getSimulcastInfo(videoStream)})}else{logger.warn("Simulcast is only available in Chrome browser.")}}return answer}function start(){if(pc.signalingState==="closed"){callback('The peer connection object is in "closed" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue')}if(videoStream&&localVideo){self.showLocalVideo()}if(videoStream){pc.addStream(videoStream)}if(audioStream){pc.addStream(audioStream)}var browser=parser.getBrowser();if(mode==="sendonly"&&(browser.name==="Chrome"||browser.name==="Chromium")&&browser.major===39){mode="sendrecv"}callback()}if(mode!=="recvonly"&&!videoStream&&!audioStream){function getMedia(constraints){if(constraints===undefined){constraints=MEDIA_CONSTRAINTS}navigator.mediaDevices.getUserMedia(constraints).then(function(stream){videoStream=stream;start()}).catch(callback)}if(sendSource==="webcam"){getMedia(mediaConstraints)}else{getScreenConstraints(sendSource,function(error,constraints_){if(error)return callback(error);constraints=[mediaConstraints];constraints.unshift(constraints_);getMedia(recursive.apply(undefined,constraints))},guid)}}else{setTimeout(start,0)}this.on("_dispose",function(){if(localVideo){localVideo.pause();localVideo.srcObject=null;localVideo.load();localVideo.muted=false}if(remoteVideo){remoteVideo.pause();remoteVideo.srcObject=null;remoteVideo.load()}self.removeAllListeners();if(window.cancelChooseDesktopMedia!==undefined){window.cancelChooseDesktopMedia(guid)}})}inherits(WebRtcPeer,EventEmitter);function createEnableDescriptor(type){var method="get"+type+"Tracks";return{enumerable:true,get:function(){if(!this.peerConnection)return;var streams=this.peerConnection.getLocalStreams();if(!streams.length)return;for(var i=0,stream;stream=streams[i];i++){var tracks=stream[method]();for(var j=0,track;track=tracks[j];j++)if(!track.enabled)return false}return true},set:function(value){function trackSetEnable(track){track.enabled=value}this.peerConnection.getLocalStreams().forEach(function(stream){stream[method]().forEach(trackSetEnable)})}}}Object.defineProperties(WebRtcPeer.prototype,{enabled:{enumerable:true,get:function(){return this.audioEnabled&&this.videoEnabled},set:function(value){this.audioEnabled=this.videoEnabled=value}},audioEnabled:createEnableDescriptor("Audio"),videoEnabled:createEnableDescriptor("Video")});WebRtcPeer.prototype.getLocalStream=function(index){if(this.peerConnection){return this.peerConnection.getLocalStreams()[index||0]}};WebRtcPeer.prototype.getRemoteStream=function(index){if(this.peerConnection){return this.peerConnection.getRemoteStreams()[index||0]}};WebRtcPeer.prototype.dispose=function(){logger.debug("Disposing WebRtcPeer");var pc=this.peerConnection;try{if(pc){if(pc.signalingState==="closed")return;pc.getLocalStreams().forEach(streamStop);pc.close()}}catch(err){logger.warn("Exception disposing webrtc peer "+err)}this.emit("_dispose")};function WebRtcPeerRecvonly(options,callback){if(!(this instanceof WebRtcPeerRecvonly)){return new WebRtcPeerRecvonly(options,callback)}WebRtcPeerRecvonly.super_.call(this,"recvonly",options,callback)}inherits(WebRtcPeerRecvonly,WebRtcPeer);function WebRtcPeerSendonly(options,callback){if(!(this instanceof WebRtcPeerSendonly)){return new WebRtcPeerSendonly(options,callback)}WebRtcPeerSendonly.super_.call(this,"sendonly",options,callback)}inherits(WebRtcPeerSendonly,WebRtcPeer);function WebRtcPeerSendrecv(options,callback){if(!(this instanceof WebRtcPeerSendrecv)){return new WebRtcPeerSendrecv(options,callback)}WebRtcPeerSendrecv.super_.call(this,"sendrecv",options,callback)}inherits(WebRtcPeerSendrecv,WebRtcPeer);function harkUtils(stream,options){return hark(stream,options)}exports.bufferizeCandidates=bufferizeCandidates;exports.WebRtcPeerRecvonly=WebRtcPeerRecvonly;exports.WebRtcPeerSendonly=WebRtcPeerSendonly;exports.WebRtcPeerSendrecv=WebRtcPeerSendrecv;exports.hark=harkUtils},{events:1,freeice:2,hark:5,inherits:6,merge:7,"sdp-translator":15,"ua-parser-js":18,uuid:19}],55:[function(require,module,exports){var WebRtcPeer=require("./WebRtcPeer");exports.WebRtcPeer=WebRtcPeer},{"./WebRtcPeer":54}],56:[function(require,module,exports){window.getScreenId=function(callback){if(!!navigator.mozGetUserMedia){callback(null,"firefox",{video:{mozMediaSource:"window",mediaSource:"window"}});return}window.addEventListener("message",onIFrameCallback);function onIFrameCallback(event){if(!event.data)return;if(event.data.chromeMediaSourceId){if(event.data.chromeMediaSourceId==="PermissionDeniedError"){callback("permission-denied")}else{callback(null,event.data.chromeMediaSourceId,getScreenConstraints(null,event.data.chromeMediaSourceId))}window.removeEventListener("message",onIFrameCallback)}if(event.data.chromeExtensionStatus){callback(event.data.chromeExtensionStatus,null,getScreenConstraints(event.data.chromeExtensionStatus));window.removeEventListener("message",onIFrameCallback)}}setTimeout(postGetSourceIdMessage,100)};function getScreenConstraints(error,sourceId){var screen_constraints={audio:false,video:{mandatory:{chromeMediaSource:error?"screen":"desktop",maxWidth:window.screen.width>1920?window.screen.width:1920,maxHeight:window.screen.height>1080?window.screen.height:1080},optional:[]}};if(sourceId){screen_constraints.video.mandatory.chromeMediaSourceId=sourceId}return screen_constraints}var iframe;function postGetSourceIdMessage(){if(!iframe){loadIFrame(postGetSourceIdMessage);return}if(!iframe.isLoaded){setTimeout(postGetSourceIdMessage,100);return}iframe.contentWindow.postMessage({captureSourceId:true},"*")}function loadIFrame(loadCallback){if(iframe){loadCallback();return}iframe=document.createElement("iframe");iframe.onload=function(){iframe.isLoaded=true;loadCallback()};iframe.src="https://www.webrtc-experiment.com/getSourceId/";iframe.style.display="none";(document.body||document.documentElement).appendChild(iframe)}window.getChromeExtensionStatus=function(callback){if(!!navigator.mozGetUserMedia){callback("installed-enabled");return}window.addEventListener("message",onIFrameCallback);function onIFrameCallback(event){if(!event.data)return;if(event.data.chromeExtensionStatus){callback(event.data.chromeExtensionStatus)}window.removeEventListener("message",onIFrameCallback)}setTimeout(postGetChromeExtensionStatusMessage,100)};function postGetChromeExtensionStatusMessage(){if(!iframe){loadIFrame(postGetChromeExtensionStatusMessage);return}if(!iframe.isLoaded){setTimeout(postGetChromeExtensionStatusMessage,100);return}iframe.contentWindow.postMessage({getChromeExtensionStatus:true},"*")}exports.getScreenId=getScreenId},{}],57:[function(require,module,exports){var chromeMediaSource="screen";var screenCallback;var isFirefox=typeof window.InstallTrigger!=="undefined";var isOpera=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0;var isChrome=!!window.chrome&&!isOpera;window.addEventListener("message",function(event){if(event.origin!=window.location.origin){return}onMessageCallback(event.data)});function onMessageCallback(data){if(data=="PermissionDeniedError"){chromeMediaSource="PermissionDeniedError";if(screenCallback)return screenCallback("PermissionDeniedError");else throw new Error("PermissionDeniedError")}if(data=="rtcmulticonnection-extension-loaded"){chromeMediaSource="desktop"}if(data.sourceId&&screenCallback){screenCallback(sourceId=data.sourceId)}}function isChromeExtensionAvailable(callback){if(isFirefox)return callback(false);if(chromeMediaSource=="desktop")return callback("isFirefox");window.postMessage("are-you-there","*");setTimeout(function(){if(chromeMediaSource=="screen"){callback("unavailable")}else callback("available")},2e3)}function getSourceId(callback){if(!callback)throw'"callback" parameter is mandatory.';if(sourceId)return callback(sourceId);screenCallback=callback;window.postMessage("get-sourceId","*")}function getChromeExtensionStatus(extensionid,callback){if(isFirefox)return callback("not-chrome");if(arguments.length!=2){callback=extensionid;extensionid="ajhifddimkapgcifgcodmmfdlknahffk"}var image=document.createElement("img");image.src="chrome-extension://"+extensionid+"/icon.png";image.onload=function(){chromeMediaSource="screen";window.postMessage("are-you-there","*");setTimeout(function(){if(chromeMediaSource=="screen"){callback(extensionid==extensionid?"installed-enabled":"installed-disabled")}else callback("installed-enabled")},2e3)};image.onerror=function(){callback("not-installed")}}function getScreenConstraints(callback){sourceId="";var firefoxScreenConstraints={mozMediaSource:"window",mediaSource:"window"};if(isFirefox)return callback(null,firefoxScreenConstraints);var screen_constraints={mandatory:{chromeMediaSource:chromeMediaSource,maxWidth:screen.width>1920?screen.width:1920,maxHeight:screen.height>1080?screen.height:1080},optional:[]};if(chromeMediaSource=="desktop"&&!sourceId){getSourceId(function(){screen_constraints.mandatory.chromeMediaSourceId=sourceId;callback(sourceId=="PermissionDeniedError"?sourceId:null,screen_constraints)});return}if(chromeMediaSource=="desktop"){screen_constraints.mandatory.chromeMediaSourceId=sourceId}callback(null,screen_constraints)}exports.getScreenConstraints=getScreenConstraints;exports.isChromeExtensionAvailable=isChromeExtensionAvailable;exports.getChromeExtensionStatus=getChromeExtensionStatus;exports.getSourceId=getSourceId},{}],58:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var VideoInsertMode_1=require("./Enums/VideoInsertMode");function solveIfCallback(methodName,completionHandler,promise){console.warn("DEPRECATION WANING: In future releases the 'completionHandler' parameter will be removed from method '"+methodName+"'. Please, refactor your callbacks to Promise API");return new Promise(function(resolve,reject){if(!!completionHandler&&typeof completionHandler==="function"){promise.then(function(){completionHandler(undefined)}).catch(function(error){completionHandler(error)})}else{promise.then(function(){return resolve()}).catch(function(error){return reject(error)})}})}exports.solveIfCallback=solveIfCallback;function adaptPublisherProperties(properties){console.warn("DEPRECATION WANING: In future releases the properties passed to 'OpenVidu.initPublisher' method must match PublisherProperties interface");var scr=typeof properties.screen!=="undefined"&&properties.screen===true;var res="";if(typeof properties.quality==="string"){switch(properties.quality){case"LOW":res="320x240";break;case"MEDIUM":res="640x480";break;case"HIGH":res="1280x720";break}}var publisherProperties={audioSource:typeof properties.audio!=="undefined"&&properties.audio===false?false:typeof properties.audioSource!=="undefined"?properties.audioSource:undefined,frameRate:typeof properties.frameRate!=="undefined"?properties.frameRate:undefined,insertMode:typeof properties.insertMode!=="undefined"?properties.insertMode:VideoInsertMode_1.VideoInsertMode.APPEND,mirror:typeof properties.mirror!=="undefined"?properties.mirror:true,publishAudio:typeof properties.audioActive!=="undefined"&&properties.audioActive===false?false:typeof properties.publishAudio!=="undefined"?properties.publishAudio:true,publishVideo:typeof properties.videoActive!=="undefined"&&properties.videoActive===false?false:typeof properties.publishVideo!=="undefined"?properties.publishVideo:true,resolution:!!res?res:typeof properties.resolution!=="undefined"?properties.resolution:"640x480",videoSource:scr?"screen":typeof properties.video!=="undefined"&&properties.video===false?false:typeof properties.videoSource!=="undefined"?properties.videoSource:undefined};return publisherProperties}exports.adaptPublisherProperties=adaptPublisherProperties},{"./Enums/VideoInsertMode":36}],59:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var platform=require("platform");var WebRtcStats=function(){function WebRtcStats(stream){this.stream=stream;this.webRtcStatsEnabled=false;this.statsInterval=1;this.stats={inbound:{audio:{bytesReceived:0,packetsReceived:0,packetsLost:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0,nackCount:0}},outbound:{audio:{bytesSent:0,packetsSent:0},video:{bytesSent:0,packetsSent:0,framesEncoded:0,nackCount:0}}}}WebRtcStats.prototype.isEnabled=function(){return this.webRtcStatsEnabled};WebRtcStats.prototype.initWebRtcStats=function(){var _this=this;var elastestInstrumentation=localStorage.getItem("elastest-instrumentation");if(elastestInstrumentation){console.warn("WebRtc stats enabled for stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId);this.webRtcStatsEnabled=true;var instrumentation_1=JSON.parse(elastestInstrumentation);this.statsInterval=instrumentation_1.webrtc.interval;console.warn("localStorage item: "+JSON.stringify(instrumentation_1));this.webRtcStatsIntervalId=setInterval(function(){_this.sendStatsToHttpEndpoint(instrumentation_1)},this.statsInterval*1e3);return}console.debug("WebRtc stats not enabled")};WebRtcStats.prototype.stopWebRtcStats=function(){if(this.webRtcStatsEnabled){clearInterval(this.webRtcStatsIntervalId);console.warn("WebRtc stats stopped for disposed stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId)}};WebRtcStats.prototype.sendStatsToHttpEndpoint=function(instrumentation){var _this=this;var sendPost=function(json){var http=new XMLHttpRequest;var url=instrumentation.webrtc.httpEndpoint;http.open("POST",url,true);http.setRequestHeader("Content-type","application/json");http.onreadystatechange=function(){if(http.readyState===4&&http.status===200){console.log("WebRtc stats successfully sent to "+url+" for stream "+_this.stream.streamId+" of connection "+_this.stream.connection.connectionId)}};http.send(json)};var f=function(stats){if(platform.name.indexOf("Firefox")!==-1){stats.forEach(function(stat){var json={};if(stat.type==="inbound-rtp"&&(stat.nackCount!==null&&stat.isRemote===false&&stat.id.startsWith("inbound")&&stat.remoteId.startsWith("inbound"))){var metricId="webrtc_inbound_"+stat.mediaType+"_"+stat.ssrc;var jit=stat.jitter*1e3;var metrics={bytesReceived:(stat.bytesReceived-_this.stats.inbound[stat.mediaType].bytesReceived)/_this.statsInterval,jitter:jit,packetsReceived:(stat.packetsReceived-_this.stats.inbound[stat.mediaType].packetsReceived)/_this.statsInterval,packetsLost:(stat.packetsLost-_this.stats.inbound[stat.mediaType].packetsLost)/_this.statsInterval};var units={bytesReceived:"bytes",jitter:"ms",packetsReceived:"packets",packetsLost:"packets"};if(stat.mediaType==="video"){metrics["framesDecoded"]=(stat.framesDecoded-_this.stats.inbound.video.framesDecoded)/_this.statsInterval;metrics["nackCount"]=(stat.nackCount-_this.stats.inbound.video.nackCount)/_this.statsInterval;units["framesDecoded"]="frames";units["nackCount"]="packets";_this.stats.inbound.video.framesDecoded=stat.framesDecoded;_this.stats.inbound.video.nackCount=stat.nackCount}_this.stats.inbound[stat.mediaType].bytesReceived=stat.bytesReceived;_this.stats.inbound[stat.mediaType].packetsReceived=stat.packetsReceived;_this.stats.inbound[stat.mediaType].packetsLost=stat.packetsLost;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}else if(stat.type==="outbound-rtp"&&(stat.isRemote===false&&stat.id.toLowerCase().includes("outbound"))){var metricId="webrtc_outbound_"+stat.mediaType+"_"+stat.ssrc;var metrics={bytesSent:(stat.bytesSent-_this.stats.outbound[stat.mediaType].bytesSent)/_this.statsInterval,packetsSent:(stat.packetsSent-_this.stats.outbound[stat.mediaType].packetsSent)/_this.statsInterval};var units={bytesSent:"bytes",packetsSent:"packets"};if(stat.mediaType==="video"){metrics["framesEncoded"]=(stat.framesEncoded-_this.stats.outbound.video.framesEncoded)/_this.statsInterval;units["framesEncoded"]="frames";_this.stats.outbound.video.framesEncoded=stat.framesEncoded}_this.stats.outbound[stat.mediaType].bytesSent=stat.bytesSent;_this.stats.outbound[stat.mediaType].packetsSent=stat.packetsSent;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}})}else if(platform.name.indexOf("Chrome")!==-1){for(var _i=0,_a=Object.keys(stats);_i<_a.length;_i++){var key=_a[_i];var stat=stats[key];if(stat.type==="ssrc"){var json={};if("bytesReceived"in stat&&(stat.mediaType==="audio"&&"audioOutputLevel"in stat||stat.mediaType==="video"&&"qpSum"in stat)){var metricId="webrtc_inbound_"+stat.mediaType+"_"+stat.ssrc;var metrics={bytesReceived:(stat.bytesReceived-_this.stats.inbound[stat.mediaType].bytesReceived)/_this.statsInterval,jitter:stat.googJitterBufferMs,packetsReceived:(stat.packetsReceived-_this.stats.inbound[stat.mediaType].packetsReceived)/_this.statsInterval,packetsLost:(stat.packetsLost-_this.stats.inbound[stat.mediaType].packetsLost)/_this.statsInterval};var units={bytesReceived:"bytes",jitter:"ms",packetsReceived:"packets",packetsLost:"packets"};if(stat.mediaType==="video"){metrics["framesDecoded"]=(stat.framesDecoded-_this.stats.inbound.video.framesDecoded)/_this.statsInterval;metrics["nackCount"]=(stat.googNacksSent-_this.stats.inbound.video.nackCount)/_this.statsInterval;units["framesDecoded"]="frames";units["nackCount"]="packets";_this.stats.inbound.video.framesDecoded=stat.framesDecoded;_this.stats.inbound.video.nackCount=stat.googNacksSent}_this.stats.inbound[stat.mediaType].bytesReceived=stat.bytesReceived;_this.stats.inbound[stat.mediaType].packetsReceived=stat.packetsReceived;_this.stats.inbound[stat.mediaType].packetsLost=stat.packetsLost;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}else if("bytesSent"in stat){var metricId="webrtc_outbound_"+stat.mediaType+"_"+stat.ssrc;var metrics={bytesSent:(stat.bytesSent-_this.stats.outbound[stat.mediaType].bytesSent)/_this.statsInterval,packetsSent:(stat.packetsSent-_this.stats.outbound[stat.mediaType].packetsSent)/_this.statsInterval};var units={bytesSent:"bytes",packetsSent:"packets"};if(stat.mediaType==="video"){metrics["framesEncoded"]=(stat.framesEncoded-_this.stats.outbound.video.framesEncoded)/_this.statsInterval;units["framesEncoded"]="frames";_this.stats.outbound.video.framesEncoded=stat.framesEncoded}_this.stats.outbound[stat.mediaType].bytesSent=stat.bytesSent;_this.stats.outbound[stat.mediaType].packetsSent=stat.packetsSent;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}}}}};this.getStatsAgnostic(this.stream.getRTCPeerConnection(),f,function(error){console.log(error)})};WebRtcStats.prototype.standardizeReport=function(response){if(platform.name.indexOf("Firefox")!==-1){return response}var standardReport={};response.result().forEach(function(report){var standardStats={id:report.id,timestamp:report.timestamp,type:report.type};report.names().forEach(function(name){standardStats[name]=report.stat(name)});standardReport[standardStats.id]=standardStats});return standardReport};WebRtcStats.prototype.getStatsAgnostic=function(pc,successCb,failureCb){var _this=this;if(platform.name.indexOf("Firefox")!==-1){return pc.getStats(null,function(response){var report=_this.standardizeReport(response);successCb(report)},failureCb)}else if(platform.name.indexOf("Chrome")!==-1){return pc.getStats(function(response){var report=_this.standardizeReport(response);successCb(report)},null,failureCb)}};return WebRtcStats}();exports.WebRtcStats=WebRtcStats},{platform:9}],60:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var OpenVidu_1=require("./OpenVidu/OpenVidu");exports.OpenVidu=OpenVidu_1.OpenVidu;var Session_1=require("./OpenVidu/Session");exports.Session=Session_1.Session;var Publisher_1=require("./OpenVidu/Publisher");exports.Publisher=Publisher_1.Publisher;var Subscriber_1=require("./OpenVidu/Subscriber");exports.Subscriber=Subscriber_1.Subscriber;var Stream_1=require("./OpenVidu/Stream");exports.Stream=Stream_1.Stream;var Connection_1=require("./OpenVidu/Connection");exports.Connection=Connection_1.Connection;var LocalRecorder_1=require("./OpenVidu/LocalRecorder");exports.LocalRecorder=LocalRecorder_1.LocalRecorder},{"./OpenVidu/Connection":27,"./OpenVidu/LocalRecorder":28,"./OpenVidu/OpenVidu":29,"./OpenVidu/Publisher":30,"./OpenVidu/Session":31,"./OpenVidu/Stream":32,"./OpenVidu/Subscriber":33}]},{},[26]); \ No newline at end of file +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i1)er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Unhandled "error" event. ('+er+")");err.context=er;throw err}return false}handler=events[type];if(!handler)return false;var isFn=typeof handler==="function";len=arguments.length;switch(len){case 1:emitNone(handler,isFn,this);break;case 2:emitOne(handler,isFn,this,arguments[1]);break;case 3:emitTwo(handler,isFn,this,arguments[1],arguments[2]);break;case 4:emitThree(handler,isFn,this,arguments[1],arguments[2],arguments[3]);break;default:args=new Array(len-1);for(i=1;i0&&existing.length>m){existing.warned=true;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+' "'+String(type)+'" listeners '+"added. Use emitter.setMaxListeners() to "+"increase limit.");w.name="MaxListenersExceededWarning";w.emitter=target;w.type=type;w.count=existing.length;if(typeof console==="object"&&console.warn){console.warn("%s: %s",w.name,w.message)}}}}return target}EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,true)};function onceWrapper(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;switch(arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:var args=new Array(arguments.length);for(var i=0;i=0;i--){if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener;position=i;break}}if(position<0)return this;if(position===0)list.shift();else spliceOne(list,position);if(list.length===1)events[type]=list[0];if(events.removeListener)this.emit("removeListener",type,originalListener||listener)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;events=this._events;if(!events)return this;if(!events.removeListener){if(arguments.length===0){this._events=objectCreate(null);this._eventsCount=0}else if(events[type]){if(--this._eventsCount===0)this._events=objectCreate(null);else delete events[type]}return this}if(arguments.length===0){var keys=objectKeys(events);var key;for(i=0;i=0;i--){this.removeListener(type,listeners[i])}}return this};EventEmitter.prototype.listeners=function listeners(type){var evlistener;var ret;var events=this._events;if(!events)ret=[];else{evlistener=events[type];if(!evlistener)ret=[];else if(typeof evlistener==="function")ret=[evlistener.listener||evlistener];else ret=unwrapListeners(evlistener)}return ret};EventEmitter.listenerCount=function(emitter,type){if(typeof emitter.listenerCount==="function"){return emitter.listenerCount(type)}else{return listenerCount.call(emitter,type)}};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(type){var events=this._events;if(events){var evlistener=events[type];if(typeof evlistener==="function"){return 1}else if(evlistener){return evlistener.length}}return 0}EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;kmaxVolume&&fftBins[i]<0){maxVolume=fftBins[i]}}return maxVolume}var audioContextType;if(typeof window!=="undefined"){audioContextType=window.AudioContext||window.webkitAudioContext}var audioContext=null;module.exports=function(stream,options){var harker=new WildEmitter;if(!audioContextType)return harker;var options=options||{},smoothing=options.smoothing||.1,interval=options.interval||50,threshold=options.threshold,play=options.play,history=options.history||10,running=true;if(!audioContext){audioContext=new audioContextType}var sourceNode,fftBins,analyser;analyser=audioContext.createAnalyser();analyser.fftSize=512;analyser.smoothingTimeConstant=smoothing;fftBins=new Float32Array(analyser.frequencyBinCount);if(stream.jquery)stream=stream[0];if(stream instanceof HTMLAudioElement||stream instanceof HTMLVideoElement){sourceNode=audioContext.createMediaElementSource(stream);if(typeof play==="undefined")play=true;threshold=threshold||-50}else{sourceNode=audioContext.createMediaStreamSource(stream);threshold=threshold||-50}sourceNode.connect(analyser);if(play)analyser.connect(audioContext.destination);harker.speaking=false;harker.suspend=function(){audioContext.suspend()};harker.resume=function(){audioContext.resume()};Object.defineProperty(harker,"state",{get:function(){return audioContext.state}});audioContext.onstatechange=function(){harker.emit("state_change",audioContext.state)};harker.setThreshold=function(t){threshold=t};harker.setInterval=function(i){interval=i};harker.stop=function(){running=false;harker.emit("volume_change",-100,threshold);if(harker.speaking){harker.speaking=false;harker.emit("stopped_speaking")}analyser.disconnect();sourceNode.disconnect()};harker.speakingHistory=[];for(var i=0;ithreshold&&!harker.speaking){for(var i=harker.speakingHistory.length-3;i=2){harker.speaking=true;harker.emit("speaking")}}else if(currentVolumethreshold));looper()},interval)};looper();return harker}},{wildemitter:24}],6:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],7:[function(require,module,exports){(function(isNode){var Public=function(clone){return merge(clone===true,false,arguments)},publicName="merge";Public.recursive=function(clone){return merge(clone===true,true,arguments)};Public.clone=function(input){var output=input,type=typeOf(input),index,size;if(type==="array"){output=[];size=input.length;for(index=0;index1){url=parts[1];parts=parts[0].split(":");output.username=parts[0];output.credential=(input||{}).credential||parts[1]||""}output.url=protocol+url;output.urls=[output.url];return output}},{}],9:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={function:true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var maxSafeInteger=Math.pow(2,53)-1;var reOpera=/\bOpera/;var thisBinding=this;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var toString=objectProto.toString;function capitalize(string){string=String(string);return string.charAt(0).toUpperCase()+string.slice(1)}function cleanupOS(os,pattern,label){var data={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};if(pattern&&label&&/^Win/i.test(os)&&!/^Windows Phone /i.test(os)&&(data=data[/[\d.]+$/.exec(os)])){os="Windows "+data}os=String(os);if(pattern&&label){os=os.replace(RegExp(pattern,"i"),label)}os=format(os.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]);return os}function each(object,callback){var index=-1,length=object?object.length:0;if(typeof length=="number"&&length>-1&&length<=maxSafeInteger){while(++index3&&"WebKit"||/\bOpera\b/.test(name)&&(/\bOPR\b/.test(ua)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(ua)&&!/^(?:Trident|EdgeHTML)$/.test(layout)&&"WebKit"||!layout&&/\bMSIE\b/i.test(ua)&&(os=="Mac OS"?"Tasman":"Trident")||layout=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(name)&&"NetFront"){layout=[data]}if(name=="IE"&&(data=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua)||0)[1])){name+=" Mobile";os="Windows Phone "+(/\+$/.test(data)?data:data+".x");description.unshift("desktop mode")}else if(/\bWPDesktop\b/i.test(ua)){name="IE Mobile";os="Windows Phone 8.x";description.unshift("desktop mode");version||(version=(/\brv:([\d.]+)/.exec(ua)||0)[1])}else if(name!="IE"&&layout=="Trident"&&(data=/\brv:([\d.]+)/.exec(ua))){if(name){description.push("identifying as "+name+(version?" "+version:""))}name="IE";version=data[1]}if(useFeatures){if(isHostType(context,"global")){if(java){data=java.lang.System;arch=data.getProperty("os.arch");os=os||data.getProperty("os.name")+" "+data.getProperty("os.version")}if(rhino){try{version=context.require("ringo/engine").version.join(".");name="RingoJS"}catch(e){if((data=context.system)&&data.global.system==context.system){name="Narwhal";os||(os=data[0].os||null)}}if(!name){name="Rhino"}}else if(typeof context.process=="object"&&!context.process.browser&&(data=context.process)){if(typeof data.versions=="object"){if(typeof data.versions.electron=="string"){description.push("Node "+data.versions.node);name="Electron";version=data.versions.electron}else if(typeof data.versions.nw=="string"){description.push("Chromium "+version,"Node "+data.versions.node);name="NW.js";version=data.versions.nw}}if(!name){name="Node.js";arch=data.arch;os=data.platform;version=/[\d.]+/.exec(data.version);version=version?version[0]:null}}}else if(getClassOf(data=context.runtime)==airRuntimeClass){name="Adobe AIR";os=data.flash.system.Capabilities.os}else if(getClassOf(data=context.phantom)==phantomClass){name="PhantomJS";version=(data=data.version||null)&&data.major+"."+data.minor+"."+data.patch}else if(typeof doc.documentMode=="number"&&(data=/\bTrident\/(\d+)/i.exec(ua))){version=[version,doc.documentMode];if((data=+data[1]+4)!=version[1]){description.push("IE "+version[1]+" mode");layout&&(layout[1]="");version[1]=data}version=name=="IE"?String(version[1].toFixed(1)):version[0]}else if(typeof doc.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(name)){description.push("masking as "+name+" "+version);name="IE";version="11.0";layout=["Trident"];os="Windows"}os=os&&format(os)}if(version&&(data=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version)||/(?:alpha|beta)(?: ?\d)?/i.exec(ua+";"+(useFeatures&&nav.appMinorVersion))||/\bMinefield\b/i.test(ua)&&"a")){prerelease=/b/i.test(data)?"beta":"alpha";version=version.replace(RegExp(data+"\\+?$"),"")+(prerelease=="beta"?beta:alpha)+(/\d+\+?/.exec(data)||"")}if(name=="Fennec"||name=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(os)){name="Firefox Mobile"}else if(name=="Maxthon"&&version){version=version.replace(/\.[\d.]+/,".x")}else if(/\bXbox\b/i.test(product)){if(product=="Xbox 360"){os=null}if(product=="Xbox 360"&&/\bIEMobile\b/.test(ua)){description.unshift("mobile mode")}}else if((/^(?:Chrome|IE|Opera)$/.test(name)||name&&!product&&!/Browser|Mobi/.test(name))&&(os=="Windows CE"||/Mobi/i.test(ua))){name+=" Mobile"}else if(name=="IE"&&useFeatures){try{if(context.external===null){description.unshift("platform preview")}}catch(e){description.unshift("embedded")}}else if((/\bBlackBerry\b/.test(product)||/\bBB10\b/.test(ua))&&(data=(RegExp(product.replace(/ +/g," *")+"/([.\\d]+)","i").exec(ua)||0)[1]||version)){data=[data,/BB10/.test(ua)];os=(data[1]?(product=null,manufacturer="BlackBerry"):"Device Software")+" "+data[0];version=null}else if(this!=forOwn&&product!="Wii"&&(useFeatures&&opera||/Opera/.test(name)&&/\b(?:MSIE|Firefox)\b/i.test(ua)||name=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(os)||name=="IE"&&(os&&!/^Win/.test(os)&&version>5.5||/\bWindows XP\b/.test(os)&&version>8||version==8&&!/\bTrident\b/.test(ua)))&&!reOpera.test(data=parse.call(forOwn,ua.replace(reOpera,"")+";"))&&data.name){data="ing as "+data.name+((data=data.version)?" "+data:"");if(reOpera.test(name)){if(/\bIE\b/.test(data)&&os=="Mac OS"){os=null}data="identify"+data}else{data="mask"+data;if(operaClass){name=format(operaClass.replace(/([a-z])([A-Z])/g,"$1 $2"))}else{name="Opera"}if(/\bIE\b/.test(data)){os=null}if(!useFeatures){version=null}}layout=["Presto"];description.push(data)}if(data=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua)||0)[1]){data=[parseFloat(data.replace(/\.(\d)$/,".0$1")),data];if(name=="Safari"&&data[1].slice(-1)=="+"){name="WebKit Nightly";prerelease="alpha";version=data[1].slice(0,-1)}else if(version==data[1]||version==(data[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ua)||0)[1])){version=null}data[1]=(/\bChrome\/([\d.]+)/i.exec(ua)||0)[1];if(data[0]==537.36&&data[2]==537.36&&parseFloat(data[1])>=28&&layout=="WebKit"){layout=["Blink"]}if(!useFeatures||!likeChrome&&!data[1]){layout&&(layout[1]="like Safari");data=(data=data[0],data<400?1:data<500?2:data<526?3:data<533?4:data<534?"4+":data<535?5:data<537?6:data<538?7:data<601?8:"8")}else{layout&&(layout[1]="like Chrome");data=data[1]||(data=data[0],data<530?1:data<532?2:data<532.05?3:data<533?4:data<534.03?5:data<534.07?6:data<534.1?7:data<534.13?8:data<534.16?9:data<534.24?10:data<534.3?11:data<535.01?12:data<535.02?"13+":data<535.07?15:data<535.11?16:data<535.19?17:data<536.05?18:data<536.1?19:data<537.01?20:data<537.11?"21+":data<537.13?23:data<537.18?24:data<537.24?25:data<537.36?26:layout!="Blink"?"27":"28")}layout&&(layout[1]+=" "+(data+=typeof data=="number"?".x":/[.+]/.test(data)?"":"+"));if(name=="Safari"&&(!version||parseInt(version)>45)){version=data}}if(name=="Opera"&&(data=/\bzbov|zvav$/.exec(os))){name+=" ";description.unshift("desktop mode");if(data=="zvav"){name+="Mini";version=null}else{name+="Mobile"}os=os.replace(RegExp(" *"+data+"$"),"")}else if(name=="Safari"&&/\bChrome\b/.exec(layout&&layout[1])){description.unshift("desktop mode");name="Chrome Mobile";version=null;if(/\bOS X\b/.test(os)){manufacturer="Apple";os="iOS 4.3+"}else{os=null}}if(version&&version.indexOf(data=/[\d.]+$/.exec(os))==0&&ua.indexOf("/"+data+"-")>-1){os=trim(os.replace(data,""))}if(layout&&!/\b(?:Avant|Nook)\b/.test(name)&&(/Browser|Lunascape|Maxthon/.test(name)||name!="Safari"&&/^iOS/.test(os)&&/\bSafari\b/.test(layout[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name)&&layout[1])){(data=layout[layout.length-1])&&description.push(data)}if(description.length){description=["("+description.join("; ")+")"]}if(manufacturer&&product&&product.indexOf(manufacturer)<0){description.push("on "+manufacturer)}if(product){description.push((/^on /.test(description[description.length-1])?"":"on ")+product)}if(os){data=/ ([\d.+]+)$/.exec(os);isSpecialCasedOS=data&&os.charAt(os.length-data[0].length-1)=="/";os={architecture:32,family:data&&!isSpecialCasedOS?os.replace(data[0],""):os,version:data?data[1]:null,toString:function(){var version=this.version;return this.family+(version&&!isSpecialCasedOS?" "+version:"")+(this.architecture==64?" 64-bit":"")}}}if((data=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch))&&!/\bi686\b/i.test(arch)){if(os){os.architecture=64;os.family=os.family.replace(RegExp(" *"+data),"")}if(name&&(/\bWOW64\b/i.test(ua)||useFeatures&&/\w(?:86|32)$/.test(nav.cpuClass||nav.platform)&&!/\bWin64; x64\b/i.test(ua))){description.unshift("32-bit")}}else if(os&&/^OS X/.test(os.family)&&name=="Chrome"&&parseFloat(version)>=39){os.architecture=64}ua||(ua=null);var platform={};platform.description=ua;platform.layout=layout&&layout[0];platform.manufacturer=manufacturer;platform.name=name;platform.prerelease=prerelease;platform.product=product;platform.ua=ua;platform.version=name&&version;platform.os=os||{architecture:null,family:null,version:null,toString:function(){return"null"}};platform.parse=parse;platform.toString=toStringPlatform;if(platform.version){description.unshift(version)}if(platform.name){description.unshift(name)}if(os&&name&&!(os==String(os).split(" ")[0]&&(os==name.split(" ")[0]||product))){description.push(product?"("+os+")":"on "+os)}if(description.length){platform.description=description.join(" ")}return platform}var platform=parse();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){root.platform=platform;define(function(){return platform})}else if(freeExports&&freeModule){forOwn(platform,function(value,key){freeExports[key]=value})}else{root.platform=platform}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],10:[function(require,module,exports){var grammar=module.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(o){return o.encoding?"rtpmap:%d %s/%s/%s":o.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(o){return o.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(o){return o.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["value","uri","config"],format:function(o){return o.config!=null?"extmap:%s %s %s":"extmap:%s %s"}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(o){return o.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation"],format:function(o){var str="candidate:%s %d %s %d %s %d typ %s";str+=o.raddr!=null?" raddr %s rport %d":"%v%v";str+=o.tcptype!=null?" tcptype %s":"%v";if(o.generation!=null){str+=" generation %d"}return str}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_]*):(.*)/,names:["id","attribute","value"],format:"ssrc:%d %s:%s"},{push:"ssrcGroups",reg:/^ssrc-group:(\w*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{push:"invalid",names:["value"]}]};Object.keys(grammar).forEach(function(key){var objs=grammar[key];objs.forEach(function(obj){if(!obj.reg){obj.reg=/(.*)/}if(!obj.format){obj.format="%s"}})})},{}],11:[function(require,module,exports){var parser=require("./parser");var writer=require("./writer");exports.write=writer;exports.parse=parser.parse;exports.parseFmtpConfig=parser.parseFmtpConfig;exports.parsePayloads=parser.parsePayloads;exports.parseRemoteCandidates=parser.parseRemoteCandidates},{"./parser":12,"./writer":13}],12:[function(require,module,exports){var toIntIfInt=function(v){return String(Number(v))===v?Number(v):v};var attachProperties=function(match,location,names,rawName){if(rawName&&!names){location[rawName]=toIntIfInt(match[1])}else{for(var i=0;i=len){return x}var arg=args[i];i+=1;switch(x){case"%%":return"%";case"%s":return String(arg);case"%d":return Number(arg);case"%v":return""}})};var makeLine=function(type,obj,location){var str=obj.format instanceof Function?obj.format(obj.push?location:location[obj.name]):obj.format;var args=[type+"="+str];if(obj.names){for(var i=0;i3||!session.media.every(function(m){return["video","audio","data"].indexOf(m.mid)!==-1})){console.warn("This description does not look like Plan B.");return desc}var mids=[];session.media.forEach(function(m){mids.push(m.mid)});var hasBundle=false;if(typeof session.groups!=="undefined"&&Array.isArray(session.groups)){hasBundle=session.groups.every(function(g){return g.type!=="BUNDLE"||arrayEquals.apply(g.mids.sort(),[mids.sort()])})}if(!hasBundle){var mustBeBundle=false;session.media.forEach(function(m){if(m.direction!=="inactive"){mustBeBundle=true}});if(mustBeBundle){throw new Error("Cannot convert to Unified Plan because m-lines that"+" are not bundled were found.")}}var type;if(desc.type==="answer"){type="offer"}else if(desc.type==="offer"){type="answer"}else{throw new Error("Type '"+desc.type+"' not supported.")}var cached;if(typeof this.cache[type]!=="undefined"){cached=transform.parse(this.cache[type])}var recvonlySsrcs={audio:{},video:{}};var mid2ul={};var bIdx=0;var uIdx=0;var sources2ul={};var candidates;var iceUfrag;var icePwd;var fingerprint;var payloads={};var rtcpFb={};var rtp={};session.media.forEach(function(bLine){if((typeof bLine.rtcpMux!=="string"||bLine.rtcpMux!=="rtcp-mux")&&bLine.direction!=="inactive"){throw new Error("Cannot convert to Unified Plan because m-lines "+"without the rtcp-mux attribute were found.")}if(bLine.type==="application"){mid2ul[bLine.mid]=bLine;return}var sources=bLine.sources;var ssrcGroups=bLine.ssrcGroups;var port=bLine.port;if(typeof bLine.candidates!="undefined"){if(typeof candidates!="undefined"){candidates=candidates.concat(bLine.candidates)}else{candidates=bLine.candidates}}if(typeof iceUfrag!="undefined"&&typeof bLine.iceUfrag!="undefined"&&iceUfrag!=bLine.iceUfrag){throw new Error("Only BUNDLE supported, iceUfrag must be the same for all m-lines.\n"+"\tLast iceUfrag: "+iceUfrag+"\n"+"\tNew iceUfrag: "+bLine.iceUfrag)}if(typeof bLine.iceUfrag!="undefined"){iceUfrag=bLine.iceUfrag}if(typeof icePwd!="undefined"&&typeof bLine.icePwd!="undefined"&&icePwd!=bLine.icePwd){throw new Error("Only BUNDLE supported, icePwd must be the same for all m-lines.\n"+"\tLast icePwd: "+icePwd+"\n"+"\tNew icePwd: "+bLine.icePwd)}if(typeof bLine.icePwd!="undefined"){icePwd=bLine.icePwd}if(typeof fingerprint!="undefined"&&typeof bLine.fingerprint!="undefined"&&(fingerprint.type!=bLine.fingerprint.type||fingerprint.hash!=bLine.fingerprint.hash)){throw new Error("Only BUNDLE supported, fingerprint must be the same for all m-lines.\n"+"\tLast fingerprint: "+JSON.stringify(fingerprint)+"\n"+"\tNew fingerprint: "+JSON.stringify(bLine.fingerprint))}if(typeof bLine.fingerprint!="undefined"){fingerprint=bLine.fingerprint}payloads[bLine.type]=bLine.payloads;rtcpFb[bLine.type]=bLine.rtcpFb;rtp[bLine.type]=bLine.rtp;var ssrc2group={};if(typeof ssrcGroups!=="undefined"&&Array.isArray(ssrcGroups)){ssrcGroups.forEach(function(ssrcGroup){if(typeof ssrcGroup.ssrcs!=="undefined"&&Array.isArray(ssrcGroup.ssrcs)){ssrcGroup.ssrcs.forEach(function(ssrc){if(typeof ssrc2group[ssrc]==="undefined"){ssrc2group[ssrc]=[]}ssrc2group[ssrc].push(ssrcGroup)})}})}var ssrc2ml={};if(typeof sources==="object"){delete bLine.sources;delete bLine.ssrcGroups;delete bLine.candidates;delete bLine.iceUfrag;delete bLine.icePwd;delete bLine.fingerprint;delete bLine.port;delete bLine.mid;Object.keys(sources).forEach(function(ssrc){var uLine;if(desc.type==="offer"){if(!sources[ssrc].msid){recvonlySsrcs[bLine.type][ssrc]=sources[ssrc];return}}if(typeof ssrc2group[ssrc]!=="undefined"&&Array.isArray(ssrc2group[ssrc])){ssrc2group[ssrc].some(function(ssrcGroup){return ssrcGroup.ssrcs.some(function(related){if(typeof ssrc2ml[related]==="object"){uLine=ssrc2ml[related];return true}})})}if(typeof uLine==="object"){uLine.sources[ssrc]=sources[ssrc];delete sources[ssrc].msid}else{uLine=Object.create(bLine);ssrc2ml[ssrc]=uLine;if(typeof sources[ssrc].msid!=="undefined"){uLine.msid=sources[ssrc].msid;delete sources[ssrc].msid}uLine.sources={};uLine.sources[ssrc]=sources[ssrc];uLine.ssrcGroups=ssrc2group[ssrc];if(typeof cached!=="undefined"&&typeof cached.media!=="undefined"&&Array.isArray(cached.media)){cached.media.forEach(function(m){if(typeof m.sources==="object"){Object.keys(m.sources).forEach(function(s){if(s===ssrc){uLine.mid=m.mid}})}})}if(typeof uLine.mid==="undefined"){uLine.mid=[bLine.type,"-",ssrc].join("")}uLine.candidates=candidates;uLine.iceUfrag=iceUfrag;uLine.icePwd=icePwd;uLine.fingerprint=fingerprint;uLine.port=port;mid2ul[uLine.mid]=uLine;sources2ul[uIdx]=uLine.sources;self.cache.mlU2BMap[uIdx]=bIdx;if(typeof self.cache.mlB2UMap[bIdx]==="undefined"){self.cache.mlB2UMap[bIdx]=uIdx}uIdx++}})}else{var uLine=bLine;uLine.candidates=candidates;uLine.iceUfrag=iceUfrag;uLine.icePwd=icePwd;uLine.fingerprint=fingerprint;uLine.port=port;mid2ul[uLine.mid]=uLine;self.cache.mlU2BMap[uIdx]=bIdx;if(typeof self.cache.mlB2UMap[bIdx]==="undefined"){self.cache.mlB2UMap[bIdx]=uIdx}}bIdx++});session.media=[];mids=[];if(desc.type==="answer"){for(var i=0;i0){idx=self.getFirstSendingIndexFromAnswer(type);if(idx===null){for(var i=0;iidx){var mLine=session.media[idx];Object.keys(recvonlySsrcs[type]).forEach(function(ssrc){if(mLine.sources&&mLine.sources[ssrc]){console.warn("Replacing an existing SSRC.")}if(!mLine.sources){mLine.sources={}}mLine.sources[ssrc]=recvonlySsrcs[type][ssrc]})}});if(typeof session.groups!=="undefined"){session.groups.some(function(group){if(group.type==="BUNDLE"){group.mids=mids.join(" ");return true}})}session.msidSemantic={semantic:"WMS",token:"*"};var resStr=transform.write(session);this.cache[desc.type]=resStr;return new RTCSessionDescription({type:desc.type,sdp:resStr})}},{"./array-equals":14,"./transform":17}],17:[function(require,module,exports){var transform=require("sdp-transform");exports.write=function(session,opts){if(typeof session!=="undefined"&&typeof session.media!=="undefined"&&Array.isArray(session.media)){session.media.forEach(function(mLine){if(typeof mLine.sources!=="undefined"&&Object.keys(mLine.sources).length!==0){mLine.ssrcs=[];Object.keys(mLine.sources).forEach(function(ssrc){var source=mLine.sources[ssrc];Object.keys(source).forEach(function(attribute){mLine.ssrcs.push({id:ssrc,attribute:attribute,value:source[attribute]})})});delete mLine.sources}if(typeof mLine.ssrcGroups!=="undefined"&&Array.isArray(mLine.ssrcGroups)){mLine.ssrcGroups.forEach(function(ssrcGroup){if(typeof ssrcGroup.ssrcs!=="undefined"&&Array.isArray(ssrcGroup.ssrcs)){ssrcGroup.ssrcs=ssrcGroup.ssrcs.join(" ")}})}})}if(typeof session!=="undefined"&&typeof session.groups!=="undefined"&&Array.isArray(session.groups)){session.groups.forEach(function(g){if(typeof g.mids!=="undefined"&&Array.isArray(g.mids)){g.mids=g.mids.join(" ")}})}return transform.write(session,opts)};exports.parse=function(sdp){var session=transform.parse(sdp);if(typeof session!=="undefined"&&typeof session.media!=="undefined"&&Array.isArray(session.media)){session.media.forEach(function(mLine){if(typeof mLine.ssrcs!=="undefined"&&Array.isArray(mLine.ssrcs)){mLine.sources={};mLine.ssrcs.forEach(function(ssrc){if(!mLine.sources[ssrc.id])mLine.sources[ssrc.id]={};mLine.sources[ssrc.id][ssrc.attribute]=ssrc.value});delete mLine.ssrcs}if(typeof mLine.ssrcGroups!=="undefined"&&Array.isArray(mLine.ssrcGroups)){mLine.ssrcGroups.forEach(function(ssrcGroup){if(typeof ssrcGroup.ssrcs==="string"){ssrcGroup.ssrcs=ssrcGroup.ssrcs.split(" ")}})}})}if(typeof session!=="undefined"&&typeof session.groups!=="undefined"&&Array.isArray(session.groups)){session.groups.forEach(function(g){if(typeof g.mids==="string"){g.mids=g.mids.split(" ")}})}return session}},{"sdp-transform":11}],18:[function(require,module,exports){(function(window,undefined){"use strict";var LIBVERSION="0.7.17",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded";var util={extend:function(regexes,extensions){var margedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){margedRegexes[i]=extensions[i].concat(regexes[i])}else{margedRegexes[i]=regexes[i]}}return margedRegexes},has:function(str1,str2){if(typeof str1==="string"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}else{return false}},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,"").split(".")[0]:undefined},trim:function(str){return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j>>((i&3)<<3)&255}return rnds}}},{}],22:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=rng();if(node==null){node=_nodeId=[seedBytes[0]|1,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]]}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&16383}}var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf?buf:bytesToUuid(b)}module.exports=v1},{"./lib/bytesToUuid":20,"./lib/rng":21}],23:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options==="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":20,"./lib/rng":21}],24:[function(require,module,exports){module.exports=WildEmitter;function WildEmitter(){}WildEmitter.mixin=function(constructor){var prototype=constructor.prototype||constructor;prototype.isWildEmitter=true;prototype.on=function(event,groupName,fn){this.callbacks=this.callbacks||{};var hasGroup=arguments.length===3,group=hasGroup?arguments[1]:undefined,func=hasGroup?arguments[2]:arguments[1];func._groupName=group;(this.callbacks[event]=this.callbacks[event]||[]).push(func);return this};prototype.once=function(event,groupName,fn){var self=this,hasGroup=arguments.length===3,group=hasGroup?arguments[1]:undefined,func=hasGroup?arguments[2]:arguments[1];function on(){self.off(event,on);func.apply(this,arguments)}this.on(event,group,on);return this};prototype.releaseGroup=function(groupName){this.callbacks=this.callbacks||{};var item,i,len,handlers;for(item in this.callbacks){handlers=this.callbacks[item];for(i=0,len=handlers.length;i0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.on("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}if(type==="remoteVideoPlaying"){var video=this.stream.getVideoElement();if(this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"remoteVideoPlaying")])}else{this.stream.on("remote-video-is-playing",function(element){_this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"remoteVideoPlaying")])})}}if(type==="accessAllowed"){if(this.stream.accessIsAllowed){this.ee.emitEvent("accessAllowed")}}if(type==="accessDenied"){if(this.stream.accessIsDenied){this.ee.emitEvent("accessDenied")}}return this};Publisher.prototype.once=function(type,handler){var _this=this;this.ee.once(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Publisher'",event)}else{console.info("Event '"+type+"' triggered by 'Publisher'")}handler(event)});if(type==="streamCreated"){if(!!this.stream&&this.stream.isPublisherPublished){this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,this,"streamCreated",this.stream,"")])}else{this.stream.once("stream-created-by-publisher",function(){_this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,_this,"streamCreated",_this.stream,"")])})}}if(type==="videoElementCreated"){if(!!this.stream&&this.stream.isVideoELementCreated){this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoElementCreated")])}else{this.stream.once("video-element-created-by-stream",function(element){_this.id=element.id;_this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoElementCreated")])})}}if(type==="videoPlaying"){var video=this.stream.getVideoElement();if(!this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.once("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}if(type==="remoteVideoPlaying"){var video=this.stream.getVideoElement();if(this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"remoteVideoPlaying")])}else{this.stream.once("remote-video-is-playing",function(element){_this.ee.emitEvent("remoteVideoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"remoteVideoPlaying")])})}}if(type==="accessAllowed"){if(this.stream.accessIsAllowed){this.ee.emitEvent("accessAllowed")}}if(type==="accessDenied"){if(this.stream.accessIsDenied){this.ee.emitEvent("accessDenied")}}return this};Publisher.prototype.off=function(type,handler){if(!handler){this.ee.removeAllListeners(type)}else{this.ee.off(type,handler)}return this};Publisher.prototype.initialize=function(){var _this=this;return new Promise(function(resolve,reject){var errorCallback=function(openViduError){_this.stream.accessIsDenied=true;_this.stream.accessIsAllowed=false;reject(openViduError)};var successCallback=function(mediaStream){_this.stream.accessIsAllowed=true;_this.stream.accessIsDenied=false;if(_this.openvidu.isMediaStreamTrack(_this.properties.audioSource)){mediaStream.removeTrack(mediaStream.getAudioTracks()[0]);mediaStream.addTrack(_this.properties.audioSource)}if(_this.openvidu.isMediaStreamTrack(_this.properties.videoSource)){mediaStream.removeTrack(mediaStream.getVideoTracks()[0]);mediaStream.addTrack(_this.properties.videoSource)}if(!!mediaStream.getAudioTracks()[0]){mediaStream.getAudioTracks()[0].enabled=!!_this.stream.outboundStreamOpts.publisherProperties.publishAudio}if(!!mediaStream.getVideoTracks()[0]){mediaStream.getVideoTracks()[0].enabled=!!_this.stream.outboundStreamOpts.publisherProperties.publishVideo}_this.stream.setMediaStream(mediaStream);_this.stream.insertVideo(_this.element,_this.properties.insertMode);resolve()};_this.openvidu.generateMediaConstraints(_this.properties).then(function(constraints){var outboundStreamOptions={mediaConstraints:constraints,publisherProperties:_this.properties};_this.stream.setOutboundStreamOptions(outboundStreamOptions);var constraintsAux={};var timeForDialogEvent=1250;if(_this.stream.isSendVideo()){constraintsAux.audio=false;constraintsAux.video=constraints.video;var startTime_1=Date.now();_this.setPermissionDialogTimer(timeForDialogEvent);navigator.mediaDevices.getUserMedia(constraintsAux).then(function(videoOnlyStream){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);if(_this.stream.isSendAudio()){constraintsAux.audio=constraints.audio===undefined?true:constraints.audio;constraintsAux.video=false;startTime_1=Date.now();_this.setPermissionDialogTimer(timeForDialogEvent);navigator.mediaDevices.getUserMedia(constraintsAux).then(function(audioOnlyStream){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);videoOnlyStream.addTrack(audioOnlyStream.getAudioTracks()[0]);successCallback(videoOnlyStream)}).catch(function(error){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);videoOnlyStream.getVideoTracks().forEach(function(track){track.stop()});var errorName;var errorMessage;switch(error.name.toLowerCase()){case"notfounderror":errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage=error.toString();break;case"notallowederror":errorName=OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;errorMessage=error.toString();break;case"overconstrainederror":if(error.constraint.toLowerCase()==="deviceid"){errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage="Audio input device with deviceId '"+constraints.audio.deviceId.exact+"' not found"}else{errorName=OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;errorMessage="Audio input device doesn't support the value passed for constraint '"+error.constraint+"'"}}errorCallback(new OpenViduError_1.OpenViduError(errorName,errorMessage))})}else{successCallback(videoOnlyStream)}}).catch(function(error){_this.clearPermissionDialogTimer(startTime_1,timeForDialogEvent);var errorName;var errorMessage;switch(error.name.toLowerCase()){case"notfounderror":errorName=OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;errorMessage=error.toString();break;case"notallowederror":errorName=_this.stream.isSendScreen()?OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED:OpenViduError_1.OpenViduErrorName.CAMERA_ACCESS_DENIED;errorMessage=error.toString();break;case"overconstrainederror":if(error.constraint.toLowerCase()==="deviceid"){errorName=OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;errorMessage="Video input device with deviceId '"+constraints.video.deviceId.exact+"' not found"}else{errorName=OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;errorMessage="Video input device doesn't support the value passed for constraint '"+error.constraint+"'"}}errorCallback(new OpenViduError_1.OpenViduError(errorName,errorMessage))})}else if(_this.stream.isSendAudio()){constraintsAux.audio=constraints.audio===undefined?true:constraints.audio;constraintsAux.video=false;var startTime_2=Date.now();_this.setPermissionDialogTimer(timeForDialogEvent);navigator.mediaDevices.getUserMedia(constraints).then(function(audioOnlyStream){_this.clearPermissionDialogTimer(startTime_2,timeForDialogEvent);successCallback(audioOnlyStream)}).catch(function(error){_this.clearPermissionDialogTimer(startTime_2,timeForDialogEvent);var errorName;var errorMessage;switch(error.name.toLowerCase()){case"notfounderror":errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage=error.toString();break;case"notallowederror":errorName=OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;errorMessage=error.toString();break;case"overconstrainederror":if(error.constraint.toLowerCase()==="deviceid"){errorName=OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;errorMessage="Audio input device with deviceId '"+constraints.audio.deviceId.exact+"' not found"}else{errorName=OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;errorMessage="Audio input device doesn't support the value passed for constraint '"+error.constraint+"'"}}errorCallback(new OpenViduError_1.OpenViduError(errorName,errorMessage))})}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET,"Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'"))}}).catch(function(error){errorCallback(error)})})};Publisher.prototype.updateSession=function(session){this.session=session;this.stream.session=session};Publisher.prototype.emitEvent=function(type,eventArray){this.ee.emitEvent(type,eventArray)};Publisher.prototype.setPermissionDialogTimer=function(waitTime){var _this=this;this.permissionDialogTimeout=setTimeout(function(){_this.ee.emitEvent("accessDialogOpened",[])},waitTime)};Publisher.prototype.clearPermissionDialogTimer=function(startTime,waitTime){clearTimeout(this.permissionDialogTimeout);if(Date.now()-startTime>waitTime){this.ee.emitEvent("accessDialogClosed",[])}};Publisher.prototype.userMediaHasVideo=function(callback){var _this=this;return new Promise(function(resolve,reject){if(typeof _this.properties.videoSource==="string"&&_this.properties.videoSource==="screen"){resolve(true)}else{_this.openvidu.getDevices().then(function(devices){resolve(!!devices.filter(function(device){return device.kind==="videoinput"})[0])}).catch(function(error){reject(error)})}})};Publisher.prototype.userMediaHasAudio=function(callback){var _this=this;return new Promise(function(resolve,reject){_this.openvidu.getDevices().then(function(devices){resolve(!!devices.filter(function(device){return device.kind==="audioinput"})[0])}).catch(function(error){reject(error)})})};return Publisher}();exports.Publisher=Publisher},{"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Events/StreamEvent":43,"../OpenViduInternal/Events/VideoElementEvent":44,"./Stream":32,"wolfy87-eventemitter":25}],31:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Connection_1=require("./Connection");var Subscriber_1=require("./Subscriber");var ConnectionEvent_1=require("../OpenViduInternal/Events/ConnectionEvent");var RecordingEvent_1=require("../OpenViduInternal/Events/RecordingEvent");var SessionDisconnectedEvent_1=require("../OpenViduInternal/Events/SessionDisconnectedEvent");var SignalEvent_1=require("../OpenViduInternal/Events/SignalEvent");var StreamEvent_1=require("../OpenViduInternal/Events/StreamEvent");var OpenViduError_1=require("../OpenViduInternal/Enums/OpenViduError");var VideoInsertMode_1=require("../OpenViduInternal/Enums/VideoInsertMode");var platform=require("platform");var EventEmitter=require("wolfy87-eventemitter");var Session=function(){function Session(openvidu){this.remoteStreamsCreated={};this.remoteConnections={};this.speakingEventsEnabled=false;this.ee=new EventEmitter;this.openvidu=openvidu}Session.prototype.connect=function(token,metadata){var _this=this;return new Promise(function(resolve,reject){_this.processToken(token);if(_this.openvidu.checkSystemRequirements()){_this.options={sessionId:_this.sessionId,participantId:token,metadata:!!metadata?_this.stringClientMetadata(metadata):""};_this.connectAux(token).then(function(){resolve()}).catch(function(error){reject(error)})}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED,"Browser "+platform.name+" "+platform.version+" is not supported in OpenVidu"))}})};Session.prototype.disconnect=function(){this.leave(false,"disconnect")};Session.prototype.subscribe=function(stream,targetElement,param3,param4){var properties={};if(!!param3&&typeof param3!=="function"){properties={insertMode:typeof param3.insertMode!=="undefined"?typeof param3.insertMode==="string"?VideoInsertMode_1.VideoInsertMode[param3.insertMode]:properties.insertMode:VideoInsertMode_1.VideoInsertMode.APPEND,subscribeToAudio:typeof param3.subscribeToAudio!=="undefined"?param3.subscribeToAudio:true,subscribeToVideo:typeof param3.subscribeToVideo!=="undefined"?param3.subscribeToVideo:true}}else{properties={insertMode:VideoInsertMode_1.VideoInsertMode.APPEND,subscribeToAudio:true,subscribeToVideo:true}}var completionHandler;if(!!param3&&typeof param3==="function"){completionHandler=param3}else if(!!param4){completionHandler=param4}console.info("Subscribing to "+stream.connection.connectionId);stream.subscribe().then(function(){console.info("Subscribed correctly to "+stream.connection.connectionId);if(completionHandler!==undefined){completionHandler(undefined)}}).catch(function(error){if(completionHandler!==undefined){completionHandler(error)}});var subscriber=new Subscriber_1.Subscriber(stream,targetElement,properties);stream.insertVideo(subscriber.element,properties.insertMode);return subscriber};Session.prototype.subscribeAsync=function(stream,targetElement,properties){var _this=this;return new Promise(function(resolve,reject){var subscriber;var callback=function(error){if(!!error){reject(error)}else{resolve(subscriber)}};if(!!properties){subscriber=_this.subscribe(stream,targetElement,properties,callback)}else{subscriber=_this.subscribe(stream,targetElement,callback)}})};Session.prototype.unsubscribe=function(subscriber){var connectionId=subscriber.stream.connection.connectionId;console.info("Unsubscribing from "+connectionId);this.openvidu.sendRequest("unsubscribeFromVideo",{sender:subscriber.stream.connection.connectionId},function(error,response){if(error){console.error("Error unsubscribing from "+connectionId,error)}else{console.info("Unsubscribed correctly from "+connectionId)}subscriber.stream.disposeWebRtcPeer();subscriber.stream.disposeMediaStream()});subscriber.stream.removeVideo()};Session.prototype.publish=function(publisher){var _this=this;return new Promise(function(resolve,reject){publisher.session=_this;publisher.stream.session=_this;if(!publisher.stream.isPublisherPublished){_this.connection.addStream(publisher.stream);publisher.stream.publish().then(function(){resolve()}).catch(function(error){reject(error)})}else{publisher.initialize().then(function(){_this.connection.addStream(publisher.stream);publisher.stream.publish().then(function(){resolve()}).catch(function(error){reject(error)})}).catch(function(error){reject(error)})}})};Session.prototype.unpublish=function(publisher){var stream=publisher.stream;if(!stream.connection){console.error("The associated Connection object of this Publisher is null",stream);return}else if(stream.connection!==this.connection){console.error("The associated Connection object of this Publisher is not your local Connection."+"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method",stream);return}else{console.info("Unpublishing local media ("+stream.connection.connectionId+")");this.openvidu.sendRequest("unpublishVideo",function(error,response){if(error){console.error(error)}else{console.info("Media unpublished correctly")}});stream.disposeWebRtcPeer();delete stream.connection.stream;var streamEvent=new StreamEvent_1.StreamEvent(true,publisher,"streamDestroyed",publisher.stream,"unpublish");publisher.emitEvent("streamDestroyed",[streamEvent]);streamEvent.callDefaultBehaviour()}};Session.prototype.signal=function(signal){var _this=this;return new Promise(function(resolve,reject){var signalMessage={};if(signal.to&&signal.to.length>0){var connectionIds_1=[];signal.to.forEach(function(connection){connectionIds_1.push(connection.connectionId)});signalMessage["to"]=connectionIds_1}else{signalMessage["to"]=[]}signalMessage["data"]=signal.data?signal.data:"";signalMessage["type"]=signal.type?signal.type:"";_this.openvidu.sendRequest("sendMessage",{message:JSON.stringify(signalMessage)},function(error,response){if(!!error){reject(error)}else{resolve()}})})};Session.prototype.on=function(type,handler){this.ee.on(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Session'",event)}else{console.info("Event '"+type+"' triggered by 'Session'")}handler(event)});if(type==="publisherStartSpeaking"||type==="publisherStopSpeaking"){this.speakingEventsEnabled=true;for(var connectionId in this.remoteConnections){var str=this.remoteConnections[connectionId].stream;if(!!str&&!str.speechEvent&&str.hasAudio){str.enableSpeakingEvents()}}}return this};Session.prototype.once=function(type,handler){this.ee.once(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Session'",event)}else{console.info("Event '"+type+"' triggered by 'Session'")}handler(event)});if(type==="publisherStartSpeaking"||type==="publisherStopSpeaking"){this.speakingEventsEnabled=true;for(var connectionId in this.remoteConnections){var str=this.remoteConnections[connectionId].stream;if(!!str&&!str.speechEvent&&str.hasAudio){str.enableOnceSpeakingEvents()}}}return this};Session.prototype.off=function(type,handler){if(!handler){this.ee.removeAllListeners(type)}else{this.ee.off(type,handler)}if(type==="publisherStartSpeaking"||type==="publisherStopSpeaking"){this.speakingEventsEnabled=false;for(var connectionId in this.remoteConnections){var str=this.remoteConnections[connectionId].stream;if(!!str&&!!str.speechEvent){str.disableSpeakingEvents()}}}return this};Session.prototype.onParticipantJoined=function(response){var _this=this;this.getConnection(response.id,"").then(function(connection){console.warn("Connection "+response.id+" already exists in connections list")}).catch(function(openViduError){var connection=new Connection_1.Connection(_this,response);_this.remoteConnections[response.id]=connection;_this.ee.emitEvent("connectionCreated",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionCreated",connection,"")])})};Session.prototype.onParticipantLeft=function(msg){var _this=this;this.getRemoteConnection(msg.name,"Remote connection "+msg.name+" unknown when 'onParticipantLeft'. "+"Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(connection){if(!!connection.stream){var stream=connection.stream;var streamEvent=new StreamEvent_1.StreamEvent(true,_this,"streamDestroyed",stream,msg.reason);_this.ee.emitEvent("streamDestroyed",[streamEvent]);streamEvent.callDefaultBehaviour();delete _this.remoteStreamsCreated[stream.streamId]}delete _this.remoteConnections[connection.connectionId];_this.ee.emitEvent("connectionDestroyed",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionDestroyed",connection,msg.reason)])}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.onParticipantPublished=function(response){var _this=this;var afterConnectionFound=function(connection){_this.remoteConnections[connection.connectionId]=connection;if(!_this.remoteStreamsCreated[connection.stream.streamId]){_this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,_this,"streamCreated",connection.stream,"")])}_this.remoteStreamsCreated[connection.stream.streamId]=true};var connection;this.getRemoteConnection(response.id,"Remote connection '"+response.id+"' unknown when 'onParticipantPublished'. "+"Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(con){connection=con;response.metadata=con.data;connection.options=response;connection.initRemoteStreams(response.streams);afterConnectionFound(connection)}).catch(function(openViduError){connection=new Connection_1.Connection(_this,response);afterConnectionFound(connection)})};Session.prototype.onParticipantUnpublished=function(msg){var _this=this;this.getRemoteConnection(msg.name,"Remote connection '"+msg.name+"' unknown when 'onParticipantUnpublished'. "+"Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))).then(function(connection){var streamEvent=new StreamEvent_1.StreamEvent(true,_this,"streamDestroyed",connection.stream,msg.reason);_this.ee.emitEvent("streamDestroyed",[streamEvent]);streamEvent.callDefaultBehaviour();var streamId=connection.stream.streamId;delete _this.remoteStreamsCreated[streamId];connection.removeStream(streamId)}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.onParticipantEvicted=function(msg){};Session.prototype.onNewMessage=function(msg){var _this=this;console.info("New signal: "+JSON.stringify(msg));this.getConnection(msg.from,"Connection '"+msg.from+"' unknow when 'onNewMessage'. Existing remote connections: "+JSON.stringify(Object.keys(this.remoteConnections))+". Existing local connection: "+this.connection.connectionId).then(function(connection){_this.ee.emitEvent("signal",[new SignalEvent_1.SignalEvent(_this,msg.type,msg.data,connection)]);_this.ee.emitEvent("signal:"+msg.type,[new SignalEvent_1.SignalEvent(_this,msg.type,msg.data,connection)])}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.recvIceCandidate=function(msg){var candidate={candidate:msg.candidate,sdpMid:msg.sdpMid,sdpMLineIndex:msg.sdpMLineIndex};this.getConnection(msg.endpointName,"Connection not found for endpoint "+msg.endpointName+". Ice candidate will be ignored: "+candidate).then(function(connection){var stream=connection.stream;stream.getWebRtcPeer().addIceCandidate(candidate,function(error){if(error){console.error("Error adding candidate for "+stream.streamId+" stream of endpoint "+msg.endpointName+": "+error)}})}).catch(function(openViduError){console.error(openViduError)})};Session.prototype.onSessionClosed=function(msg){console.info("Session closed: "+JSON.stringify(msg));var s=msg.room;if(s!==undefined){this.ee.emitEvent("session-closed",[{session:s}])}else{console.warn("Session undefined on session closed",msg)}};Session.prototype.onLostConnection=function(){if(!this.connection){console.warn("Not connected to session: if you are not debugging, this is probably a certificate error");var url="https://"+this.openvidu.getWsUri().split("wss://")[1].split("/openvidu")[0];if(window.confirm('If you are not debugging, this is probably a certificate error at "'+url+'"\n\nClick OK to navigate and accept it')){location.assign(url+"/accept-certificate")}return}console.warn("Lost connection in Session "+this.sessionId);if(!!this.sessionId&&!this.connection.disposed){this.leave(true,"networkDisconnect")}};Session.prototype.onMediaError=function(params){console.error("Media error: "+JSON.stringify(params));var err=params.error;if(err){this.ee.emitEvent("error-media",[{error:err}])}else{console.warn("Received undefined media error. Params:",params)}};Session.prototype.onRecordingStarted=function(response){this.ee.emitEvent("recordingStarted",[new RecordingEvent_1.RecordingEvent(this,"recordingStarted",response.id,response.name)])};Session.prototype.onRecordingStopped=function(response){this.ee.emitEvent("recordingStopped",[new RecordingEvent_1.RecordingEvent(this,"recordingStopped",response.id,response.name)])};Session.prototype.emitEvent=function(type,eventArray){this.ee.emitEvent(type,eventArray)};Session.prototype.leave=function(forced,reason){var _this=this;forced=!!forced;console.info("Leaving Session (forced="+forced+")");if(!!this.connection){if(!this.connection.disposed&&!forced){this.openvidu.sendRequest("leaveRoom",function(error,response){if(error){console.error(error)}_this.openvidu.closeWs()})}else{this.openvidu.closeWs()}if(!!this.connection.stream){this.connection.stream.disposeWebRtcPeer();this.connection.stream.emitEvent("stream-destroyed-by-disconnect",[reason])}if(!this.connection.disposed){var sessionDisconnectEvent=new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this,reason);this.ee.emitEvent("sessionDisconnected",[sessionDisconnectEvent]);sessionDisconnectEvent.callDefaultBehaviour()}}else{console.warn("You were not connected to the session "+this.sessionId)}};Session.prototype.connectAux=function(token){var _this=this;return new Promise(function(resolve,reject){_this.openvidu.startWs(function(error){if(!!error){reject(error)}else{var joinParams={token:!!token?token:"",session:_this.sessionId,metadata:!!_this.options.metadata?_this.options.metadata:"",secret:_this.openvidu.getSecret(),recorder:_this.openvidu.getRecorder()};_this.openvidu.sendRequest("joinRoom",joinParams,function(error,response){if(!!error){reject(error)}else{_this.connection=new Connection_1.Connection(_this);_this.connection.connectionId=response.id;_this.connection.data=response.metadata;var events_1={connections:new Array,streams:new Array};var existingParticipants=response.value;existingParticipants.forEach(function(participant){var connection=new Connection_1.Connection(_this,participant);_this.remoteConnections[connection.connectionId]=connection;events_1.connections.push(connection);if(!!connection.stream){_this.remoteStreamsCreated[connection.stream.streamId]=true;events_1.streams.push(connection.stream)}});_this.ee.emitEvent("connectionCreated",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionCreated",_this.connection,"")]);events_1.connections.forEach(function(connection){_this.ee.emitEvent("connectionCreated",[new ConnectionEvent_1.ConnectionEvent(false,_this,"connectionCreated",connection,"")])});events_1.streams.forEach(function(stream){_this.ee.emitEvent("streamCreated",[new StreamEvent_1.StreamEvent(false,_this,"streamCreated",stream,"")])});resolve()}})}})})};Session.prototype.stringClientMetadata=function(metadata){if(typeof metadata!=="string"){return JSON.stringify(metadata)}else{return metadata}};Session.prototype.getConnection=function(connectionId,errorMessage){var _this=this;return new Promise(function(resolve,reject){var connection=_this.remoteConnections[connectionId];if(!!connection){resolve(connection)}else{if(_this.connection.connectionId===connectionId){resolve(_this.connection)}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR,errorMessage))}}})};Session.prototype.getRemoteConnection=function(connectionId,errorMessage){var _this=this;return new Promise(function(resolve,reject){var connection=_this.remoteConnections[connectionId];if(!!connection){resolve(connection)}else{reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR,errorMessage))}})};Session.prototype.processToken=function(token){var url=new URL(token);this.sessionId=url.searchParams.get("sessionId");var secret=url.searchParams.get("secret");var recorder=url.searchParams.get("recorder");if(!!secret){this.openvidu.secret=secret}if(!!recorder){this.openvidu.recorder=true}this.openvidu.wsUri="wss://"+url.host+"/openvidu"};return Session}();exports.Session=Session},{"../OpenViduInternal/Enums/OpenViduError":35,"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/ConnectionEvent":37,"../OpenViduInternal/Events/RecordingEvent":40,"../OpenViduInternal/Events/SessionDisconnectedEvent":41,"../OpenViduInternal/Events/SignalEvent":42,"../OpenViduInternal/Events/StreamEvent":43,"./Connection":27,"./Subscriber":33,platform:9,"wolfy87-eventemitter":25}],32:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var WebRtcStats_1=require("../OpenViduInternal/WebRtcStats/WebRtcStats");var PublisherSpeakingEvent_1=require("../OpenViduInternal/Events/PublisherSpeakingEvent");var EventEmitter=require("wolfy87-eventemitter");var kurentoUtils=require("../OpenViduInternal/KurentoUtils/kurento-utils-js");var VideoInsertMode_1=require("../OpenViduInternal/Enums/VideoInsertMode");var Stream=function(){function Stream(session,options){var _this=this;this.ee=new EventEmitter;this.isSubscribeToRemote=false;this.isReadyToPublish=false;this.isPublisherPublished=false;this.isVideoELementCreated=false;this.accessIsAllowed=false;this.accessIsDenied=false;this.session=session;if(options.hasOwnProperty("id")){this.inboundStreamOpts=options;this.streamId=this.inboundStreamOpts.id;this.hasAudio=this.inboundStreamOpts.recvAudio;this.hasVideo=this.inboundStreamOpts.recvVideo;this.typeOfVideo=!this.inboundStreamOpts.typeOfVideo?undefined:this.inboundStreamOpts.typeOfVideo;this.frameRate=this.inboundStreamOpts.frameRate===-1?undefined:this.inboundStreamOpts.frameRate}else{this.outboundStreamOpts=options;if(this.isSendVideo()){if(this.isSendScreen()){this.streamId="SCREEN";this.typeOfVideo="SCREEN"}else{this.streamId="CAMERA";this.typeOfVideo="CAMERA"}this.frameRate=this.outboundStreamOpts.publisherProperties.frameRate}else{this.streamId="MICRO";delete this.typeOfVideo}this.hasAudio=this.isSendAudio();this.hasVideo=this.isSendVideo()}this.on("mediastream-updated",function(){if(_this.video)_this.video.srcObject=_this.mediaStream;console.debug("Video srcObject ["+_this.mediaStream+"] updated in stream ["+_this.streamId+"]")})}Stream.prototype.getMediaStream=function(){return this.mediaStream};Stream.prototype.setMediaStream=function(mediaStream){this.mediaStream=mediaStream;this.ee.emitEvent("mediastream-updated")};Stream.prototype.getWebRtcPeer=function(){return this.webRtcPeer};Stream.prototype.getRTCPeerConnection=function(){return this.webRtcPeer.peerConnection};Stream.prototype.getVideoElement=function(){return this.video};Stream.prototype.subscribeToMyRemote=function(){this.isSubscribeToRemote=true};Stream.prototype.setOutboundStreamOptions=function(outboundStreamOpts){this.outboundStreamOpts=outboundStreamOpts};Stream.prototype.subscribe=function(){var _this=this;return new Promise(function(resolve,reject){_this.initWebRtcPeerReceive().then(function(){resolve()}).catch(function(error){reject(error)})})};Stream.prototype.publish=function(){var _this=this;return new Promise(function(resolve,reject){if(_this.isReadyToPublish){_this.initWebRtcPeerSend().then(function(){resolve()}).catch(function(error){reject(error)})}else{_this.ee.once("stream-ready-to-publish",function(streamEvent){_this.publish().then(function(){resolve()}).catch(function(error){reject(error)})})}})};Stream.prototype.disposeWebRtcPeer=function(){if(this.webRtcPeer){this.webRtcPeer.dispose()}if(this.speechEvent){this.speechEvent.stop()}this.stopWebRtcStats();console.info((!!this.outboundStreamOpts?"Outbound ":"Inbound ")+"WebRTCPeer from 'Stream' with id ["+this.streamId+"] is now closed")};Stream.prototype.disposeMediaStream=function(){if(this.mediaStream){this.mediaStream.getAudioTracks().forEach(function(track){track.stop()});this.mediaStream.getVideoTracks().forEach(function(track){track.stop()})}console.info((!!this.outboundStreamOpts?"Local ":"Remote ")+"MediaStream from 'Stream' with id ["+this.streamId+"] is now disposed")};Stream.prototype.displayMyRemote=function(){return this.isSubscribeToRemote};Stream.prototype.on=function(eventName,listener){this.ee.on(eventName,listener)};Stream.prototype.once=function(eventName,listener){this.ee.once(eventName,listener)};Stream.prototype.insertVideo=function(targetElement,insertMode){var _this=this;if(!!targetElement){this.video=document.createElement("video");this.video.id=(this.isLocal()?"local-":"remote-")+"video-"+this.streamId;this.video.autoplay=true;this.video.controls=false;this.video.srcObject=this.mediaStream;if(this.isLocal()&&!this.displayMyRemote()){this.video.muted=true;if(this.outboundStreamOpts.publisherProperties.mirror){this.mirrorVideo(this.video)}this.video.oncanplay=function(){console.info("Local 'Stream' with id ["+_this.streamId+"] video is now playing");_this.ee.emitEvent("video-is-playing",[{element:_this.video}])}}else{this.video.title=this.streamId}this.targetElement=targetElement;this.parentId=targetElement.id;var insMode=!!insertMode?insertMode:VideoInsertMode_1.VideoInsertMode.APPEND;this.insertElementWithMode(this.video,insMode);this.ee.emitEvent("video-element-created-by-stream",[{element:this.video}]);this.isVideoELementCreated=true}this.isReadyToPublish=true;this.ee.emitEvent("stream-ready-to-publish");return this.video};Stream.prototype.removeVideo=function(){if(this.video){if(document.getElementById(this.parentId)){document.getElementById(this.parentId).removeChild(this.video);this.ee.emitEvent("video-removed",[this.video])}delete this.video}};Stream.prototype.isSendAudio=function(){return!!this.outboundStreamOpts&&this.outboundStreamOpts.publisherProperties.audioSource!==null&&this.outboundStreamOpts.publisherProperties.audioSource!==false};Stream.prototype.isSendVideo=function(){return!!this.outboundStreamOpts&&this.outboundStreamOpts.publisherProperties.videoSource!==null&&this.outboundStreamOpts.publisherProperties.videoSource!==false};Stream.prototype.isSendScreen=function(){return!!this.outboundStreamOpts&&this.outboundStreamOpts.publisherProperties.videoSource==="screen"};Stream.prototype.emitEvent=function(type,eventArray){this.ee.emitEvent(type,eventArray)};Stream.prototype.setSpeechEventIfNotExists=function(){if(!this.speechEvent){var harkOptions=this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions||{};harkOptions.interval=typeof harkOptions.interval==="number"?harkOptions.interval:50;harkOptions.threshold=typeof harkOptions.threshold==="number"?harkOptions.threshold:-50;this.speechEvent=kurentoUtils.WebRtcPeer.hark(this.mediaStream,harkOptions)}};Stream.prototype.enableSpeakingEvents=function(){var _this=this;this.setSpeechEventIfNotExists();this.speechEvent.on("speaking",function(){_this.session.emitEvent("publisherStartSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStartSpeaking",_this.connection,_this.streamId)])});this.speechEvent.on("stopped_speaking",function(){_this.session.emitEvent("publisherStopSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStopSpeaking",_this.connection,_this.streamId)])})};Stream.prototype.enableOnceSpeakingEvents=function(){var _this=this;this.setSpeechEventIfNotExists();this.speechEvent.on("speaking",function(){_this.session.emitEvent("publisherStartSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStartSpeaking",_this.connection,_this.streamId)]);_this.disableSpeakingEvents()});this.speechEvent.on("stopped_speaking",function(){_this.session.emitEvent("publisherStopSpeaking",[new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session,"publisherStopSpeaking",_this.connection,_this.streamId)]);_this.disableSpeakingEvents()})};Stream.prototype.disableSpeakingEvents=function(){this.speechEvent.stop();this.speechEvent=undefined};Stream.prototype.initWebRtcPeerSend=function(){var _this=this;return new Promise(function(resolve,reject){var userMediaConstraints={audio:_this.isSendAudio(),video:_this.isSendVideo()};var options={videoStream:_this.mediaStream,mediaConstraints:userMediaConstraints,onicecandidate:_this.connection.sendIceCandidate.bind(_this.connection),iceServers:_this.session.openvidu.advancedConfiguration.iceServers};var successCallback=function(error,sdpOfferParam,wp){if(error){reject(new Error("(publish) SDP offer error: "+JSON.stringify(error)))}console.debug("Sending SDP offer to publish as "+_this.streamId,sdpOfferParam);_this.session.openvidu.sendRequest("publishVideo",{sdpOffer:sdpOfferParam,doLoopback:_this.displayMyRemote()||false,audioActive:_this.isSendAudio(),videoActive:_this.isSendVideo(),typeOfVideo:_this.isSendVideo()?_this.isSendScreen()?"SCREEN":"CAMERA":"",frameRate:!!_this.frameRate?_this.frameRate:-1},function(error,response){if(error){reject("Error on publishVideo: "+JSON.stringify(error))}else{_this.processSdpAnswer(response.sdpAnswer).then(function(){_this.ee.emitEvent("stream-created-by-publisher");resolve()}).catch(function(error){reject(error)});console.info("'Publisher' successfully published to session")}})};if(_this.displayMyRemote()){_this.webRtcPeer=kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,function(err){if(err){reject(err)}_this.webRtcPeer.generateOffer(successCallback)})}else{_this.webRtcPeer=kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options,function(error){if(error){reject(error)}_this.webRtcPeer.generateOffer(successCallback)})}_this.isPublisherPublished=true})};Stream.prototype.initWebRtcPeerReceive=function(){var _this=this;return new Promise(function(resolve,reject){var offerConstraints={audio:_this.inboundStreamOpts.recvAudio,video:_this.inboundStreamOpts.recvVideo};console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer",offerConstraints);var options={onicecandidate:_this.connection.sendIceCandidate.bind(_this.connection),mediaConstraints:offerConstraints};var successCallback=function(error,sdpOfferParam,wp){if(error){reject(new Error("(subscribe) SDP offer error: "+JSON.stringify(error)))}console.debug("Sending SDP offer to subscribe to "+_this.streamId,sdpOfferParam);_this.session.openvidu.sendRequest("receiveVideoFrom",{sender:_this.streamId,sdpOffer:sdpOfferParam},function(error,response){if(error){reject(new Error("Error on recvVideoFrom: "+JSON.stringify(error)))}else{_this.processSdpAnswer(response.sdpAnswer).then(function(){resolve()}).catch(function(error){reject(error)})}})};_this.webRtcPeer=kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options,function(error){if(error){reject(error)}_this.webRtcPeer.generateOffer(successCallback)})})};Stream.prototype.processSdpAnswer=function(sdpAnswer){var _this=this;return new Promise(function(resolve,reject){var answer=new RTCSessionDescription({type:"answer",sdp:sdpAnswer});console.debug(_this.streamId+": set peer connection with recvd SDP answer",sdpAnswer);var streamId=_this.streamId;var peerConnection=_this.webRtcPeer.peerConnection;peerConnection.setRemoteDescription(answer,function(){if(!_this.isLocal()||_this.displayMyRemote()){_this.mediaStream=peerConnection.getRemoteStreams()[0];console.debug("Peer remote stream",_this.mediaStream);if(!!_this.mediaStream){_this.ee.emitEvent("mediastream-updated");if(!!_this.mediaStream.getAudioTracks()[0]&&_this.session.speakingEventsEnabled){_this.enableSpeakingEvents()}}if(!!_this.video){_this.video.oncanplay=function(){if(_this.isLocal()&&_this.displayMyRemote()){console.info("Your own remote 'Stream' with id ["+_this.streamId+"] video is now playing");_this.ee.emitEvent("remote-video-is-playing",[{element:_this.video}])}else if(!_this.isLocal()&&!_this.displayMyRemote()){console.info("Remote 'Stream' with id ["+_this.streamId+"] video is now playing");_this.ee.emitEvent("video-is-playing",[{element:_this.video}])}}}_this.session.emitEvent("stream-subscribed",[{stream:_this}])}_this.initWebRtcStats();resolve()},function(error){reject(new Error(_this.streamId+": Error setting SDP to the peer connection: "+JSON.stringify(error)))})})};Stream.prototype.initWebRtcStats=function(){this.webRtcStats=new WebRtcStats_1.WebRtcStats(this);this.webRtcStats.initWebRtcStats()};Stream.prototype.stopWebRtcStats=function(){if(!!this.webRtcStats&&this.webRtcStats.isEnabled()){this.webRtcStats.stopWebRtcStats()}};Stream.prototype.isLocal=function(){return!this.inboundStreamOpts&&!!this.outboundStreamOpts};Stream.prototype.insertElementWithMode=function(element,insertMode){if(!!this.targetElement){switch(insertMode){case VideoInsertMode_1.VideoInsertMode.AFTER:this.targetElement.parentNode.insertBefore(element,this.targetElement.nextSibling);break;case VideoInsertMode_1.VideoInsertMode.APPEND:this.targetElement.appendChild(element);break;case VideoInsertMode_1.VideoInsertMode.BEFORE:this.targetElement.parentNode.insertBefore(element,this.targetElement);break;case VideoInsertMode_1.VideoInsertMode.PREPEND:this.targetElement.insertBefore(element,this.targetElement.childNodes[0]);break;case VideoInsertMode_1.VideoInsertMode.REPLACE:this.targetElement.parentNode.replaceChild(element,this.targetElement);break;default:this.insertElementWithMode(element,VideoInsertMode_1.VideoInsertMode.APPEND)}}};Stream.prototype.mirrorVideo=function(video){video.style.transform="rotateY(180deg)";video.style.webkitTransform="rotateY(180deg)"};return Stream}();exports.Stream=Stream},{"../OpenViduInternal/Enums/VideoInsertMode":36,"../OpenViduInternal/Events/PublisherSpeakingEvent":39,"../OpenViduInternal/KurentoUtils/kurento-utils-js":55,"../OpenViduInternal/WebRtcStats/WebRtcStats":58,"wolfy87-eventemitter":25}],33:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var VideoElementEvent_1=require("../OpenViduInternal/Events/VideoElementEvent");var EventEmitter=require("wolfy87-eventemitter");var Subscriber=function(){function Subscriber(stream,targetElement,properties){var _this=this;this.ee=new EventEmitter;this.stream=stream;this.properties=properties;if(typeof targetElement==="string"){var e=document.getElementById(targetElement);if(!!e){this.element=e}}else if(targetElement instanceof HTMLElement){this.element=targetElement}this.stream.once("video-removed",function(element){_this.ee.emitEvent("videoElementDestroyed",[new VideoElementEvent_1.VideoElementEvent(element,_this,"videoElementDestroyed")])})}Subscriber.prototype.subscribeToAudio=function(value){this.stream.getWebRtcPeer().audioEnabled=value;console.info("'Subscriber' has "+(value?"subscribed":"unsubscribed")+" to its audio stream");return this};Subscriber.prototype.subscribeToVideo=function(value){this.stream.getWebRtcPeer().videoEnabled=value;console.info("'Subscriber' has "+(value?"subscribed":"unsubscribed")+" to its video stream");return this};Subscriber.prototype.on=function(type,handler){var _this=this;this.ee.on(type,function(event){if(event){console.info("Event '"+type+"' triggered by 'Subscriber'",event)}else{console.info("Event '"+type+"' triggered by 'Subscriber'")}handler(event)});if(type==="videoElementCreated"){if(this.stream.isVideoELementCreated){this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoElementCreated")])}else{this.stream.once("video-element-created-by-stream",function(element){_this.id=element.id;_this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(element,_this,"videoElementCreated")])})}}if(type==="videoPlaying"){var video=this.stream.getVideoElement();if(!this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.once("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}return this};Subscriber.prototype.once=function(type,handler){var _this=this;this.ee.once(type,function(event){if(event){console.info("Event '"+type+"' triggered once by 'Subscriber'",event)}else{console.info("Event '"+type+"' triggered once by 'Subscriber'")}handler(event)});if(type==="videoElementCreated"){if(this.stream.isVideoELementCreated){this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoElementCreated")])}else{this.stream.once("video-element-created-by-stream",function(element){_this.id=element.id;_this.ee.emitEvent("videoElementCreated",[new VideoElementEvent_1.VideoElementEvent(element,_this,"videoElementCreated")])})}}if(type==="videoPlaying"){var video=this.stream.getVideoElement();if(!this.stream.displayMyRemote()&&video&&video.currentTime>0&&video.paused===false&&video.ended===false&&video.readyState===4){this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(),this,"videoPlaying")])}else{this.stream.once("video-is-playing",function(element){_this.ee.emitEvent("videoPlaying",[new VideoElementEvent_1.VideoElementEvent(element.element,_this,"videoPlaying")])})}}return this};Subscriber.prototype.off=function(type,handler){if(!handler){this.ee.removeAllListeners(type)}else{this.ee.off(type,handler)}return this};return Subscriber}();exports.Subscriber=Subscriber},{"../OpenViduInternal/Events/VideoElementEvent":44,"wolfy87-eventemitter":25}],34:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var LocalRecorderState;(function(LocalRecorderState){LocalRecorderState["READY"]="READY";LocalRecorderState["RECORDING"]="RECORDING";LocalRecorderState["PAUSED"]="PAUSED";LocalRecorderState["FINISHED"]="FINISHED"})(LocalRecorderState=exports.LocalRecorderState||(exports.LocalRecorderState={}))},{}],35:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var OpenViduErrorName;(function(OpenViduErrorName){OpenViduErrorName["BROWSER_NOT_SUPPORTED"]="BROWSER_NOT_SUPPORTED";OpenViduErrorName["CAMERA_ACCESS_DENIED"]="CAMERA_ACCESS_DENIED";OpenViduErrorName["MICROPHONE_ACCESS_DENIED"]="MICROPHONE_ACCESS_DENIED";OpenViduErrorName["SCREEN_CAPTURE_DENIED"]="SCREEN_CAPTURE_DENIED";OpenViduErrorName["SCREEN_SHARING_NOT_SUPPORTED"]="SCREEN_SHARING_NOT_SUPPORTED";OpenViduErrorName["SCREEN_EXTENSION_NOT_INSTALLED"]="SCREEN_EXTENSION_NOT_INSTALLED";OpenViduErrorName["SCREEN_EXTENSION_DISABLED"]="SCREEN_EXTENSION_DISABLED";OpenViduErrorName["INPUT_VIDEO_DEVICE_NOT_FOUND"]="INPUT_VIDEO_DEVICE_NOT_FOUND";OpenViduErrorName["INPUT_AUDIO_DEVICE_NOT_FOUND"]="INPUT_AUDIO_DEVICE_NOT_FOUND";OpenViduErrorName["NO_INPUT_SOURCE_SET"]="NO_INPUT_SOURCE_SET";OpenViduErrorName["PUBLISHER_PROPERTIES_ERROR"]="PUBLISHER_PROPERTIES_ERROR";OpenViduErrorName["OPENVIDU_PERMISSION_DENIED"]="OPENVIDU_PERMISSION_DENIED";OpenViduErrorName["OPENVIDU_NOT_CONNECTED"]="OPENVIDU_NOT_CONNECTED";OpenViduErrorName["GENERIC_ERROR"]="GENERIC_ERROR"})(OpenViduErrorName=exports.OpenViduErrorName||(exports.OpenViduErrorName={}));var OpenViduError=function(){function OpenViduError(name,message){this.name=name;this.message=message}return OpenViduError}();exports.OpenViduError=OpenViduError},{}],36:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var VideoInsertMode;(function(VideoInsertMode){VideoInsertMode["AFTER"]="AFTER";VideoInsertMode["APPEND"]="APPEND";VideoInsertMode["BEFORE"]="BEFORE";VideoInsertMode["PREPEND"]="PREPEND";VideoInsertMode["REPLACE"]="REPLACE"})(VideoInsertMode=exports.VideoInsertMode||(exports.VideoInsertMode={}))},{}],37:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var ConnectionEvent=function(_super){__extends(ConnectionEvent,_super);function ConnectionEvent(cancelable,target,type,connection,reason){var _this=_super.call(this,cancelable,target,type)||this;_this.connection=connection;_this.reason=reason;return _this}ConnectionEvent.prototype.callDefaultBehaviour=function(){};return ConnectionEvent}(Event_1.Event);exports.ConnectionEvent=ConnectionEvent},{"./Event":38}],38:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Event=function(){function Event(cancelable,target,type){this.hasBeenPrevented=false;this.cancelable=cancelable;this.target=target;this.type=type}Event.prototype.isDefaultPrevented=function(){return this.hasBeenPrevented};Event.prototype.preventDefault=function(){this.callDefaultBehaviour=function(){};this.hasBeenPrevented=true};return Event}();exports.Event=Event},{}],39:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var PublisherSpeakingEvent=function(_super){__extends(PublisherSpeakingEvent,_super);function PublisherSpeakingEvent(target,type,connection,streamId){var _this=_super.call(this,false,target,type)||this;_this.type=type;_this.connection=connection;_this.streamId=streamId;return _this}PublisherSpeakingEvent.prototype.callDefaultBehaviour=function(){};return PublisherSpeakingEvent}(Event_1.Event);exports.PublisherSpeakingEvent=PublisherSpeakingEvent},{"./Event":38}],40:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var RecordingEvent=function(_super){__extends(RecordingEvent,_super);function RecordingEvent(target,type,id,name){var _this=_super.call(this,false,target,type)||this;_this.id=id;if(name!==id){_this.name=name}return _this}RecordingEvent.prototype.callDefaultBehaviour=function(){};return RecordingEvent}(Event_1.Event);exports.RecordingEvent=RecordingEvent},{"./Event":38}],41:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var SessionDisconnectedEvent=function(_super){__extends(SessionDisconnectedEvent,_super);function SessionDisconnectedEvent(target,reason){var _this=_super.call(this,true,target,"sessionDisconnected")||this;_this.reason=reason;return _this}SessionDisconnectedEvent.prototype.callDefaultBehaviour=function(){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Session'");var session=this.target;for(var connectionId in session.remoteConnections){if(!!session.remoteConnections[connectionId].stream){session.remoteConnections[connectionId].stream.disposeWebRtcPeer();session.remoteConnections[connectionId].stream.disposeMediaStream();session.remoteConnections[connectionId].stream.removeVideo();delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId];session.remoteConnections[connectionId].dispose()}delete session.remoteConnections[connectionId]}};return SessionDisconnectedEvent}(Event_1.Event);exports.SessionDisconnectedEvent=SessionDisconnectedEvent},{"./Event":38}],42:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var SignalEvent=function(_super){__extends(SignalEvent,_super);function SignalEvent(target,type,data,from){var _this=_super.call(this,false,target,type)||this;_this.type=type;_this.data=data;_this.from=from;return _this}SignalEvent.prototype.callDefaultBehaviour=function(){};return SignalEvent}(Event_1.Event);exports.SignalEvent=SignalEvent},{"./Event":38}],43:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var Publisher_1=require("../../OpenVidu/Publisher");var Session_1=require("../../OpenVidu/Session");var StreamEvent=function(_super){__extends(StreamEvent,_super);function StreamEvent(cancelable,target,type,stream,reason){var _this=_super.call(this,cancelable,target,type)||this;_this.stream=stream;_this.reason=reason;return _this}StreamEvent.prototype.callDefaultBehaviour=function(){if(this.type==="streamDestroyed"){if(this.target instanceof Session_1.Session){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Session'");this.stream.disposeWebRtcPeer();this.stream.disposeMediaStream();this.stream.removeVideo()}else if(this.target instanceof Publisher_1.Publisher){console.info("Calling default behaviour upon '"+this.type+"' event dispatched by 'Publisher'");this.stream.disposeMediaStream();this.stream.removeVideo();this.stream.isReadyToPublish=false}delete this.stream.session.remoteStreamsCreated[this.stream.streamId];var remoteConnection=this.stream.session.remoteConnections[this.stream.connection.connectionId];if(!!remoteConnection&&!!remoteConnection.options){var streamOptionsServer=remoteConnection.options.streams;for(var i=streamOptionsServer.length-1;i>=0;--i){if(streamOptionsServer[i].id===this.stream.streamId){streamOptionsServer.splice(i,1)}}}}};return StreamEvent}(Event_1.Event);exports.StreamEvent=StreamEvent},{"../../OpenVidu/Publisher":30,"../../OpenVidu/Session":31,"./Event":38}],44:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var Event_1=require("./Event");var VideoElementEvent=function(_super){__extends(VideoElementEvent,_super);function VideoElementEvent(element,target,type){var _this=_super.call(this,false,target,type)||this;_this.element=element;return _this}VideoElementEvent.prototype.callDefaultBehaviour=function(){};return VideoElementEvent}(Event_1.Event);exports.VideoElementEvent=VideoElementEvent},{"./Event":38}],45:[function(require,module,exports){function Mapper(){var sources={};this.forEach=function(callback){for(var key in sources){var source=sources[key];for(var key2 in source)callback(source[key2])}};this.get=function(id,source){var ids=sources[source];if(ids==undefined)return undefined;return ids[id]};this.remove=function(id,source){var ids=sources[source];if(ids==undefined)return;delete ids[id];for(var i in ids){return false}delete sources[source]};this.set=function(value,id,source){if(value==undefined)return this.remove(id,source);var ids=sources[source];if(ids==undefined)sources[source]=ids={};ids[id]=value}}Mapper.prototype.pop=function(id,source){var value=this.get(id,source);if(value==undefined)return undefined;this.remove(id,source);return value};module.exports=Mapper},{}],46:[function(require,module,exports){var JsonRpcClient=require("./jsonrpcclient");exports.JsonRpcClient=JsonRpcClient},{"./jsonrpcclient":47}],47:[function(require,module,exports){var RpcBuilder=require("../");var WebSocketWithReconnection=require("./transports/webSocketWithReconnection");Date.now=Date.now||function(){return+new Date};var PING_INTERVAL=5e3;var RECONNECTING="RECONNECTING";var CONNECTED="CONNECTED";var DISCONNECTED="DISCONNECTED";var Logger=console;function JsonRpcClient(configuration){var self=this;var wsConfig=configuration.ws;var notReconnectIfNumLessThan=-1;var pingNextNum=0;var enabledPings=true;var pingPongStarted=false;var pingInterval;var status=DISCONNECTED;var onreconnecting=wsConfig.onreconnecting;var onreconnected=wsConfig.onreconnected;var onconnected=wsConfig.onconnected;var onerror=wsConfig.onerror;configuration.rpc.pull=function(params,request){request.reply(null,"push")};wsConfig.onreconnecting=function(){Logger.debug("--------- ONRECONNECTING -----------");if(status===RECONNECTING){Logger.error("Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it");return}status=RECONNECTING;if(onreconnecting){onreconnecting()}};wsConfig.onreconnected=function(){Logger.debug("--------- ONRECONNECTED -----------");if(status===CONNECTED){Logger.error("Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it");return}status=CONNECTED;enabledPings=true;updateNotReconnectIfLessThan();usePing();if(onreconnected){onreconnected()}};wsConfig.onconnected=function(){Logger.debug("--------- ONCONNECTED -----------");if(status===CONNECTED){Logger.error("Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it");return}status=CONNECTED;enabledPings=true;usePing();if(onconnected){onconnected()}};wsConfig.onerror=function(error){Logger.debug("--------- ONERROR -----------");status=DISCONNECTED;if(onerror){onerror(error)}};var ws=new WebSocketWithReconnection(wsConfig);Logger.debug("Connecting websocket to URI: "+wsConfig.uri);var rpcBuilderOptions={request_timeout:configuration.rpc.requestTimeout,ping_request_timeout:configuration.rpc.heartbeatRequestTimeout};var rpc=new RpcBuilder(RpcBuilder.packers.JsonRPC,rpcBuilderOptions,ws,function(request){Logger.debug("Received request: "+JSON.stringify(request));try{var func=configuration.rpc[request.method];if(func===undefined){Logger.error("Method "+request.method+" not registered in client")}else{func(request.params,request)}}catch(err){Logger.error("Exception processing request: "+JSON.stringify(request));Logger.error(err)}});this.send=function(method,params,callback){if(method!=="ping"){Logger.debug("Request: method:"+method+" params:"+JSON.stringify(params))}var requestTime=Date.now();rpc.encode(method,params,function(error,result){if(error){try{Logger.error("ERROR:"+error.message+" in Request: method:"+method+" params:"+JSON.stringify(params)+" request:"+error.request);if(error.data){Logger.error("ERROR DATA:"+JSON.stringify(error.data))}}catch(e){}error.requestTime=requestTime}if(callback){if(result!=undefined&&result.value!=="pong"){Logger.debug("Response: "+JSON.stringify(result))}callback(error,result)}})};function updateNotReconnectIfLessThan(){Logger.debug("notReconnectIfNumLessThan = "+pingNextNum+" (old="+notReconnectIfNumLessThan+")");notReconnectIfNumLessThan=pingNextNum}function sendPing(){if(enabledPings){var params=null;if(pingNextNum==0||pingNextNum==notReconnectIfNumLessThan){params={interval:configuration.heartbeat||PING_INTERVAL}}pingNextNum++;self.send("ping",params,function(pingNum){return function(error,result){if(error){Logger.debug("Error in ping request #"+pingNum+" ("+error.message+")");if(pingNum>notReconnectIfNumLessThan){enabledPings=false;updateNotReconnectIfLessThan();Logger.debug("Server did not respond to ping message #"+pingNum+". Reconnecting... ");ws.reconnectWs()}}}}(pingNextNum))}else{Logger.debug("Trying to send ping, but ping is not enabled")}}function usePing(){if(!pingPongStarted){Logger.debug("Starting ping (if configured)");pingPongStarted=true;if(configuration.heartbeat!=undefined){pingInterval=setInterval(sendPing,configuration.heartbeat);sendPing()}}}this.close=function(){Logger.debug("Closing jsonRpcClient explicitly by client");if(pingInterval!=undefined){Logger.debug("Clearing ping interval");clearInterval(pingInterval)}pingPongStarted=false;enabledPings=false;if(configuration.sendCloseMessage){Logger.debug("Sending close message");this.send("closeSession",null,function(error,result){if(error){Logger.error("Error sending close message: "+JSON.stringify(error))}ws.close()})}else{ws.close()}};this.forceClose=function(millis){ws.forceClose(millis)};this.reconnect=function(){ws.reconnectWs()}}module.exports=JsonRpcClient},{"../":50,"./transports/webSocketWithReconnection":49}],48:[function(require,module,exports){var WebSocketWithReconnection=require("./webSocketWithReconnection");exports.WebSocketWithReconnection=WebSocketWithReconnection},{"./webSocketWithReconnection":49}],49:[function(require,module,exports){(function(global){"use strict";var BrowserWebSocket=global.WebSocket||global.MozWebSocket;var Logger=console;var MAX_RETRIES=2e3;var RETRY_TIME_MS=3e3;var CONNECTING=0;var OPEN=1;var CLOSING=2;var CLOSED=3;function WebSocketWithReconnection(config){var closing=false;var registerMessageHandler;var wsUri=config.uri;var useSockJS=config.useSockJS;var reconnecting=false;var forcingDisconnection=false;var ws;if(useSockJS){ws=new SockJS(wsUri)}else{ws=new WebSocket(wsUri)}ws.onopen=function(){logConnected(ws,wsUri);if(config.onconnected){config.onconnected()}};ws.onerror=function(error){Logger.error("Could not connect to "+wsUri+" (invoking onerror if defined)",error);if(config.onerror){config.onerror(error)}};function logConnected(ws,wsUri){try{Logger.debug("WebSocket connected to "+wsUri)}catch(e){Logger.error(e)}}var reconnectionOnClose=function(){if(ws.readyState===CLOSED){if(closing){Logger.debug("Connection closed by user")}else{Logger.debug("Connection closed unexpectecly. Reconnecting...");reconnectToSameUri(MAX_RETRIES,1)}}else{Logger.debug("Close callback from previous websocket. Ignoring it")}};ws.onclose=reconnectionOnClose;function reconnectToSameUri(maxRetries,numRetries){Logger.debug("reconnectToSameUri (attempt #"+numRetries+", max="+maxRetries+")");if(numRetries===1){if(reconnecting){Logger.warn("Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.");return}else{reconnecting=true}if(config.onreconnecting){config.onreconnecting()}}if(forcingDisconnection){reconnectToNewUri(maxRetries,numRetries,wsUri)}else{if(config.newWsUriOnReconnection){config.newWsUriOnReconnection(function(error,newWsUri){if(error){Logger.debug(error);setTimeout(function(){reconnectToSameUri(maxRetries,numRetries+1)},RETRY_TIME_MS)}else{reconnectToNewUri(maxRetries,numRetries,newWsUri)}})}else{reconnectToNewUri(maxRetries,numRetries,wsUri)}}}function reconnectToNewUri(maxRetries,numRetries,reconnectWsUri){Logger.debug("Reconnection attempt #"+numRetries);ws.close();wsUri=reconnectWsUri||wsUri;var newWs;if(useSockJS){newWs=new SockJS(wsUri)}else{newWs=new WebSocket(wsUri)}newWs.onopen=function(){Logger.debug("Reconnected after "+numRetries+" attempts...");logConnected(newWs,wsUri);reconnecting=false;registerMessageHandler();if(config.onreconnected()){config.onreconnected()}newWs.onclose=reconnectionOnClose};var onErrorOrClose=function(error){Logger.warn("Reconnection error: ",error);if(numRetries===maxRetries){if(config.ondisconnect){config.ondisconnect()}}else{setTimeout(function(){reconnectToSameUri(maxRetries,numRetries+1)},RETRY_TIME_MS)}};newWs.onerror=onErrorOrClose;ws=newWs}this.close=function(){closing=true;ws.close()};this.forceClose=function(millis){Logger.debug("Testing: Force WebSocket close");if(millis){Logger.debug("Testing: Change wsUri for "+millis+" millis to simulate net failure");var goodWsUri=wsUri;wsUri="wss://21.234.12.34.4:443/";forcingDisconnection=true;setTimeout(function(){Logger.debug("Testing: Recover good wsUri "+goodWsUri);wsUri=goodWsUri;forcingDisconnection=false},millis)}ws.close()};this.reconnectWs=function(){Logger.debug("reconnectWs");reconnectToSameUri(MAX_RETRIES,1,wsUri)};this.send=function(message){ws.send(message)};this.addEventListener=function(type,callback){registerMessageHandler=function(){ws.addEventListener(type,callback)};registerMessageHandler()}}module.exports=WebSocketWithReconnection}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],50:[function(require,module,exports){var defineProperty_IE8=false;if(Object.defineProperty){try{Object.defineProperty({},"x",{})}catch(e){defineProperty_IE8=true}}if(!Function.prototype.bind){Function.prototype.bind=function(oThis){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var aArgs=Array.prototype.slice.call(arguments,1),fToBind=this,fNOP=function(){},fBound=function(){return fToBind.apply(this instanceof fNOP&&oThis?this:oThis,aArgs.concat(Array.prototype.slice.call(arguments)))};fNOP.prototype=this.prototype;fBound.prototype=new fNOP;return fBound}}var EventEmitter=require("events").EventEmitter;var inherits=require("inherits");var packers=require("./packers");var Mapper=require("./Mapper");var BASE_TIMEOUT=5e3;function unifyResponseMethods(responseMethods){if(!responseMethods)return{};for(var key in responseMethods){var value=responseMethods[key];if(typeof value=="string")responseMethods[key]={response:value}}return responseMethods}function unifyTransport(transport){if(!transport)return;if(transport instanceof Function)return{send:transport};if(transport.send instanceof Function)return transport;if(transport.postMessage instanceof Function){transport.send=transport.postMessage;return transport}if(transport.write instanceof Function){transport.send=transport.write;return transport}if(transport.onmessage!==undefined)return;if(transport.pause instanceof Function)return;throw new SyntaxError("Transport is not a function nor a valid object")}function RpcNotification(method,params){if(defineProperty_IE8){this.method=method;this.params=params}else{Object.defineProperty(this,"method",{value:method,enumerable:true});Object.defineProperty(this,"params",{value:params,enumerable:true})}}function RpcBuilder(packer,options,transport,onRequest){var self=this;if(!packer)throw new SyntaxError("Packer is not defined");if(!packer.pack||!packer.unpack)throw new SyntaxError("Packer is invalid");var responseMethods=unifyResponseMethods(packer.responseMethods);if(options instanceof Function){if(transport!=undefined)throw new SyntaxError("There can't be parameters after onRequest");onRequest=options;transport=undefined;options=undefined}if(options&&options.send instanceof Function){if(transport&&!(transport instanceof Function))throw new SyntaxError("Only a function can be after transport");onRequest=transport;transport=options;options=undefined}if(transport instanceof Function){if(onRequest!=undefined)throw new SyntaxError("There can't be parameters after onRequest");onRequest=transport;transport=undefined}if(transport&&transport.send instanceof Function)if(onRequest&&!(onRequest instanceof Function))throw new SyntaxError("Only a function can be after transport");options=options||{};EventEmitter.call(this);if(onRequest)this.on("request",onRequest);if(defineProperty_IE8)this.peerID=options.peerID;else Object.defineProperty(this,"peerID",{value:options.peerID});var max_retries=options.max_retries||0;function transportMessage(event){self.decode(event.data||event)}this.getTransport=function(){return transport};this.setTransport=function(value){if(transport){if(transport.removeEventListener)transport.removeEventListener("message",transportMessage);else if(transport.removeListener)transport.removeListener("data",transportMessage)}if(value){if(value.addEventListener)value.addEventListener("message",transportMessage);else if(value.addListener)value.addListener("data",transportMessage)}transport=unifyTransport(value)};if(!defineProperty_IE8)Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});this.setTransport(transport);var request_timeout=options.request_timeout||BASE_TIMEOUT;var ping_request_timeout=options.ping_request_timeout||request_timeout;var response_timeout=options.response_timeout||BASE_TIMEOUT;var duplicates_timeout=options.duplicates_timeout||BASE_TIMEOUT;var requestID=0;var requests=new Mapper;var responses=new Mapper;var processedResponses=new Mapper;var message2Key={};function storeResponse(message,id,dest){var response={message:message,timeout:setTimeout(function(){responses.remove(id,dest)},response_timeout)};responses.set(response,id,dest)}function storeProcessedResponse(ack,from){var timeout=setTimeout(function(){processedResponses.remove(ack,from)},duplicates_timeout);processedResponses.set(timeout,ack,from)}function RpcRequest(method,params,id,from,transport){RpcNotification.call(this,method,params);this.getTransport=function(){return transport};this.setTransport=function(value){transport=unifyTransport(value)};if(!defineProperty_IE8)Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});var response=responses.get(id,from);if(!(transport||self.getTransport())){if(defineProperty_IE8)this.duplicated=Boolean(response);else Object.defineProperty(this,"duplicated",{value:Boolean(response)})}var responseMethod=responseMethods[method];this.pack=packer.pack.bind(packer,this,id);this.reply=function(error,result,transport){if(error instanceof Function||error&&error.send instanceof Function){if(result!=undefined)throw new SyntaxError("There can't be parameters after callback");transport=error;result=null;error=undefined}else if(result instanceof Function||result&&result.send instanceof Function){if(transport!=undefined)throw new SyntaxError("There can't be parameters after callback");transport=result;result=null}transport=unifyTransport(transport);if(response)clearTimeout(response.timeout);if(from!=undefined){if(error)error.dest=from;if(result)result.dest=from}var message;if(error||result!=undefined){if(self.peerID!=undefined){if(error)error.from=self.peerID;else result.from=self.peerID}if(responseMethod){if(responseMethod.error==undefined&&error)message={error:error};else{var method=error?responseMethod.error:responseMethod.response;message={method:method,params:error||result}}}else message={error:error,result:result};message=packer.pack(message,id)}else if(response)message=response.message;else message=packer.pack({result:null},id);storeResponse(message,id,from);transport=transport||this.getTransport()||self.getTransport();if(transport)return transport.send(message);return message}}inherits(RpcRequest,RpcNotification);function cancel(message){var key=message2Key[message];if(!key)return;delete message2Key[message];var request=requests.pop(key.id,key.dest);if(!request)return;clearTimeout(request.timeout);storeProcessedResponse(key.id,key.dest)}this.cancel=function(message){if(message)return cancel(message);for(var message in message2Key)cancel(message)};this.close=function(){var transport=this.getTransport();if(transport&&transport.close)transport.close();this.cancel();processedResponses.forEach(clearTimeout);responses.forEach(function(response){clearTimeout(response.timeout)})};this.encode=function(method,params,dest,transport,callback){if(params instanceof Function){if(dest!=undefined)throw new SyntaxError("There can't be parameters after callback");callback=params;transport=undefined;dest=undefined;params=undefined}else if(dest instanceof Function){if(transport!=undefined)throw new SyntaxError("There can't be parameters after callback");callback=dest;transport=undefined;dest=undefined}else if(transport instanceof Function){if(callback!=undefined)throw new SyntaxError("There can't be parameters after callback");callback=transport;transport=undefined}if(self.peerID!=undefined){params=params||{};params.from=self.peerID}if(dest!=undefined){params=params||{};params.dest=dest}var message={method:method,params:params};if(callback){var id=requestID++;var retried=0;message=packer.pack(message,id);function dispatchCallback(error,result){self.cancel(message);callback(error,result)}var request={message:message,callback:dispatchCallback,responseMethods:responseMethods[method]||{}};var encode_transport=unifyTransport(transport);function sendRequest(transport){var rt=method==="ping"?ping_request_timeout:request_timeout;request.timeout=setTimeout(timeout,rt*Math.pow(2,retried++));message2Key[message]={id:id,dest:dest};requests.set(request,id,dest);transport=transport||encode_transport||self.getTransport();if(transport)return transport.send(message);return message}function retry(transport){transport=unifyTransport(transport);console.warn(retried+" retry for request message:",message);var timeout=processedResponses.pop(id,dest);clearTimeout(timeout);return sendRequest(transport)}function timeout(){if(retried0){return sdp.slice(0,n)}else{return sdp}}function getSimulcastInfo(videoStream){var videoTracks=videoStream.getVideoTracks();if(!videoTracks.length){logger.warn("No video tracks available in the video stream");return""}var lines=["a=x-google-flag:conference","a=ssrc-group:SIM 1 2 3","a=ssrc:1 cname:localVideo","a=ssrc:1 msid:"+videoStream.id+" "+videoTracks[0].id,"a=ssrc:1 mslabel:"+videoStream.id,"a=ssrc:1 label:"+videoTracks[0].id,"a=ssrc:2 cname:localVideo","a=ssrc:2 msid:"+videoStream.id+" "+videoTracks[0].id,"a=ssrc:2 mslabel:"+videoStream.id,"a=ssrc:2 label:"+videoTracks[0].id,"a=ssrc:3 cname:localVideo","a=ssrc:3 msid:"+videoStream.id+" "+videoTracks[0].id,"a=ssrc:3 mslabel:"+videoStream.id,"a=ssrc:3 label:"+videoTracks[0].id];lines.push("");return lines.join("\n")}function WebRtcPeer(mode,options,callback){if(!(this instanceof WebRtcPeer)){return new WebRtcPeer(mode,options,callback)}WebRtcPeer.super_.call(this);if(options instanceof Function){callback=options;options=undefined}options=options||{};callback=(callback||noop).bind(this);var self=this;var localVideo=options.localVideo;var remoteVideo=options.remoteVideo;var videoStream=options.videoStream;var audioStream=options.audioStream;var mediaConstraints=options.mediaConstraints;var connectionConstraints=options.connectionConstraints;var pc=options.peerConnection;var sendSource=options.sendSource||"webcam";var guid=uuid.v4();var configuration=recursive({iceServers:!!options.iceServers&&options.iceServers.length>0?options.iceServers:freeice()},options.configuration);var onicecandidate=options.onicecandidate;if(onicecandidate)this.on("icecandidate",onicecandidate);var oncandidategatheringdone=options.oncandidategatheringdone;if(oncandidategatheringdone){this.on("candidategatheringdone",oncandidategatheringdone)}var simulcast=options.simulcast;var multistream=options.multistream;var interop=new sdpTranslator.Interop;var candidatesQueueOut=[];var candidategatheringdone=false;Object.defineProperties(this,{peerConnection:{get:function(){return pc}},id:{value:options.id||guid,writable:false},remoteVideo:{get:function(){return remoteVideo}},localVideo:{get:function(){return localVideo}},currentFrame:{get:function(){if(!remoteVideo)return;if(remoteVideo.readyStateUnifiedPlan",dumpSDP(localDescription))}callback(null,localDescription.sdp,self.processAnswer.bind(self))}).catch(callback)};this.getLocalSessionDescriptor=function(){return pc.localDescription};this.getRemoteSessionDescriptor=function(){return pc.remoteDescription};function setRemoteVideo(){if(remoteVideo){remoteVideo.pause();var stream=pc.getRemoteStreams()[0];remoteVideo.srcObject=stream;logger.debug("Remote stream:",stream);remoteVideo.load()}}this.showLocalVideo=function(){localVideo.srcObject=videoStream;localVideo.muted=true};this.processAnswer=function(sdpAnswer,callback){callback=(callback||noop).bind(this);var answer=new RTCSessionDescription({type:"answer",sdp:sdpAnswer});if(multistream&&usePlanB){var planBAnswer=interop.toPlanB(answer);logger.debug("asnwer::planB",dumpSDP(planBAnswer));answer=planBAnswer}logger.debug("SDP answer received, setting remote description");if(pc.signalingState==="closed"){return callback("PeerConnection is closed")}pc.setRemoteDescription(answer,function(){setRemoteVideo();callback()},callback)};this.processOffer=function(sdpOffer,callback){callback=callback.bind(this);var offer=new RTCSessionDescription({type:"offer",sdp:sdpOffer});if(multistream&&usePlanB){var planBOffer=interop.toPlanB(offer);logger.debug("offer::planB",dumpSDP(planBOffer));offer=planBOffer}logger.debug("SDP offer received, setting remote description");if(pc.signalingState==="closed"){return callback("PeerConnection is closed")}pc.setRemoteDescription(offer).then(function(){return setRemoteVideo()}).then(function(){return pc.createAnswer()}).then(function(answer){answer=mangleSdpToAddSimulcast(answer);logger.debug("Created SDP answer");return pc.setLocalDescription(answer)}).then(function(){var localDescription=pc.localDescription;if(multistream&&usePlanB){localDescription=interop.toUnifiedPlan(localDescription);logger.debug("answer::origPlanB->UnifiedPlan",dumpSDP(localDescription))}logger.debug("Local description set",localDescription.sdp);callback(null,localDescription.sdp)}).catch(callback)};function mangleSdpToAddSimulcast(answer){if(simulcast){if(browser.name==="Chrome"||browser.name==="Chromium"){logger.debug("Adding multicast info");answer=new RTCSessionDescription({type:answer.type,sdp:removeFIDFromOffer(answer.sdp)+getSimulcastInfo(videoStream)})}else{logger.warn("Simulcast is only available in Chrome browser.")}}return answer}function start(){if(pc.signalingState==="closed"){callback('The peer connection object is in "closed" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue')}if(videoStream&&localVideo){self.showLocalVideo()}if(videoStream){pc.addStream(videoStream)}if(audioStream){pc.addStream(audioStream)}var browser=parser.getBrowser();if(mode==="sendonly"&&(browser.name==="Chrome"||browser.name==="Chromium")&&browser.major===39){mode="sendrecv"}callback()}if(mode!=="recvonly"&&!videoStream&&!audioStream){function getMedia(constraints){if(constraints===undefined){constraints=MEDIA_CONSTRAINTS}navigator.mediaDevices.getUserMedia(constraints).then(function(stream){videoStream=stream;start()}).catch(callback)}if(sendSource==="webcam"){getMedia(mediaConstraints)}else{getScreenConstraints(sendSource,function(error,constraints_){if(error)return callback(error);constraints=[mediaConstraints];constraints.unshift(constraints_);getMedia(recursive.apply(undefined,constraints))},guid)}}else{setTimeout(start,0)}this.on("_dispose",function(){if(localVideo){localVideo.pause();localVideo.srcObject=null;localVideo.load();localVideo.muted=false}if(remoteVideo){remoteVideo.pause();remoteVideo.srcObject=null;remoteVideo.load()}self.removeAllListeners();if(window.cancelChooseDesktopMedia!==undefined){window.cancelChooseDesktopMedia(guid)}})}inherits(WebRtcPeer,EventEmitter);function createEnableDescriptor(type){var method="get"+type+"Tracks";return{enumerable:true,get:function(){if(!this.peerConnection)return;var streams=this.peerConnection.getLocalStreams();if(!streams.length)return;for(var i=0,stream;stream=streams[i];i++){var tracks=stream[method]();for(var j=0,track;track=tracks[j];j++)if(!track.enabled)return false}return true},set:function(value){function trackSetEnable(track){track.enabled=value}this.peerConnection.getLocalStreams().forEach(function(stream){stream[method]().forEach(trackSetEnable)})}}}Object.defineProperties(WebRtcPeer.prototype,{enabled:{enumerable:true,get:function(){return this.audioEnabled&&this.videoEnabled},set:function(value){this.audioEnabled=this.videoEnabled=value}},audioEnabled:createEnableDescriptor("Audio"),videoEnabled:createEnableDescriptor("Video")});WebRtcPeer.prototype.getLocalStream=function(index){if(this.peerConnection){return this.peerConnection.getLocalStreams()[index||0]}};WebRtcPeer.prototype.getRemoteStream=function(index){if(this.peerConnection){return this.peerConnection.getRemoteStreams()[index||0]}};WebRtcPeer.prototype.dispose=function(){logger.debug("Disposing WebRtcPeer");var pc=this.peerConnection;try{if(pc){if(pc.signalingState==="closed")return;pc.getLocalStreams().forEach(streamStop);pc.close()}}catch(err){logger.warn("Exception disposing webrtc peer "+err)}this.emit("_dispose")};function WebRtcPeerRecvonly(options,callback){if(!(this instanceof WebRtcPeerRecvonly)){return new WebRtcPeerRecvonly(options,callback)}WebRtcPeerRecvonly.super_.call(this,"recvonly",options,callback)}inherits(WebRtcPeerRecvonly,WebRtcPeer);function WebRtcPeerSendonly(options,callback){if(!(this instanceof WebRtcPeerSendonly)){return new WebRtcPeerSendonly(options,callback)}WebRtcPeerSendonly.super_.call(this,"sendonly",options,callback)}inherits(WebRtcPeerSendonly,WebRtcPeer);function WebRtcPeerSendrecv(options,callback){if(!(this instanceof WebRtcPeerSendrecv)){return new WebRtcPeerSendrecv(options,callback)}WebRtcPeerSendrecv.super_.call(this,"sendrecv",options,callback)}inherits(WebRtcPeerSendrecv,WebRtcPeer);function harkUtils(stream,options){return hark(stream,options)}exports.bufferizeCandidates=bufferizeCandidates;exports.WebRtcPeerRecvonly=WebRtcPeerRecvonly;exports.WebRtcPeerSendonly=WebRtcPeerSendonly;exports.WebRtcPeerSendrecv=WebRtcPeerSendrecv;exports.hark=harkUtils},{events:1,freeice:2,hark:5,inherits:6,merge:7,"sdp-translator":15,"ua-parser-js":18,uuid:19}],55:[function(require,module,exports){var WebRtcPeer=require("./WebRtcPeer");exports.WebRtcPeer=WebRtcPeer},{"./WebRtcPeer":54}],56:[function(require,module,exports){window.getScreenId=function(callback){if(!!navigator.mozGetUserMedia){callback(null,"firefox",{video:{mozMediaSource:"window",mediaSource:"window"}});return}window.addEventListener("message",onIFrameCallback);function onIFrameCallback(event){if(!event.data)return;if(event.data.chromeMediaSourceId){if(event.data.chromeMediaSourceId==="PermissionDeniedError"){callback("permission-denied")}else{callback(null,event.data.chromeMediaSourceId,getScreenConstraints(null,event.data.chromeMediaSourceId))}window.removeEventListener("message",onIFrameCallback)}if(event.data.chromeExtensionStatus){callback(event.data.chromeExtensionStatus,null,getScreenConstraints(event.data.chromeExtensionStatus));window.removeEventListener("message",onIFrameCallback)}}setTimeout(postGetSourceIdMessage,100)};function getScreenConstraints(error,sourceId){var screen_constraints={audio:false,video:{mandatory:{chromeMediaSource:error?"screen":"desktop",maxWidth:window.screen.width>1920?window.screen.width:1920,maxHeight:window.screen.height>1080?window.screen.height:1080},optional:[]}};if(sourceId){screen_constraints.video.mandatory.chromeMediaSourceId=sourceId}return screen_constraints}var iframe;function postGetSourceIdMessage(){if(!iframe){loadIFrame(postGetSourceIdMessage);return}if(!iframe.isLoaded){setTimeout(postGetSourceIdMessage,100);return}iframe.contentWindow.postMessage({captureSourceId:true},"*")}function loadIFrame(loadCallback){if(iframe){loadCallback();return}iframe=document.createElement("iframe");iframe.onload=function(){iframe.isLoaded=true;loadCallback()};iframe.src="https://www.webrtc-experiment.com/getSourceId/";iframe.style.display="none";(document.body||document.documentElement).appendChild(iframe)}window.getChromeExtensionStatus=function(callback){if(!!navigator.mozGetUserMedia){callback("installed-enabled");return}window.addEventListener("message",onIFrameCallback);function onIFrameCallback(event){if(!event.data)return;if(event.data.chromeExtensionStatus){callback(event.data.chromeExtensionStatus)}window.removeEventListener("message",onIFrameCallback)}setTimeout(postGetChromeExtensionStatusMessage,100)};function postGetChromeExtensionStatusMessage(){if(!iframe){loadIFrame(postGetChromeExtensionStatusMessage);return}if(!iframe.isLoaded){setTimeout(postGetChromeExtensionStatusMessage,100);return}iframe.contentWindow.postMessage({getChromeExtensionStatus:true},"*")}exports.getScreenId=getScreenId},{}],57:[function(require,module,exports){var chromeMediaSource="screen";var screenCallback;var isFirefox=typeof window.InstallTrigger!=="undefined";var isOpera=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0;var isChrome=!!window.chrome&&!isOpera;window.addEventListener("message",function(event){if(event.origin!=window.location.origin){return}onMessageCallback(event.data)});function onMessageCallback(data){if(data=="PermissionDeniedError"){chromeMediaSource="PermissionDeniedError";if(screenCallback)return screenCallback("PermissionDeniedError");else throw new Error("PermissionDeniedError")}if(data=="rtcmulticonnection-extension-loaded"){chromeMediaSource="desktop"}if(data.sourceId&&screenCallback){screenCallback(sourceId=data.sourceId)}}function isChromeExtensionAvailable(callback){if(isFirefox)return callback(false);if(chromeMediaSource=="desktop")return callback("isFirefox");window.postMessage("are-you-there","*");setTimeout(function(){if(chromeMediaSource=="screen"){callback("unavailable")}else callback("available")},2e3)}function getSourceId(callback){if(!callback)throw'"callback" parameter is mandatory.';if(sourceId)return callback(sourceId);screenCallback=callback;window.postMessage("get-sourceId","*")}function getChromeExtensionStatus(extensionid,callback){if(isFirefox)return callback("not-chrome");if(arguments.length!=2){callback=extensionid;extensionid="ajhifddimkapgcifgcodmmfdlknahffk"}var image=document.createElement("img");image.src="chrome-extension://"+extensionid+"/icon.png";image.onload=function(){chromeMediaSource="screen";window.postMessage("are-you-there","*");setTimeout(function(){if(chromeMediaSource=="screen"){callback(extensionid==extensionid?"installed-enabled":"installed-disabled")}else callback("installed-enabled")},2e3)};image.onerror=function(){callback("not-installed")}}function getScreenConstraints(callback){sourceId="";var firefoxScreenConstraints={mozMediaSource:"window",mediaSource:"window"};if(isFirefox)return callback(null,firefoxScreenConstraints);var screen_constraints={mandatory:{chromeMediaSource:chromeMediaSource,maxWidth:screen.width>1920?screen.width:1920,maxHeight:screen.height>1080?screen.height:1080},optional:[]};if(chromeMediaSource=="desktop"&&!sourceId){getSourceId(function(){screen_constraints.mandatory.chromeMediaSourceId=sourceId;callback(sourceId=="PermissionDeniedError"?sourceId:null,screen_constraints)});return}if(chromeMediaSource=="desktop"){screen_constraints.mandatory.chromeMediaSourceId=sourceId}callback(null,screen_constraints)}exports.getScreenConstraints=getScreenConstraints;exports.isChromeExtensionAvailable=isChromeExtensionAvailable;exports.getChromeExtensionStatus=getChromeExtensionStatus;exports.getSourceId=getSourceId},{}],58:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var platform=require("platform");var WebRtcStats=function(){function WebRtcStats(stream){this.stream=stream;this.webRtcStatsEnabled=false;this.statsInterval=1;this.stats={inbound:{audio:{bytesReceived:0,packetsReceived:0,packetsLost:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0,nackCount:0}},outbound:{audio:{bytesSent:0,packetsSent:0},video:{bytesSent:0,packetsSent:0,framesEncoded:0,nackCount:0}}}}WebRtcStats.prototype.isEnabled=function(){return this.webRtcStatsEnabled};WebRtcStats.prototype.initWebRtcStats=function(){var _this=this;var elastestInstrumentation=localStorage.getItem("elastest-instrumentation");if(elastestInstrumentation){console.warn("WebRtc stats enabled for stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId);this.webRtcStatsEnabled=true;var instrumentation_1=JSON.parse(elastestInstrumentation);this.statsInterval=instrumentation_1.webrtc.interval;console.warn("localStorage item: "+JSON.stringify(instrumentation_1));this.webRtcStatsIntervalId=setInterval(function(){_this.sendStatsToHttpEndpoint(instrumentation_1)},this.statsInterval*1e3);return}console.debug("WebRtc stats not enabled")};WebRtcStats.prototype.stopWebRtcStats=function(){if(this.webRtcStatsEnabled){clearInterval(this.webRtcStatsIntervalId);console.warn("WebRtc stats stopped for disposed stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId)}};WebRtcStats.prototype.sendStatsToHttpEndpoint=function(instrumentation){var _this=this;var sendPost=function(json){var http=new XMLHttpRequest;var url=instrumentation.webrtc.httpEndpoint;http.open("POST",url,true);http.setRequestHeader("Content-type","application/json");http.onreadystatechange=function(){if(http.readyState===4&&http.status===200){console.log("WebRtc stats successfully sent to "+url+" for stream "+_this.stream.streamId+" of connection "+_this.stream.connection.connectionId)}};http.send(json)};var f=function(stats){if(platform.name.indexOf("Firefox")!==-1){stats.forEach(function(stat){var json={};if(stat.type==="inbound-rtp"&&(stat.nackCount!==null&&stat.isRemote===false&&stat.id.startsWith("inbound")&&stat.remoteId.startsWith("inbound"))){var metricId="webrtc_inbound_"+stat.mediaType+"_"+stat.ssrc;var jit=stat.jitter*1e3;var metrics={bytesReceived:(stat.bytesReceived-_this.stats.inbound[stat.mediaType].bytesReceived)/_this.statsInterval,jitter:jit,packetsReceived:(stat.packetsReceived-_this.stats.inbound[stat.mediaType].packetsReceived)/_this.statsInterval,packetsLost:(stat.packetsLost-_this.stats.inbound[stat.mediaType].packetsLost)/_this.statsInterval};var units={bytesReceived:"bytes",jitter:"ms",packetsReceived:"packets",packetsLost:"packets"};if(stat.mediaType==="video"){metrics["framesDecoded"]=(stat.framesDecoded-_this.stats.inbound.video.framesDecoded)/_this.statsInterval;metrics["nackCount"]=(stat.nackCount-_this.stats.inbound.video.nackCount)/_this.statsInterval;units["framesDecoded"]="frames";units["nackCount"]="packets";_this.stats.inbound.video.framesDecoded=stat.framesDecoded;_this.stats.inbound.video.nackCount=stat.nackCount}_this.stats.inbound[stat.mediaType].bytesReceived=stat.bytesReceived;_this.stats.inbound[stat.mediaType].packetsReceived=stat.packetsReceived;_this.stats.inbound[stat.mediaType].packetsLost=stat.packetsLost;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}else if(stat.type==="outbound-rtp"&&(stat.isRemote===false&&stat.id.toLowerCase().includes("outbound"))){var metricId="webrtc_outbound_"+stat.mediaType+"_"+stat.ssrc;var metrics={bytesSent:(stat.bytesSent-_this.stats.outbound[stat.mediaType].bytesSent)/_this.statsInterval,packetsSent:(stat.packetsSent-_this.stats.outbound[stat.mediaType].packetsSent)/_this.statsInterval};var units={bytesSent:"bytes",packetsSent:"packets"};if(stat.mediaType==="video"){metrics["framesEncoded"]=(stat.framesEncoded-_this.stats.outbound.video.framesEncoded)/_this.statsInterval;units["framesEncoded"]="frames";_this.stats.outbound.video.framesEncoded=stat.framesEncoded}_this.stats.outbound[stat.mediaType].bytesSent=stat.bytesSent;_this.stats.outbound[stat.mediaType].packetsSent=stat.packetsSent;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}})}else if(platform.name.indexOf("Chrome")!==-1){for(var _i=0,_a=Object.keys(stats);_i<_a.length;_i++){var key=_a[_i];var stat=stats[key];if(stat.type==="ssrc"){var json={};if("bytesReceived"in stat&&(stat.mediaType==="audio"&&"audioOutputLevel"in stat||stat.mediaType==="video"&&"qpSum"in stat)){var metricId="webrtc_inbound_"+stat.mediaType+"_"+stat.ssrc;var metrics={bytesReceived:(stat.bytesReceived-_this.stats.inbound[stat.mediaType].bytesReceived)/_this.statsInterval,jitter:stat.googJitterBufferMs,packetsReceived:(stat.packetsReceived-_this.stats.inbound[stat.mediaType].packetsReceived)/_this.statsInterval,packetsLost:(stat.packetsLost-_this.stats.inbound[stat.mediaType].packetsLost)/_this.statsInterval};var units={bytesReceived:"bytes",jitter:"ms",packetsReceived:"packets",packetsLost:"packets"};if(stat.mediaType==="video"){metrics["framesDecoded"]=(stat.framesDecoded-_this.stats.inbound.video.framesDecoded)/_this.statsInterval;metrics["nackCount"]=(stat.googNacksSent-_this.stats.inbound.video.nackCount)/_this.statsInterval;units["framesDecoded"]="frames";units["nackCount"]="packets";_this.stats.inbound.video.framesDecoded=stat.framesDecoded;_this.stats.inbound.video.nackCount=stat.googNacksSent}_this.stats.inbound[stat.mediaType].bytesReceived=stat.bytesReceived;_this.stats.inbound[stat.mediaType].packetsReceived=stat.packetsReceived;_this.stats.inbound[stat.mediaType].packetsLost=stat.packetsLost;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}else if("bytesSent"in stat){var metricId="webrtc_outbound_"+stat.mediaType+"_"+stat.ssrc;var metrics={bytesSent:(stat.bytesSent-_this.stats.outbound[stat.mediaType].bytesSent)/_this.statsInterval,packetsSent:(stat.packetsSent-_this.stats.outbound[stat.mediaType].packetsSent)/_this.statsInterval};var units={bytesSent:"bytes",packetsSent:"packets"};if(stat.mediaType==="video"){metrics["framesEncoded"]=(stat.framesEncoded-_this.stats.outbound.video.framesEncoded)/_this.statsInterval;units["framesEncoded"]="frames";_this.stats.outbound.video.framesEncoded=stat.framesEncoded}_this.stats.outbound[stat.mediaType].bytesSent=stat.bytesSent;_this.stats.outbound[stat.mediaType].packetsSent=stat.packetsSent;json={"@timestamp":new Date(stat.timestamp).toISOString(),exec:instrumentation.exec,component:instrumentation.component,stream:"webRtc",type:metricId,stream_type:"composed_metrics",units:units};json[metricId]=metrics;sendPost(JSON.stringify(json))}}}}};this.getStatsAgnostic(this.stream.getRTCPeerConnection(),f,function(error){console.log(error)})};WebRtcStats.prototype.standardizeReport=function(response){if(platform.name.indexOf("Firefox")!==-1){return response}var standardReport={};response.result().forEach(function(report){var standardStats={id:report.id,timestamp:report.timestamp,type:report.type};report.names().forEach(function(name){standardStats[name]=report.stat(name)});standardReport[standardStats.id]=standardStats});return standardReport};WebRtcStats.prototype.getStatsAgnostic=function(pc,successCb,failureCb){var _this=this;if(platform.name.indexOf("Firefox")!==-1){return pc.getStats(null,function(response){var report=_this.standardizeReport(response);successCb(report)},failureCb)}else if(platform.name.indexOf("Chrome")!==-1){return pc.getStats(function(response){var report=_this.standardizeReport(response);successCb(report)},null,failureCb)}};return WebRtcStats}();exports.WebRtcStats=WebRtcStats},{platform:9}]},{},[26]); \ No newline at end of file diff --git a/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js.map b/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js.map index c0374c23e8..85e4e942ab 100644 --- a/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js.map +++ b/openvidu-browser/static/js/openvidu-browser-2.0.0.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../node_modules/browser-pack/_prelude.js","../node_modules/events/events.js","../node_modules/freeice/index.js","../node_modules/freeice/stun.json","../node_modules/freeice/turn.json","../node_modules/hark/hark.js","../node_modules/inherits/inherits_browser.js","../node_modules/merge/merge.js","../node_modules/normalice/index.js","../node_modules/platform/platform.js","../node_modules/sdp-transform/lib/grammar.js","../node_modules/sdp-transform/lib/index.js","../node_modules/sdp-transform/lib/parser.js","../node_modules/sdp-transform/lib/writer.js","../node_modules/sdp-translator/lib/array-equals.js","../node_modules/sdp-translator/lib/index.js","../node_modules/sdp-translator/lib/interop.js","../node_modules/sdp-translator/lib/transform.js","../node_modules/ua-parser-js/src/ua-parser.js","../node_modules/uuid/index.js","../node_modules/uuid/lib/bytesToUuid.js","../node_modules/uuid/lib/rng-browser.js","../node_modules/uuid/v1.js","../node_modules/uuid/v4.js","../node_modules/wildemitter/wildemitter.js","../node_modules/wolfy87-eventemitter/EventEmitter.js","Main.ts","OpenVidu/Connection.ts","OpenVidu/LocalRecorder.ts","OpenVidu/OpenVidu.ts","OpenVidu/Publisher.ts","OpenVidu/Session.ts","OpenVidu/Stream.ts","OpenVidu/Subscriber.ts","OpenViduInternal/Enums/LocalRecorderState.ts","OpenViduInternal/Enums/OpenViduError.ts","OpenViduInternal/Enums/VideoInsertMode.ts","OpenViduInternal/Events/ConnectionEvent.ts","OpenViduInternal/Events/Event.ts","OpenViduInternal/Events/PublisherSpeakingEvent.ts","OpenViduInternal/Events/RecordingEvent.ts","OpenViduInternal/Events/SessionDisconnectedEvent.ts","OpenViduInternal/Events/SignalEvent.ts","OpenViduInternal/Events/StreamEvent.ts","OpenViduInternal/Events/VideoElementEvent.ts","OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js","OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js","OpenViduInternal/KurentoUtils/kurento-utils-js/index.js","OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js","OpenViduInternal/ScreenSharing/Screen-Capturing.js","OpenViduInternal/VersionAdapter.ts","OpenViduInternal/WebRtcStats/WebRtcStats.ts","index.ts"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","objectCreate","Object","create","objectCreatePolyfill","objectKeys","keys","objectKeysPolyfill","bind","Function","prototype","functionBindPolyfill","EventEmitter","this","_events","hasOwnProperty","_eventsCount","_maxListeners","undefined","defaultMaxListeners","hasDefineProperty","defineProperty","value","x","err","enumerable","get","set","arg","TypeError","setMaxListeners","isNaN","$getMaxListeners","that","getMaxListeners","emitNone","handler","isFn","self","len","listeners","arrayClone","emitOne","arg1","emitTwo","arg2","emitThree","arg3","emitMany","args","apply","emit","type","er","events","doError","error","arguments","context","Array","_addListener","target","listener","prepend","m","existing","newListener","unshift","push","warned","w","String","name","emitter","count","console","warn","message","addListener","on","prependListener","onceWrapper","fired","removeListener","wrapFn","_onceWrap","state","wrapped","once","prependOnceListener","list","position","originalListener","shift","spliceOne","removeAllListeners","key","evlistener","ret","unwrapListeners","listenerCount","eventNames","Reflect","ownKeys","index","k","pop","arr","copy","proto","F","obj","fn","normalice","freeice","opts","servers","stun","turn","stunCount","turnCount","selected","getServers","out","input","concat","idx","Math","random","splice","map","url","WildEmitter","getMaxVolume","analyser","fftBins","maxVolume","Infinity","getFloatFrequencyData","ii","audioContextType","window","AudioContext","webkitAudioContext","audioContext","stream","options","harker","smoothing","interval","threshold","play","history","running","sourceNode","createAnalyser","fftSize","smoothingTimeConstant","Float32Array","frequencyBinCount","jquery","HTMLAudioElement","HTMLVideoElement","createMediaElementSource","createMediaStreamSource","connect","destination","speaking","suspend","resume","onstatechange","setThreshold","setInterval","stop","disconnect","speakingHistory","looper","setTimeout","currentVolume","inherits","ctor","superCtor","super_","constructor","writable","configurable","TempCtor","isNode","Public","clone","merge","publicName","recursive","output","typeOf","size","merge_recursive","base","extend","argv","result","item","sitem","toString","slice","toLowerCase","protocols","protocol","parts","trim","indexOf","split","username","credential","urls","objectTypes","function","object","root","oldRoot","freeExports","freeModule","nodeType","freeGlobal","global","maxSafeInteger","pow","reOpera","thisBinding","objectProto","capitalize","string","charAt","toUpperCase","cleanupOS","os","pattern","label","data","10.0","6.4","6.3","6.2","6.1","6.0","5.2","5.1","5.01","5.0","4.0","4.90","test","exec","replace","RegExp","format","each","callback","forOwn","getClassOf","isHostType","property","qualify","reduce","array","accumulator","parse","ua","isCustomContext","nav","navigator","userAgent","isModuleScope","likeChrome","objectClass","airRuntimeClass","enviroClass","javaClass","java","phantomClass","rhino","environment","alpha","beta","doc","document","opera","operamini","operaClass","arch","description","prerelease","useFeatures","version","isSpecialCasedOS","layout","getLayout","getName","product","getProduct","manufacturer","getManufacturer","Apple","iPad","iPhone","iPod","Archos","Amazon","Kindle","Kindle Fire","Asus","Transformer","Barnes & Noble","Nook","BlackBerry","PlayBook","Google","Google TV","Nexus","HP","TouchPad","HTC","LG","Microsoft","Xbox","Xbox One","Motorola","Xoom","Nintendo","Wii U","Wii","Nokia","Lumia","Samsung","Galaxy S","Galaxy S2","Galaxy S3","Galaxy S4","Sony","PlayStation","PlayStation Vita","getOS","guesses","guess","getVersion","patterns","toStringPlatform","parseFloat","lang","System","getProperty","join","system","process","browser","versions","electron","node","nw","platform","runtime","flash","Capabilities","phantom","major","minor","patch","documentMode","toFixed","appMinorVersion","external","parseInt","architecture","family","cpuClass","define","amd","grammar","v","reg","names","s","z","b","rate","address","subtype","config","sessionConfig","str","raddr","tcptype","generation","forEach","objs","parser","writer","write","parseFmtpConfig","parsePayloads","parseRemoteCandidates","toIntIfInt","Number","attachProperties","match","location","rawName","parseReg","content","needsBlank","keyLocation","validLine","sdp","session","media","filter","l","rtp","fmtp","j","fmtpReducer","acc","expr","candidates","component","ip","port","formatRegExp","formatStr","makeLine","defaultOuterOrder","defaultInnerOrder","mLine","payloads","outerOrder","innerOrder","el","arrayEquals","Interop","transform","cache","mlB2UMap","mlU2BMap","candidateToUnifiedPlan","candidate","cand","RTCIceCandidate","sdpMLineIndex","candidateToPlanB","sdpMid","getFirstSendingIndexFromAnswer","answer","isArray","direction","toPlanB","desc","every","mid","rewrite","uLine","codec","offer","type2bl","types","rtcpMux","sources","ssrc","msid","ssrcGroups","bundleOnly","groups","some","group","mids","msidSemantic","semantic","token","resStr","RTCSessionDescription","addSetupAttr","setup","toUnifiedPlan","hasBundle","g","sort","mustBeBundle","cached","recvonlySsrcs","audio","video","mid2ul","bIdx","uIdx","sources2ul","iceUfrag","icePwd","fingerprint","rtcpFb","bLine","hash","JSON","stringify","ssrc2group","ssrcGroup","ssrcs","ssrc2ml","related","done","source","attribute","id","LIBVERSION","EMPTY","UNKNOWN","FUNC_TYPE","UNDEF_TYPE","OBJ_TYPE","STR_TYPE","MAJOR","MODEL","NAME","TYPE","VENDOR","VERSION","ARCHITECTURE","CONSOLE","MOBILE","TABLET","SMARTTV","WEARABLE","EMBEDDED","util","regexes","extensions","margedRegexes","has","str1","str2","lowerize","mapper","rgx","arrays","q","matches","regex","props","maps","oldsafari","1.0","1.2","1.3","2.0","2.0.2","2.0.3","2.0.4","?","device","amazon","model","Fire Phone","sprint","Evo Shift 4G","vendor","Sprint","windows","ME","NT 3.11","NT 4.0","2000","XP","Vista","7","8","8.1","10","RT","cpu","engine","UAParser","uastring","getResult","rgxmap","getBrowser","getCPU","getDevice","getEngine","getUA","setUA","BROWSER","CPU","DEVICE","ENGINE","OS","$","jQuery","Zepto","prop","v1","v4","uuid","byteToHex","substr","bytesToUuid","buf","offset","bth","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","whatwgRNG","rnds","mathRNG","rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","clockseq","seedBytes","msecs","Date","getTime","nsecs","dt","tl","tmh","mixin","isWildEmitter","event","groupName","callbacks","hasGroup","func","_groupName","off","releaseGroup","handlers","specialCallbacks","getWildcardCallbacks","eventName","originalGlobalValue","indexOfListener","alias","aliasClosure","getListeners","evt","_getEvents","response","flattenListeners","flatListeners","getListenersAsObject","isValidListener","listenerIsWrapped","addOnceListener","defineEvent","defineEvents","evts","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","emitEvent","listenersMap","_getOnceReturnValue","trigger","setOnceReturnValue","_onceReturnValue","noConflict","OpenVidu_1","OpenVidu","__1","Connection","disposed","msg","info","connectionId","metadata","streams","initRemoteStreams","creationTime","sendIceCandidate","debug","outboundStreamOpts","openvidu","sendRequest","endpointName","_this","streamOptions","connection","frameRate","recvAudio","audioActive","recvVideo","videoActive","typeOfVideo","Stream","addStream","inboundStreamOpts","removeStream","streamId","dispose","LocalRecorderState_1","LocalRecorder","chunks","LocalRecoderState","READY","record","Promise","resolve","reject","MediaRecorder","log","isTypeSupported","mimeType","mediaRecorder","getMediaStream","start","ondataavailable","onerror","onstart","onstop","onStopDefault","onpause","onresume","onwarning","RECORDING","FINISHED","pause","PAUSED","preview","parentElement","videoPreview","createElement","autoplay","htmlParentElementId","parentElementDom","getElementById","appendChild","src","videoPreviewSrc","clean","blob","then","catch","download","style","display","body","URL","createObjectURL","href","click","revokeObjectURL","removeChild","getBlob","uploadAsBinary","endpoint","headers","http_1","XMLHttpRequest","open","_i","_a","setRequestHeader","onreadystatechange","readyState","status","responseText","send","uploadAsMultipartfile","http_2","sendable","FormData","append","Blob","OpenViduError_1","VideoInsertMode_1","VersionAdapter_1","RpcBuilder","screenSharingAuto","screenSharing","SECRET_PARAM","RECORDER_PARAM","secret","recorder","advancedConfiguration","initSession","sessionId","Session","initPublisher","targetElement","param2","param3","properties","adaptPublisherProperties","audioSource","isMediaStreamTrack","videoSource","insertMode","VideoInsertMode","APPEND","mirror","publishAudio","publishVideo","resolution","publisher","Publisher","completionHandler","initialize","initPublisherAsync","initLocalRecorder","checkSystemRequirements","getDevices","mediaDevices","enumerateDevices","deviceInfos","devices","deviceInfo","kind","deviceId","getUserMedia","generateMediaConstraints","constraints","mediaStream","errorName","errorMessage","OpenViduErrorName","MICROPHONE_ACCESS_DENIED","CAMERA_ACCESS_DENIED","SCREEN_CAPTURE_DENIED","OpenViduError","enableProdMode","setAdvancedConfiguration","configuration","disconnectCallback","isRoomAvailable","onLostConnection","alert","reconnectingCallback","reconnectedCallback","getSecretFromUrl","endOfSecret","lastIndexOf","substring","getRecorderFromUrl","Boolean","valueOf","getFinalWsUrl","getUrlWithoutSecret","publisherProperties","height","ideal","width","mediaConstraints","exact","widthAndHeight","screenShareChromeExtension","extensionId","getChromeExtensionStatus","getScreenConstraints","screenConstraints","error_1","SCREEN_EXTENSION_DISABLED","SCREEN_EXTENSION_NOT_INSTALLED","getScreenId","sourceId","error_2","error_3","error_4","startWs","onConnectSucces","heartbeat","sendCloseMessage","ws","uri","wsUri","useSockJS","onconnected","ondisconnect","onreconnecting","onreconnected","rpc","requestTimeout","participantJoined","onParticipantJoined","participantPublished","onParticipantPublished","participantUnpublished","onParticipantUnpublished","participantLeft","onParticipantLeft","participantEvicted","onParticipantEvicted","recordingStarted","onRecordingStarted","recordingStopped","onRecordingStopped","sendMessage","onNewMessage","iceCandidate","recvIceCandidate","mediaError","onMediaError","jsonRpcClient","clients","JsonRpcClient","closeWs","close","processOpenViduUrl","method","params","mediaSource","is","enabled","muted","getWsUri","getSecret","getRecorder","StreamEvent_1","VideoElementEvent_1","accessAllowed","ee","element","VideoElementEvent","reason","streamEvent","StreamEvent","callDefaultBehaviour","HTMLElement","getWebRtcPeer","audioEnabled","videoEnabled","subscribeToRemote","subscribeToMyRemote","isPublisherPublished","isVideoELementCreated","getVideoElement","displayMyRemote","currentTime","paused","ended","accessIsAllowed","accessIsDenied","userMediaHasVideo","userMediaHasAudio","errorCallback","openViduError","successCallback","removeTrack","getAudioTracks","addTrack","getVideoTracks","setMediaStream","insertVideo","outboundStreamOptions","setOutboundStreamOptions","constraintsAux","timeForDialogEvent","isSendVideo","startTime_1","now","setPermissionDialogTimer","videoOnlyStream","clearPermissionDialogTimer","isSendAudio","audioOnlyStream","track","INPUT_AUDIO_DEVICE_NOT_FOUND","constraint","PUBLISHER_PROPERTIES_ERROR","INPUT_VIDEO_DEVICE_NOT_FOUND","isSendScreen","startTime_2","NO_INPUT_SOURCE_SET","updateSession","eventArray","waitTime","permissionDialogTimeout","startTime","clearTimeout","ConnectionEvent_1","SessionDisconnectedEvent_1","SignalEvent_1","RecordingEvent_1","remoteStreamsCreated","remoteConnections","speakingEventsEnabled","solveIfCallback","participantId","stringClientMetadata","connectAux","BROWSER_NOT_SUPPORTED","leave","subscribe","param4","subscribeToAudio","subscribeToVideo","subscriber","Subscriber","subscribeAsync","unsubscribe","sender","disposeWebRtcPeer","disposeMediaStream","removeVideo","publish","unpublish","signal","signalMessage","to","connectionIds_1","speechEvent","hasAudio","enableSpeakingEvents","enableOnceSpeakingEvents","disableSpeakingEvents","joinParams","connections","existingParticipants","participant","ConnectionEvent","getConnection","GENERIC_ERROR","getRemoteConnection","afterConnectionFound","con","from","SignalEvent","addIceCandidate","onSessionClosed","room","confirm","assign","RecordingEvent","forced","sessionDisconnectEvent","SessionDisconnectedEvent","WebRtcStats_1","PublisherSpeakingEvent_1","kurentoUtils","isSubscribeToRemote","isReadyToPublish","hasVideo","srcObject","webRtcPeer","getRTCPeerConnection","peerConnection","initWebRtcPeerReceive","initWebRtcPeerSend","stopWebRtcStats","isLocal","controls","mirrorVideo","oncanplay","title","parentId","insertElementWithMode","setSpeechEventIfNotExists","harkOptions","publisherSpeakingEventsOptions","WebRtcPeer","hark","PublisherSpeakingEvent","userMediaConstraints","videoStream","onicecandidate","iceServers","sdpOfferParam","wp","sdpOffer","doLoopback","processSdpAnswer","sdpAnswer","WebRtcPeerSendrecv","generateOffer","WebRtcPeerSendonly","offerConstraints","WebRtcPeerRecvonly","setRemoteDescription","getRemoteStreams","initWebRtcStats","webRtcStats","WebRtcStats","isEnabled","AFTER","parentNode","insertBefore","nextSibling","BEFORE","PREPEND","childNodes","REPLACE","replaceChild","webkitTransform","Event_1","_super","__extends","cancelable","Event","hasBeenPrevented","isDefaultPrevented","preventDefault","remoteConnection","streamOptionsServer","Mapper","key2","ids","WebSocketWithReconnection","PING_INTERVAL","RECONNECTING","CONNECTED","DISCONNECTED","Logger","wsConfig","notReconnectIfNumLessThan","pingNextNum","enabledPings","pingPongStarted","pingInterval","pull","request","reply","updateNotReconnectIfLessThan","usePing","rpcBuilderOptions","request_timeout","ping_request_timeout","heartbeatRequestTimeout","packers","JsonRPC","requestTime","encode","sendPing","pingNum","reconnectWs","clearInterval","forceClose","millis","reconnect","BrowserWebSocket","WebSocket","MozWebSocket","MAX_RETRIES","RETRY_TIME_MS","CONNECTING","OPEN","CLOSING","CLOSED","closing","registerMessageHandler","reconnecting","forcingDisconnection","SockJS","onopen","logConnected","reconnectionOnClose","reconnectToSameUri","onclose","maxRetries","numRetries","reconnectToNewUri","newWsUriOnReconnection","newWsUri","reconnectWsUri","newWs","onErrorOrClose","goodWsUri","addEventListener","defineProperty_IE8","oThis","aArgs","fToBind","fNOP","fBound","BASE_TIMEOUT","unifyResponseMethods","responseMethods","unifyTransport","transport","postMessage","onmessage","SyntaxError","RpcNotification","packer","onRequest","pack","unpack","peerID","max_retries","transportMessage","decode","getTransport","setTransport","removeEventListener","response_timeout","duplicates_timeout","requestID","requests","responses","processedResponses","message2Key","storeResponse","dest","timeout","storeProcessedResponse","ack","RpcRequest","duplicated","responseMethod","cancel","retried","dispatchCallback","encode_transport","rt","retry","notification","processRequest","idAck","processResponse","duplicatedResponse","processed","transports","jsonrpc","result_defined","error_defined","XmlRPC","sdpTranslator","logger","MEDIA_CONSTRAINTS","framerate","usePlanB","noop","trackStop","streamStop","getTracks","dumpSDP","bufferizeCandidates","pc","candidatesQueue","signalingState","entry","remoteDescription","removeFIDFromOffer","getSimulcastInfo","videoTracks","lines","mode","localVideo","remoteVideo","audioStream","connectionConstraints","sendSource","guid","oncandidategatheringdone","simulcast","multistream","interop","candidatesQueueOut","candidategatheringdone","defineProperties","currentFrame","HAVE_CURRENT_DATA","canvas","videoWidth","videoHeight","getContext","drawImage","RTCPeerConnection","onaddstream","onnegotiationneeded","offerAudio","offerVideo","browserDependantConstraints","offerToReceiveAudio","offerToReceiveVideo","createOffer","mangleSdpToAddSimulcast","setLocalDescription","localDescription","processAnswer","getLocalSessionDescriptor","getRemoteSessionDescriptor","setRemoteVideo","load","showLocalVideo","planBAnswer","processOffer","planBOffer","createAnswer","getMedia","constraints_","cancelChooseDesktopMedia","createEnableDescriptor","getLocalStreams","tracks","trackSetEnable","getLocalStream","getRemoteStream","harkUtils","mozGetUserMedia","mozMediaSource","onIFrameCallback","chromeMediaSourceId","chromeExtensionStatus","postGetSourceIdMessage","screen_constraints","mandatory","chromeMediaSource","maxWidth","screen","maxHeight","optional","iframe","loadIFrame","isLoaded","contentWindow","captureSourceId","loadCallback","onload","documentElement","postGetChromeExtensionStatusMessage","screenCallback","isFirefox","InstallTrigger","isOpera","isChrome","chrome","origin","onMessageCallback","isChromeExtensionAvailable","getSourceId","extensionid","image","firefoxScreenConstraints","methodName","promise","scr","res","quality","webRtcStatsEnabled","statsInterval","stats","inbound","bytesReceived","packetsReceived","packetsLost","framesDecoded","nackCount","outbound","bytesSent","packetsSent","framesEncoded","elastestInstrumentation","localStorage","getItem","instrumentation_1","webrtc","webRtcStatsIntervalId","sendStatsToHttpEndpoint","instrumentation","sendPost","json","http","httpEndpoint","stat","isRemote","startsWith","remoteId","metricId","mediaType","jit","jitter","metrics","units","@timestamp","timestamp","toISOString","stream_type","includes","googJitterBufferMs","googNacksSent","getStatsAgnostic","standardizeReport","standardReport","report","standardStats","successCb","failureCb","getStats","Session_1","Publisher_1","Subscriber_1","Stream_1","Connection_1","LocalRecorder_1"],"mappings":"CAAA,WAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,KAAA,MAAAK,EAAAE,KAAA,mBAAAF,EAAA,IAAAG,EAAAX,EAAAG,GAAA,CAAAS,QAAA,IAAAb,EAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,IAAAE,EAAAD,EAAAI,GAAA,GA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j/B,QAAQa,QAAQ,SAACjU,MACpBsyC,cAActyC,MAAQqyC,OAAOpB,KAAKjxC,QAEtCoyC,eAAeE,cAAch3B,IAAMg3B,gBAGvC,OAAOF,gBAGH7S,YAAArjC,UAAAg2C,iBAAR,SAAyBhJ,GAAIqJ,UAAWC,WAAxC,IAAA7rB,MAAAtqB,KACI,GAAI0V,SAAS/R,KAAM0I,QAAQ,cAAgB,EAAG,CAE1C,OAAOwgC,GAAGuJ,SAAS,KAAM,SAACxuB,UACtB,IAAMouB,OAAS1rB,MAAKwrB,kBAAkBluB,UACtCsuB,UAAUF,SACXG,gBACA,GAAIzgC,SAAS/R,KAAM0I,QAAQ,aAAe,EAAG,CAEhD,OAAOwgC,GAAGuJ,SAAS,SAACxuB,UAChB,IAAMouB,OAAS1rB,MAAKwrB,kBAAkBluB,UACtCsuB,UAAUF,SACX,KAAMG,aAIrB,OAAAjT,YAjUA,GAAankC,QAAAmkC,YAAAA,sICvBb,IAAA9Z,WAAA3qB,QAAA,uBAASM,QAAAsqB,SAAAD,WAAAC,SACT,IAAAgtB,UAAA53C,QAAA,sBAASM,QAAA6xB,QAAAylB,UAAAzlB,QACT,IAAA0lB,YAAA73C,QAAA,wBAASM,QAAA+yB,UAAAwkB,YAAAxkB,UACT,IAAAykB,aAAA93C,QAAA,yBAASM,QAAA++B,WAAAyY,aAAAzY,WACT,IAAA0Y,SAAA/3C,QAAA,qBAASM,QAAAgsB,OAAAyrB,SAAAzrB,OACT,IAAA0rB,aAAAh4C,QAAA,yBAASM,QAAAwqB,WAAAktB,aAAAltB,WACT,IAAAmtB,gBAAAj4C,QAAA,4BAASM,QAAAusB,cAAAorB,gBAAAprB"} \ No newline at end of file +{"version":3,"sources":["../node_modules/browser-pack/_prelude.js","../node_modules/events/events.js","../node_modules/freeice/index.js","../node_modules/freeice/stun.json","../node_modules/freeice/turn.json","../node_modules/hark/hark.js","../node_modules/inherits/inherits_browser.js","../node_modules/merge/merge.js","../node_modules/normalice/index.js","../node_modules/platform/platform.js","../node_modules/sdp-transform/lib/grammar.js","../node_modules/sdp-transform/lib/index.js","../node_modules/sdp-transform/lib/parser.js","../node_modules/sdp-transform/lib/writer.js","../node_modules/sdp-translator/lib/array-equals.js","../node_modules/sdp-translator/lib/index.js","../node_modules/sdp-translator/lib/interop.js","../node_modules/sdp-translator/lib/transform.js","../node_modules/ua-parser-js/src/ua-parser.js","../node_modules/uuid/index.js","../node_modules/uuid/lib/bytesToUuid.js","../node_modules/uuid/lib/rng-browser.js","../node_modules/uuid/v1.js","../node_modules/uuid/v4.js","../node_modules/wildemitter/wildemitter.js","../node_modules/wolfy87-eventemitter/EventEmitter.js","Main.ts","OpenVidu/Connection.ts","OpenVidu/LocalRecorder.ts","OpenVidu/OpenVidu.ts","OpenVidu/Publisher.ts","OpenVidu/Session.ts","OpenVidu/Stream.ts","OpenVidu/Subscriber.ts","OpenViduInternal/Enums/LocalRecorderState.ts","OpenViduInternal/Enums/OpenViduError.ts","OpenViduInternal/Enums/VideoInsertMode.ts","OpenViduInternal/Events/ConnectionEvent.ts","OpenViduInternal/Events/Event.ts","OpenViduInternal/Events/PublisherSpeakingEvent.ts","OpenViduInternal/Events/RecordingEvent.ts","OpenViduInternal/Events/SessionDisconnectedEvent.ts","OpenViduInternal/Events/SignalEvent.ts","OpenViduInternal/Events/StreamEvent.ts","OpenViduInternal/Events/VideoElementEvent.ts","OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js","OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js","OpenViduInternal/KurentoUtils/kurento-utils-js/index.js","OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js","OpenViduInternal/ScreenSharing/Screen-Capturing.js","OpenViduInternal/WebRtcStats/WebRtcStats.ts"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","objectCreate","Object","create","objectCreatePolyfill","objectKeys","keys","objectKeysPolyfill","bind","Function","prototype","functionBindPolyfill","EventEmitter","this","_events","hasOwnProperty","_eventsCount","_maxListeners","undefined","defaultMaxListeners","hasDefineProperty","defineProperty","value","x","err","enumerable","get","set","arg","TypeError","setMaxListeners","isNaN","$getMaxListeners","that","getMaxListeners","emitNone","handler","isFn","self","len","listeners","arrayClone","emitOne","arg1","emitTwo","arg2","emitThree","arg3","emitMany","args","apply","emit","type","er","events","doError","error","arguments","context","Array","_addListener","target","listener","prepend","m","existing","newListener","unshift","push","warned","w","String","name","emitter","count","console","warn","message","addListener","on","prependListener","onceWrapper","fired","removeListener","wrapFn","_onceWrap","state","wrapped","once","prependOnceListener","list","position","originalListener","shift","spliceOne","removeAllListeners","key","evlistener","ret","unwrapListeners","listenerCount","eventNames","Reflect","ownKeys","index","k","pop","arr","copy","proto","F","obj","fn","normalice","freeice","opts","servers","stun","turn","stunCount","turnCount","selected","getServers","out","input","concat","idx","Math","random","splice","map","url","WildEmitter","getMaxVolume","analyser","fftBins","maxVolume","Infinity","getFloatFrequencyData","ii","audioContextType","window","AudioContext","webkitAudioContext","audioContext","stream","options","harker","smoothing","interval","threshold","play","history","running","sourceNode","createAnalyser","fftSize","smoothingTimeConstant","Float32Array","frequencyBinCount","jquery","HTMLAudioElement","HTMLVideoElement","createMediaElementSource","createMediaStreamSource","connect","destination","speaking","suspend","resume","onstatechange","setThreshold","setInterval","stop","disconnect","speakingHistory","looper","setTimeout","currentVolume","inherits","ctor","superCtor","super_","constructor","writable","configurable","TempCtor","isNode","Public","clone","merge","publicName","recursive","output","typeOf","size","merge_recursive","base","extend","argv","result","item","sitem","toString","slice","toLowerCase","protocols","protocol","parts","trim","indexOf","split","username","credential","urls","objectTypes","function","object","root","oldRoot","freeExports","freeModule","nodeType","freeGlobal","global","maxSafeInteger","pow","reOpera","thisBinding","objectProto","capitalize","string","charAt","toUpperCase","cleanupOS","os","pattern","label","data","10.0","6.4","6.3","6.2","6.1","6.0","5.2","5.1","5.01","5.0","4.0","4.90","test","exec","replace","RegExp","format","each","callback","forOwn","getClassOf","isHostType","property","qualify","reduce","array","accumulator","parse","ua","isCustomContext","nav","navigator","userAgent","isModuleScope","likeChrome","objectClass","airRuntimeClass","enviroClass","javaClass","java","phantomClass","rhino","environment","alpha","beta","doc","document","opera","operamini","operaClass","arch","description","prerelease","useFeatures","version","isSpecialCasedOS","layout","getLayout","getName","product","getProduct","manufacturer","getManufacturer","Apple","iPad","iPhone","iPod","Archos","Amazon","Kindle","Kindle Fire","Asus","Transformer","Barnes & Noble","Nook","BlackBerry","PlayBook","Google","Google TV","Nexus","HP","TouchPad","HTC","LG","Microsoft","Xbox","Xbox One","Motorola","Xoom","Nintendo","Wii U","Wii","Nokia","Lumia","Samsung","Galaxy S","Galaxy S2","Galaxy S3","Galaxy S4","Sony","PlayStation","PlayStation Vita","getOS","guesses","guess","getVersion","patterns","toStringPlatform","parseFloat","lang","System","getProperty","join","system","process","browser","versions","electron","node","nw","platform","runtime","flash","Capabilities","phantom","major","minor","patch","documentMode","toFixed","appMinorVersion","external","parseInt","architecture","family","cpuClass","define","amd","grammar","v","reg","names","s","z","b","rate","address","subtype","config","sessionConfig","str","raddr","tcptype","generation","forEach","objs","parser","writer","write","parseFmtpConfig","parsePayloads","parseRemoteCandidates","toIntIfInt","Number","attachProperties","match","location","rawName","parseReg","content","needsBlank","keyLocation","validLine","sdp","session","media","filter","l","rtp","fmtp","j","fmtpReducer","acc","expr","candidates","component","ip","port","formatRegExp","formatStr","makeLine","defaultOuterOrder","defaultInnerOrder","mLine","payloads","outerOrder","innerOrder","el","arrayEquals","Interop","transform","cache","mlB2UMap","mlU2BMap","candidateToUnifiedPlan","candidate","cand","RTCIceCandidate","sdpMLineIndex","candidateToPlanB","sdpMid","getFirstSendingIndexFromAnswer","answer","isArray","direction","toPlanB","desc","every","mid","rewrite","uLine","codec","offer","type2bl","types","rtcpMux","sources","ssrc","msid","ssrcGroups","bundleOnly","groups","some","group","mids","msidSemantic","semantic","token","resStr","RTCSessionDescription","addSetupAttr","setup","toUnifiedPlan","hasBundle","g","sort","mustBeBundle","cached","recvonlySsrcs","audio","video","mid2ul","bIdx","uIdx","sources2ul","iceUfrag","icePwd","fingerprint","rtcpFb","bLine","hash","JSON","stringify","ssrc2group","ssrcGroup","ssrcs","ssrc2ml","related","done","source","attribute","id","LIBVERSION","EMPTY","UNKNOWN","FUNC_TYPE","UNDEF_TYPE","OBJ_TYPE","STR_TYPE","MAJOR","MODEL","NAME","TYPE","VENDOR","VERSION","ARCHITECTURE","CONSOLE","MOBILE","TABLET","SMARTTV","WEARABLE","EMBEDDED","util","regexes","extensions","margedRegexes","has","str1","str2","lowerize","mapper","rgx","arrays","q","matches","regex","props","maps","oldsafari","1.0","1.2","1.3","2.0","2.0.2","2.0.3","2.0.4","?","device","amazon","model","Fire Phone","sprint","Evo Shift 4G","vendor","Sprint","windows","ME","NT 3.11","NT 4.0","2000","XP","Vista","7","8","8.1","10","RT","cpu","engine","UAParser","uastring","getResult","rgxmap","getBrowser","getCPU","getDevice","getEngine","getUA","setUA","BROWSER","CPU","DEVICE","ENGINE","OS","$","jQuery","Zepto","prop","v1","v4","uuid","byteToHex","substr","bytesToUuid","buf","offset","bth","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","whatwgRNG","rnds","mathRNG","rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","clockseq","seedBytes","msecs","Date","getTime","nsecs","dt","tl","tmh","mixin","isWildEmitter","event","groupName","callbacks","hasGroup","func","_groupName","off","releaseGroup","handlers","specialCallbacks","getWildcardCallbacks","eventName","originalGlobalValue","indexOfListener","alias","aliasClosure","getListeners","evt","_getEvents","response","flattenListeners","flatListeners","getListenersAsObject","isValidListener","listenerIsWrapped","addOnceListener","defineEvent","defineEvents","evts","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","emitEvent","listenersMap","_getOnceReturnValue","trigger","setOnceReturnValue","_onceReturnValue","noConflict","OpenVidu_1","OpenVidu","Stream_1","Connection","disposed","msg","info","connectionId","metadata","streams","initRemoteStreams","creationTime","sendIceCandidate","debug","outboundStreamOpts","openvidu","sendRequest","endpointName","_this","streamOptions","connection","frameRate","recvAudio","audioActive","recvVideo","videoActive","typeOfVideo","Stream","addStream","inboundStreamOpts","removeStream","streamId","dispose","LocalRecorderState_1","LocalRecorder","chunks","LocalRecorderState","READY","record","Promise","resolve","reject","MediaRecorder","log","isTypeSupported","mimeType","mediaRecorder","getMediaStream","start","ondataavailable","onerror","onstart","onstop","onStopDefault","onpause","onresume","onwarning","RECORDING","FINISHED","pause","PAUSED","preview","parentElement","videoPreview","createElement","autoplay","htmlParentElementId","parentElementDom","getElementById","appendChild","src","videoPreviewSrc","clean","blob","then","catch","download","style","display","body","URL","createObjectURL","href","click","revokeObjectURL","removeChild","getBlob","uploadAsBinary","endpoint","headers","http_1","XMLHttpRequest","open","_i","_a","setRequestHeader","onreadystatechange","readyState","status","responseText","send","uploadAsMultipartfile","http_2","sendable","FormData","append","Blob","LocalRecorder_1","Publisher_1","Session_1","OpenViduError_1","VideoInsertMode_1","RpcBuilder","screenSharingAuto","screenSharing","secret","recorder","advancedConfiguration","initSession","Session","initPublisher","targetElement","param2","param3","properties","audioSource","isMediaStreamTrack","videoSource","insertMode","VideoInsertMode","APPEND","mirror","publishAudio","publishVideo","resolution","publisher","Publisher","completionHandler","initialize","initPublisherAsync","initLocalRecorder","checkSystemRequirements","getDevices","mediaDevices","enumerateDevices","deviceInfos","devices","deviceInfo","kind","deviceId","getUserMedia","generateMediaConstraints","constraints","mediaStream","errorName","errorMessage","OpenViduErrorName","MICROPHONE_ACCESS_DENIED","CAMERA_ACCESS_DENIED","SCREEN_CAPTURE_DENIED","OpenViduError","enableProdMode","setAdvancedConfiguration","configuration","publisherProperties","height","ideal","width","mediaConstraints","exact","widthAndHeight","SCREEN_SHARING_NOT_SUPPORTED","screenShareChromeExtension","extensionId","getChromeExtensionStatus","getScreenConstraints","screenConstraints","error_1","SCREEN_EXTENSION_DISABLED","SCREEN_EXTENSION_NOT_INSTALLED","getScreenId","sourceId","error_2","error_3","error_4","startWs","onConnectSucces","heartbeat","sendCloseMessage","ws","uri","wsUri","useSockJS","onconnected","ondisconnect","disconnectCallback","onreconnecting","reconnectingCallback","onreconnected","reconnectedCallback","rpc","requestTimeout","participantJoined","onParticipantJoined","participantPublished","onParticipantPublished","participantUnpublished","onParticipantUnpublished","participantLeft","onParticipantLeft","participantEvicted","onParticipantEvicted","recordingStarted","onRecordingStarted","recordingStopped","onRecordingStopped","sendMessage","onNewMessage","iceCandidate","recvIceCandidate","mediaError","onMediaError","jsonRpcClient","clients","JsonRpcClient","closeWs","close","method","params","mediaSource","is","enabled","muted","getWsUri","getSecret","getRecorder","isRoomAvailable","onLostConnection","alert","StreamEvent_1","VideoElementEvent_1","accessAllowed","ee","element","VideoElementEvent","reason","streamEvent","StreamEvent","callDefaultBehaviour","HTMLElement","getWebRtcPeer","audioEnabled","videoEnabled","subscribeToRemote","subscribeToMyRemote","isPublisherPublished","isVideoELementCreated","getVideoElement","displayMyRemote","currentTime","paused","ended","accessIsAllowed","accessIsDenied","errorCallback","openViduError","successCallback","removeTrack","getAudioTracks","addTrack","getVideoTracks","setMediaStream","insertVideo","outboundStreamOptions","setOutboundStreamOptions","constraintsAux","timeForDialogEvent","isSendVideo","startTime_1","now","setPermissionDialogTimer","videoOnlyStream","clearPermissionDialogTimer","isSendAudio","audioOnlyStream","track","INPUT_AUDIO_DEVICE_NOT_FOUND","constraint","PUBLISHER_PROPERTIES_ERROR","INPUT_VIDEO_DEVICE_NOT_FOUND","isSendScreen","startTime_2","NO_INPUT_SOURCE_SET","updateSession","eventArray","waitTime","permissionDialogTimeout","startTime","clearTimeout","userMediaHasVideo","userMediaHasAudio","Connection_1","Subscriber_1","ConnectionEvent_1","RecordingEvent_1","SessionDisconnectedEvent_1","SignalEvent_1","remoteStreamsCreated","remoteConnections","speakingEventsEnabled","processToken","sessionId","participantId","stringClientMetadata","connectAux","BROWSER_NOT_SUPPORTED","leave","subscribe","param4","subscribeToAudio","subscribeToVideo","subscriber","Subscriber","subscribeAsync","unsubscribe","sender","disposeWebRtcPeer","disposeMediaStream","removeVideo","publish","unpublish","signal","signalMessage","to","connectionIds_1","speechEvent","hasAudio","enableSpeakingEvents","enableOnceSpeakingEvents","disableSpeakingEvents","getConnection","ConnectionEvent","getRemoteConnection","afterConnectionFound","con","from","SignalEvent","addIceCandidate","onSessionClosed","room","confirm","assign","RecordingEvent","forced","sessionDisconnectEvent","SessionDisconnectedEvent","joinParams","events_1","connections","existingParticipants","participant","GENERIC_ERROR","searchParams","host","WebRtcStats_1","PublisherSpeakingEvent_1","kurentoUtils","isSubscribeToRemote","isReadyToPublish","hasVideo","srcObject","webRtcPeer","getRTCPeerConnection","peerConnection","initWebRtcPeerReceive","initWebRtcPeerSend","stopWebRtcStats","isLocal","controls","mirrorVideo","oncanplay","title","parentId","insMode","insertElementWithMode","setSpeechEventIfNotExists","harkOptions","publisherSpeakingEventsOptions","WebRtcPeer","hark","PublisherSpeakingEvent","userMediaConstraints","videoStream","onicecandidate","iceServers","sdpOfferParam","wp","sdpOffer","doLoopback","processSdpAnswer","sdpAnswer","WebRtcPeerSendrecv","generateOffer","WebRtcPeerSendonly","offerConstraints","WebRtcPeerRecvonly","setRemoteDescription","getRemoteStreams","initWebRtcStats","webRtcStats","WebRtcStats","isEnabled","AFTER","parentNode","insertBefore","nextSibling","BEFORE","PREPEND","childNodes","REPLACE","replaceChild","webkitTransform","Event_1","_super","__extends","cancelable","Event","hasBeenPrevented","isDefaultPrevented","preventDefault","remoteConnection","streamOptionsServer","Mapper","key2","ids","WebSocketWithReconnection","PING_INTERVAL","RECONNECTING","CONNECTED","DISCONNECTED","Logger","wsConfig","notReconnectIfNumLessThan","pingNextNum","enabledPings","pingPongStarted","pingInterval","pull","request","reply","updateNotReconnectIfLessThan","usePing","rpcBuilderOptions","request_timeout","ping_request_timeout","heartbeatRequestTimeout","packers","JsonRPC","requestTime","encode","sendPing","pingNum","reconnectWs","clearInterval","forceClose","millis","reconnect","BrowserWebSocket","WebSocket","MozWebSocket","MAX_RETRIES","RETRY_TIME_MS","CONNECTING","OPEN","CLOSING","CLOSED","closing","registerMessageHandler","reconnecting","forcingDisconnection","SockJS","onopen","logConnected","reconnectionOnClose","reconnectToSameUri","onclose","maxRetries","numRetries","reconnectToNewUri","newWsUriOnReconnection","newWsUri","reconnectWsUri","newWs","onErrorOrClose","goodWsUri","addEventListener","defineProperty_IE8","oThis","aArgs","fToBind","fNOP","fBound","BASE_TIMEOUT","unifyResponseMethods","responseMethods","unifyTransport","transport","postMessage","onmessage","SyntaxError","RpcNotification","packer","onRequest","pack","unpack","peerID","max_retries","transportMessage","decode","getTransport","setTransport","removeEventListener","response_timeout","duplicates_timeout","requestID","requests","responses","processedResponses","message2Key","storeResponse","dest","timeout","storeProcessedResponse","ack","RpcRequest","duplicated","Boolean","responseMethod","cancel","retried","dispatchCallback","encode_transport","rt","retry","notification","processRequest","idAck","processResponse","duplicatedResponse","processed","transports","jsonrpc","result_defined","error_defined","XmlRPC","sdpTranslator","logger","MEDIA_CONSTRAINTS","framerate","usePlanB","noop","trackStop","streamStop","getTracks","dumpSDP","bufferizeCandidates","pc","candidatesQueue","signalingState","entry","remoteDescription","removeFIDFromOffer","getSimulcastInfo","videoTracks","lines","mode","localVideo","remoteVideo","audioStream","connectionConstraints","sendSource","guid","oncandidategatheringdone","simulcast","multistream","interop","candidatesQueueOut","candidategatheringdone","defineProperties","currentFrame","HAVE_CURRENT_DATA","canvas","videoWidth","videoHeight","getContext","drawImage","RTCPeerConnection","onaddstream","onnegotiationneeded","offerAudio","offerVideo","browserDependantConstraints","offerToReceiveAudio","offerToReceiveVideo","createOffer","mangleSdpToAddSimulcast","setLocalDescription","localDescription","processAnswer","getLocalSessionDescriptor","getRemoteSessionDescriptor","setRemoteVideo","load","showLocalVideo","planBAnswer","processOffer","planBOffer","createAnswer","getMedia","constraints_","cancelChooseDesktopMedia","createEnableDescriptor","getLocalStreams","tracks","trackSetEnable","getLocalStream","getRemoteStream","harkUtils","mozGetUserMedia","mozMediaSource","onIFrameCallback","chromeMediaSourceId","chromeExtensionStatus","postGetSourceIdMessage","screen_constraints","mandatory","chromeMediaSource","maxWidth","screen","maxHeight","optional","iframe","loadIFrame","isLoaded","contentWindow","captureSourceId","loadCallback","onload","documentElement","postGetChromeExtensionStatusMessage","screenCallback","isFirefox","InstallTrigger","isOpera","isChrome","chrome","origin","onMessageCallback","isChromeExtensionAvailable","getSourceId","extensionid","image","firefoxScreenConstraints","webRtcStatsEnabled","statsInterval","stats","inbound","bytesReceived","packetsReceived","packetsLost","framesDecoded","nackCount","outbound","bytesSent","packetsSent","framesEncoded","elastestInstrumentation","localStorage","getItem","instrumentation_1","webrtc","webRtcStatsIntervalId","sendStatsToHttpEndpoint","instrumentation","sendPost","json","http","httpEndpoint","stat","isRemote","startsWith","remoteId","metricId","mediaType","jit","jitter","metrics","units","@timestamp","timestamp","toISOString","stream_type","includes","googJitterBufferMs","googNacksSent","getStatsAgnostic","standardizeReport","standardReport","report","standardStats","successCb","failureCb","getStats"],"mappings":"CAAA,WAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OA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GAAIlS,SAAS/R,KAAM0I,QAAQ,cAAgB,EAAG,CAC1C,OAAOub,SAGX,IAAM2tB,eAAiB,GACvB3tB,SAASjc,SAASiM,QAAQ,SAAC49B,QACvB,IAAMC,cAAgB,CAClBx2B,GAAIu2B,OAAOv2B,GACX81B,UAAWS,OAAOT,UAClBxyC,KAAMizC,OAAOjzC,MAEjBizC,OAAOz+B,QAAQa,QAAQ,SAACjU,MACpB8xC,cAAc9xC,MAAQ6xC,OAAOpB,KAAKzwC,QAEtC4xC,eAAeE,cAAcx2B,IAAMw2B,gBAGvC,OAAOF,gBAGHzS,YAAAjjC,UAAAw1C,iBAAR,SAAyB3I,GAAIgJ,UAAWC,WAAxC,IAAArrB,MAAAtqB,KACI,GAAI0V,SAAS/R,KAAM0I,QAAQ,cAAgB,EAAG,CAE1C,OAAOqgC,GAAGkJ,SAAS,KAAM,SAAChuB,UACtB,IAAM4tB,OAASlrB,MAAKgrB,kBAAkB1tB,UACtC8tB,UAAUF,SACXG,gBACA,GAAIjgC,SAAS/R,KAAM0I,QAAQ,aAAe,EAAG,CAEhD,OAAOqgC,GAAGkJ,SAAS,SAAChuB,UAChB,IAAM4tB,OAASlrB,MAAKgrB,kBAAkB1tB,UACtC8tB,UAAUF,SACX,KAAMG,aAIrB,OAAA7S,YAjUA,GAAa/jC,QAAA+jC,YAAAA"} \ No newline at end of file diff --git a/openvidu-server/pom.xml b/openvidu-server/pom.xml index 4109763b41..cb9118341f 100644 --- a/openvidu-server/pom.xml +++ b/openvidu-server/pom.xml @@ -12,7 +12,7 @@ jar OpenVidu Server - 1.9.0-beta-1 + 2.0.0 OpenVidu Server https://github.com/OpenVidu/openvidu diff --git a/openvidu-server/src/angular/frontend/package.json b/openvidu-server/src/angular/frontend/package.json index 6fdb878af7..f4c420a22e 100644 --- a/openvidu-server/src/angular/frontend/package.json +++ b/openvidu-server/src/angular/frontend/package.json @@ -14,7 +14,7 @@ "@angular/router": "5.0.5", "core-js": "2.5.1", "hammerjs": "2.0.8", - "openvidu-browser": "1.9.0-beta-1", + "openvidu-browser": "2.0.0", "rxjs": "5.5.3", "zone.js": "0.8.18" }, diff --git a/openvidu-server/src/main/resources/static/inline.bundle.js.map b/openvidu-server/src/main/resources/static/inline.bundle.js.map index e65609e46d..12ce38958a 100644 --- a/openvidu-server/src/main/resources/static/inline.bundle.js.map +++ b/openvidu-server/src/main/resources/static/inline.bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack/bootstrap c45ad824b5477488e221"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c45ad824b5477488e221"],"sourceRoot":"webpack:///"} \ No newline at end of file +{"version":3,"sources":["webpack/bootstrap 347280613b71b908df0e"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 347280613b71b908df0e"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/openvidu-server/src/main/resources/static/main.bundle.js b/openvidu-server/src/main/resources/static/main.bundle.js index fb4e9e6f3d..3bb16a2773 100644 --- a/openvidu-server/src/main/resources/static/main.bundle.js +++ b/openvidu-server/src/main/resources/static/main.bundle.js @@ -6,7 +6,7 @@ webpackJsonp(["main"],{ "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ webpackJsonp(["main"],{ * */ exports.__esModule = true; -var __1 = __webpack_require__("../../../../openvidu-browser/lib/index.js"); +var Stream_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Stream.js"); /** * Represents each one of the user's connection to the session (the local one and other user's connections). * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection @@ -92,7 +92,7 @@ var Connection = /** @class */ (function () { recvVideo: opts.videoActive, typeOfVideo: opts.typeOfVideo }; - var stream = new __1.Stream(_this.session, streamOptions); + var stream = new Stream_1.Stream(_this.session, streamOptions); _this.addStream(stream); }); console.info("Remote 'Connection' with 'connectionId' [" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts); @@ -132,7 +132,7 @@ exports.Connection = Connection; "use strict"; /* - * (C) Copyright 2017-2018-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -466,7 +466,7 @@ exports.LocalRecorder = LocalRecorder; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -482,10 +482,11 @@ exports.LocalRecorder = LocalRecorder; * */ exports.__esModule = true; -var __1 = __webpack_require__("../../../../openvidu-browser/lib/index.js"); +var LocalRecorder_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js"); +var Publisher_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Publisher.js"); +var Session_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Session.js"); var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -var VersionAdapter_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/VersionAdapter.js"); var RpcBuilder = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js"); var screenSharingAuto = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js"); var screenSharing = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js"); @@ -511,14 +512,10 @@ var OpenVidu = /** @class */ (function () { console.info("'OpenVidu' initialized"); } /** - * Returns a session with id `sessionId` - * @param sessionId Session unique ID generated in openvidu-server + * Returns new session */ - OpenVidu.prototype.initSession = function (sessionId) { - if (!!sessionId) { - console.warn("DEPRECATION WANING: In future releases 'OpenVidu.initSession' method won't require a parameter. Remove it (see http://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)"); - } - this.session = new __1.Session(this); + OpenVidu.prototype.initSession = function () { + this.session = new Session_1.Session(this); return this.session; }; /** @@ -545,8 +542,6 @@ var OpenVidu = /** @class */ (function () { if (!!param2 && (typeof param2 !== 'function')) { // Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)' properties = param2; - // DEPRECATED WARNING - properties = VersionAdapter_1.adaptPublisherProperties(properties); properties = { audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined, frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined), @@ -568,7 +563,7 @@ var OpenVidu = /** @class */ (function () { resolution: '640x480' }; } - var publisher = new __1.Publisher(targetElement, properties, this); + var publisher = new Publisher_1.Publisher(targetElement, properties, this); var completionHandler; if (!!param2 && (typeof param2 === 'function')) { completionHandler = param2; @@ -615,7 +610,7 @@ var OpenVidu = /** @class */ (function () { * @param stream Stream to record */ OpenVidu.prototype.initLocalRecorder = function (stream) { - return new __1.LocalRecorder(stream); + return new LocalRecorder_1.LocalRecorder(stream); }; /** * Checks if the browser supports OpenVidu @@ -979,7 +974,7 @@ var OpenVidu = /** @class */ (function () { console.warn('Websocket reconnected'); }; OpenVidu.prototype.isRoomAvailable = function () { - if (this.session !== undefined && this.session instanceof __1.Session) { + if (this.session !== undefined && this.session instanceof Session_1.Session) { return true; } else { @@ -1000,7 +995,7 @@ exports.OpenVidu = OpenVidu; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1016,7 +1011,7 @@ exports.OpenVidu = OpenVidu; * */ exports.__esModule = true; -var __1 = __webpack_require__("../../../../openvidu-browser/lib/index.js"); +var Stream_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Stream.js"); var StreamEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js"); var VideoElementEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js"); var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); @@ -1037,7 +1032,7 @@ var Publisher = /** @class */ (function () { this.accessAllowed = false; this.ee = new EventEmitter(); this.properties = properties; - this.stream = new __1.Stream(this.session, { publisherProperties: properties, mediaConstraints: {} }); + this.stream = new Stream_1.Stream(this.session, { publisherProperties: properties, mediaConstraints: {} }); this.stream.on('video-removed', function (element) { _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementDestroyed')]); }); @@ -1484,7 +1479,7 @@ exports.Publisher = Publisher; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1500,7 +1495,8 @@ exports.Publisher = Publisher; * */ exports.__esModule = true; -var __1 = __webpack_require__("../../../../openvidu-browser/lib/index.js"); +var Connection_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Connection.js"); +var Subscriber_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Subscriber.js"); var ConnectionEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js"); var RecordingEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js"); var SessionDisconnectedEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js"); @@ -1508,7 +1504,6 @@ var SignalEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVi var StreamEvent_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js"); var OpenViduError_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js"); var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -var VersionAdapter_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/VersionAdapter.js"); var platform = __webpack_require__("../../../../openvidu-browser/node_modules/platform/platform.js"); var EventEmitter = __webpack_require__("../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js"); /** @@ -1564,11 +1559,9 @@ var Session = /** @class */ (function () { * @returns A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not * */ - Session.prototype.connect = function (token, metadata, param3) { + Session.prototype.connect = function (token, metadata) { var _this = this; - // DEPRECATED WARNING - return VersionAdapter_1.solveIfCallback('Session.connect', (!!param3 && (typeof param3 === 'function')) ? param3 : ((typeof metadata === 'function') ? metadata : ''), - /*return */ new Promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { _this.processToken(token); if (_this.openvidu.checkSystemRequirements()) { // Early configuration to deactivate automatic subscription to streams @@ -1586,7 +1579,7 @@ var Session = /** @class */ (function () { else { reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu')); } - })); + }); }; /** * Leaves the session, destroying all streams and deleting the user as a participant. @@ -1664,7 +1657,7 @@ var Session = /** @class */ (function () { completionHandler(error); } }); - var subscriber = new __1.Subscriber(stream, targetElement, properties); + var subscriber = new Subscriber_1.Subscriber(stream, targetElement, properties); stream.insertVideo(subscriber.element, properties.insertMode); return subscriber; }; @@ -1813,11 +1806,9 @@ var Session = /** @class */ (function () { * mean that openvidu-server could resend the message to all the listed receivers._ */ /* tslint:disable:no-string-literal */ - Session.prototype.signal = function (signal, callback) { + Session.prototype.signal = function (signal) { var _this = this; - // DEPRECATED WARNING - return VersionAdapter_1.solveIfCallback('Session.signal', callback, - /*return */ new Promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { var signalMessage = {}; if (signal.to && signal.to.length > 0) { var connectionIds_1 = []; @@ -1841,7 +1832,7 @@ var Session = /** @class */ (function () { resolve(); } }); - })); + }); }; /* tslint:enable:no-string-literal */ /** @@ -1927,7 +1918,7 @@ var Session = /** @class */ (function () { .then(function (connection) { console.warn('Connection ' + response.id + ' already exists in connections list'); })["catch"](function (openViduError) { - var connection = new __1.Connection(_this, response); + var connection = new Connection_1.Connection(_this, response); _this.remoteConnections[response.id] = connection; _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); }); @@ -1982,7 +1973,7 @@ var Session = /** @class */ (function () { afterConnectionFound(connection); })["catch"](function (openViduError) { // Create new Connection - connection = new __1.Connection(_this, response); + connection = new Connection_1.Connection(_this, response); afterConnectionFound(connection); }); }; @@ -2189,7 +2180,7 @@ var Session = /** @class */ (function () { } else { // Initialize local Connection object with values returned by openvidu-server - _this.connection = new __1.Connection(_this); + _this.connection = new Connection_1.Connection(_this); _this.connection.connectionId = response.id; _this.connection.data = response.metadata; // Initialize remote Connections with value returned by openvidu-server @@ -2199,7 +2190,7 @@ var Session = /** @class */ (function () { }; var existingParticipants = response.value; existingParticipants.forEach(function (participant) { - var connection = new __1.Connection(_this, participant); + var connection = new Connection_1.Connection(_this, participant); _this.remoteConnections[connection.connectionId] = connection; events_1.connections.push(connection); if (!!connection.stream) { @@ -2292,7 +2283,7 @@ exports.Session = Session; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -2846,7 +2837,7 @@ exports.Stream = Stream; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3016,7 +3007,7 @@ exports.Subscriber = Subscriber; "use strict"; /* - * (C) Copyright 2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3049,7 +3040,7 @@ var LocalRecorderState; "use strict"; /* - * (C) Copyright 2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3065,6 +3056,9 @@ var LocalRecorderState; * */ exports.__esModule = true; +/** + * Defines property [[OpenViduError.name]] + */ var OpenViduErrorName; (function (OpenViduErrorName) { OpenViduErrorName["BROWSER_NOT_SUPPORTED"] = "BROWSER_NOT_SUPPORTED"; @@ -3106,7 +3100,7 @@ exports.OpenViduError = OpenViduError; "use strict"; /* - * (C) Copyright 2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3158,7 +3152,7 @@ var VideoInsertMode; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3219,7 +3213,7 @@ exports.ConnectionEvent = ConnectionEvent; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3276,7 +3270,7 @@ exports.Event = Event; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3344,7 +3338,7 @@ exports.PublisherSpeakingEvent = PublisherSpeakingEvent; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3407,7 +3401,7 @@ exports.RecordingEvent = RecordingEvent; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3478,7 +3472,7 @@ exports.SessionDisconnectedEvent = SessionDisconnectedEvent; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3540,7 +3534,7 @@ exports.SignalEvent = SignalEvent; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3567,7 +3561,8 @@ var __extends = (this && this.__extends) || (function () { })(); exports.__esModule = true; var Event_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js"); -var __1 = __webpack_require__("../../../../openvidu-browser/lib/index.js"); +var Publisher_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Publisher.js"); +var Session_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenVidu/Session.js"); /** * Defines the following events: * - `streamCreated`: dispatched by [[Session]] and [[Publisher]] @@ -3589,14 +3584,14 @@ var StreamEvent = /** @class */ (function (_super) { */ StreamEvent.prototype.callDefaultBehaviour = function () { if (this.type === 'streamDestroyed') { - if (this.target instanceof __1.Session) { + if (this.target instanceof Session_1.Session) { console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Session'"); // Remote Stream this.stream.disposeWebRtcPeer(); this.stream.disposeMediaStream(); this.stream.removeVideo(); } - else if (this.target instanceof __1.Publisher) { + else if (this.target instanceof Publisher_1.Publisher) { console.info("Calling default behaviour upon '" + this.type + "' event dispatched by 'Publisher'"); // Local Stream this.stream.disposeMediaStream(); @@ -3630,7 +3625,7 @@ exports.StreamEvent = StreamEvent; "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -5449,99 +5444,13 @@ exports.getSourceId = getSourceId; /***/ }), -/***/ "../../../../openvidu-browser/lib/OpenViduInternal/VersionAdapter.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -exports.__esModule = true; -var VideoInsertMode_1 = __webpack_require__("../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js"); -function solveIfCallback(methodName, completionHandler, promise) { - if (!!completionHandler) { - console.warn("DEPRECATION WANING: In future releases the 'completionHandler' parameter will be removed from method '" + methodName + "'. Refactor your callbacks to Promise API (see http://openvidu.io/api/openvidu-browser/index.html)"); - } - return new Promise(function (resolve, reject) { - if (!!completionHandler && typeof completionHandler === 'function') { - promise.then(function () { - completionHandler(undefined); - })["catch"](function (error) { - completionHandler(error); - }); - } - else { - promise.then(function () { - return resolve(); - })["catch"](function (error) { - return reject(error); - }); - } - }); -} -exports.solveIfCallback = solveIfCallback; -function adaptPublisherProperties(properties) { - if ('audio' in properties || - 'video' in properties || - 'audioActive' in properties || - 'videoActive' in properties || - 'quality' in properties || - 'screen' in properties) { - console.warn("DEPRECATION WANING: In future releases the properties passed to 'OpenVidu.initPublisher' method must match PublisherProperties interface (see http://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)"); - } - var scr = (typeof properties.screen !== 'undefined' && properties.screen === true); - var res = ''; - if (typeof properties.quality === 'string') { - switch (properties.quality) { - case 'LOW': - res = '320x240'; - break; - case 'MEDIUM': - res = '640x480'; - break; - case 'HIGH': - res = '1280x720'; - break; - } - } - var publisherProperties = { - audioSource: (typeof properties.audio !== 'undefined' && properties.audio === false) ? false : ((typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined), - frameRate: (typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined, - insertMode: (typeof properties.insertMode !== 'undefined') ? properties.insertMode : VideoInsertMode_1.VideoInsertMode.APPEND, - mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true, - publishAudio: (typeof properties.audioActive !== 'undefined' && properties.audioActive === false) ? false : (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true, - publishVideo: (typeof properties.videoActive !== 'undefined' && properties.videoActive === false) ? false : (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true, - resolution: !!res ? res : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'), - videoSource: scr ? 'screen' : ((typeof properties.video !== 'undefined' && properties.video === false) ? false : ((typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined)) - }; - return publisherProperties; -} -exports.adaptPublisherProperties = adaptPublisherProperties; -//# sourceMappingURL=VersionAdapter.js.map - -/***/ }), - /***/ "../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* - * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/) + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/openvidu-server/src/main/resources/static/main.bundle.js.map b/openvidu-server/src/main/resources/static/main.bundle.js.map index 892f8ec68a..f5291a541a 100644 --- a/openvidu-server/src/main/resources/static/main.bundle.js.map +++ b/openvidu-server/src/main/resources/static/main.bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Connection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/LocalRecorder.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Stream.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/Event.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/VersionAdapter.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/merge/merge.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/platform/platform.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js","/home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js","./src/$_lazy_route_resource lazy","./src/app/app.component.css","./src/app/app.component.html","./src/app/app.component.ts","./src/app/app.material.module.ts","./src/app/app.module.ts","./src/app/app.routing.ts","./src/app/components/dashboard/credentials-dialog.component.ts","./src/app/components/dashboard/dashboard.component.css","./src/app/components/dashboard/dashboard.component.html","./src/app/components/dashboard/dashboard.component.ts","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","./src/app/components/layouts/openvidu-layout.ts","./src/app/components/session-details/session-details.component.css","./src/app/components/session-details/session-details.component.html","./src/app/components/session-details/session-details.component.ts","./src/app/services/info.service.ts","./src/app/services/rest.service.ts","./src/environments/environment.ts","./src/main.ts"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE,mCAAmC,uBAAuB;AAC1D;AACA,uEAAuE;AACvE,mCAAmC,uBAAuB;AAC1D;AACA,uEAAuE;AACvE,mCAAmC,uBAAuB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,EAAE,wBAAwB,YAAY,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACtUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,qCAAqC;AACrC,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,gCAAgC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gEAAgE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;;;AC9gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,sDAAsD,EAAE;AAC5G;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;AC5dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;AChyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;;ACliBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qFAAqF;AACtF,8C;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kFAAkF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E,2C;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,CAAC;AACD;AACA,2C;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA,CAAC;AACD;AACA,kD;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,CAAC;AACD;AACA,0C;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oD;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,QAAQ;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA,CAAC;AACD;AACA,6C;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;AC5CA;AACA;AACA,iC;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;;AChMA;AACA;AACA,iC;;;;;;;;8CCFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qD;;;;;;;;ACrKA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kCAAkC;AACjF,+CAA+C,kCAAkC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACleA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACVA;AACA;AACA;AACA;AACA,iC;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;AC1fA;AACA;AACA,iC;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iD;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4C;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0C;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,oBAAoB,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;ACtCA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;;AAEA,6BAA6B;AAC7B,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;ACxGA,6V;;;;;;;ACAA,mB;;;;;;;ACAA;;AAEA;AACA;AACA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD,mCAAmC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,gBAAgB,WAAW;;AAE3B;;AAEA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,IAAI;;AAEJ;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;;AAE9B;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,YAAY;;AAEZ;;AAEA;;AAEA;;AAEA,EAAE;;AAEF;;AAEA;;AAEA,CAAC,gG;;;;;;;;AC9KD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;;;;;;;sDC3DA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,aAAa,OAAO;AACpB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,SAAS;AACtB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA,eAAe,OAAO;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;A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C7B,kBAAkB,gEAAgE;AAClF,eAAe;AACf,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO,0CAA0C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kCAAkC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA,8BAA8B,eAAe;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AAAA;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;AChsCD;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,UAAU;AACV,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC,UAAU;AACjD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;AChQD;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+CAA+C;;AAE/C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,uCAAuC;AACvC;;AAEA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,4BAA4B;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC5FA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gBAAgB,KAAK,KAAK;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;;AAEd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,yBAAyB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;;;;;;;ACl3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA,6BAA6B;AAC7B,kDAAkD;;AAElD;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;AACA;;AAEA;;AAEA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,8CAA8C,EAAE;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oDAAoD,IAAI;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+CAA+C,IAAI,kCAAkC,IAAI;AACzF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,sDAAsD;AACtD;;AAEA,sBAAsB;AACtB;;AAEA,+BAA+B;AAC/B;;AAEA;AACA,kCAAkC,MAAM;AACxC;;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AEA;AACA;;AAEA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,wDAAwD;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AAAA;AACb,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;AC/iCD;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC/BA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5GA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5BA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;AAED;;AAEA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACxJA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,MAAM;AACrB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,KAAK;AACpB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AAAA;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW;;;;;;;;ACreZ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,4E;;;;;;;ACVA,mB;;;;;;;ACAA,qE;;;;;;;;;;;;;;;;ACA2E;AAU3E;IAAA;IAEA,CAAC;IAFY,YAAY;QALxB,wEAAS,CA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;CAClB,CAAC;;;;;;;;;;;;;;ACP6C;AAC4B;AAE9B;AACY;AAEzD,EAAE,CAAC,CAAC,8EAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,+EAAc,EAAE,CAAC;AACnB,CAAC;AAED,yGAAsB,EAAE,CAAC,eAAe,CAAC,kEAAS,CAAC,CAAC","file":"main.bundle.js","sourcesContent":["\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar __1 = require(\"..\");\n/**\n * Represents each one of the user's connection to the session (the local one and other user's connections).\n * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection\n */\nvar Connection = /** @class */ (function () {\n /**\n * @hidden\n */\n function Connection(session, opts) {\n this.session = session;\n /**\n * @hidden\n */\n this.disposed = false;\n var msg = \"'Connection' created \";\n if (!!opts) {\n msg += \"(remote) with 'connectionId' [\" + opts.id + ']';\n }\n else {\n msg += '(local)';\n }\n console.info(msg);\n this.options = opts;\n if (!!opts) {\n // Connection is remote\n this.connectionId = opts.id;\n if (opts.metadata) {\n this.data = opts.metadata;\n }\n if (opts.streams) {\n this.initRemoteStreams(opts.streams);\n }\n }\n this.creationTime = new Date().getTime();\n }\n /* Hidden methods */\n /**\n * @hidden\n */\n Connection.prototype.sendIceCandidate = function (candidate) {\n console.debug((!!this.stream.outboundStreamOpts ? 'Local' : 'Remote'), 'candidate for', this.connectionId, JSON.stringify(candidate));\n this.session.openvidu.sendRequest('onIceCandidate', {\n endpointName: this.connectionId,\n candidate: candidate.candidate,\n sdpMid: candidate.sdpMid,\n sdpMLineIndex: candidate.sdpMLineIndex\n }, function (error, response) {\n if (error) {\n console.error('Error sending ICE candidate: '\n + JSON.stringify(error));\n }\n });\n };\n /**\n * @hidden\n */\n Connection.prototype.initRemoteStreams = function (options) {\n var _this = this;\n // This is ready for supporting multiple streams per Connection object. Right now the loop will always run just once\n // this.stream should also be replaced by a collection of streams to support multiple streams per Connection\n options.forEach(function (opts) {\n var streamOptions = {\n id: opts.id,\n connection: _this,\n frameRate: opts.frameRate,\n recvAudio: opts.audioActive,\n recvVideo: opts.videoActive,\n typeOfVideo: opts.typeOfVideo\n };\n var stream = new __1.Stream(_this.session, streamOptions);\n _this.addStream(stream);\n });\n console.info(\"Remote 'Connection' with 'connectionId' [\" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts);\n };\n /**\n * @hidden\n */\n Connection.prototype.addStream = function (stream) {\n stream.connection = this;\n this.stream = stream;\n };\n /**\n * @hidden\n */\n Connection.prototype.removeStream = function (streamId) {\n delete this.stream;\n };\n /**\n * @hidden\n */\n Connection.prototype.dispose = function () {\n if (!!this.stream) {\n delete this.stream;\n }\n this.disposed = true;\n };\n return Connection;\n}());\nexports.Connection = Connection;\n//# sourceMappingURL=Connection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Connection.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Connection.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorderState_1 = require(\"../OpenViduInternal/Enums/LocalRecorderState\");\n/**\n * Easy recording of [[Stream]] objects straightaway from the browser.\n *\n * > WARNING: Performing browser local recording of **remote streams** may cause some troubles. A long waiting time may be required after calling _LocalRecorder.stop()_ in this case\n */\nvar LocalRecorder = /** @class */ (function () {\n /**\n * @hidden\n */\n function LocalRecorder(stream) {\n this.stream = stream;\n this.chunks = [];\n this.count = 0;\n this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection';\n this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord';\n this.state = LocalRecorderState_1.LocalRecorderState.READY;\n }\n /**\n * Starts the recording of the Stream. [[state]] property must be `READY`. After method succeeds is set to `RECORDING`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not\n */\n LocalRecorder.prototype.record = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (typeof MediaRecorder === 'undefined') {\n console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder');\n throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'));\n }\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.READY) {\n throw (Error('\\'LocalRecord.record()\\' needs \\'LocalRecord.state\\' to be \\'READY\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.clean()\\' or init a new LocalRecorder before'));\n }\n console.log(\"Starting local recording of stream '\" + _this.stream.streamId + \"' of connection '\" + _this.connectionId + \"'\");\n if (typeof MediaRecorder.isTypeSupported === 'function') {\n var options = void 0;\n if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) {\n options = { mimeType: 'video/webm;codecs=vp9' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) {\n options = { mimeType: 'video/webm;codecs=h264' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) {\n options = { mimeType: 'video/webm;codecs=vp8' };\n }\n console.log('Using mimeType ' + options.mimeType);\n _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream(), options);\n }\n else {\n console.warn('isTypeSupported is not supported, using default codecs for browser');\n _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream());\n }\n _this.mediaRecorder.start(10);\n }\n catch (err) {\n reject(err);\n }\n _this.mediaRecorder.ondataavailable = function (e) {\n _this.chunks.push(e.data);\n };\n _this.mediaRecorder.onerror = function (e) {\n console.error('MediaRecorder error: ', e);\n };\n _this.mediaRecorder.onstart = function () {\n console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n };\n _this.mediaRecorder.onpause = function () {\n console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onresume = function () {\n console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onwarning = function (e) {\n console.log('MediaRecorder warning: ' + e);\n };\n _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING;\n resolve();\n });\n };\n /**\n * Ends the recording of the Stream. [[state]] property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not\n */\n LocalRecorder.prototype.stop = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state === LocalRecorderState_1.LocalRecorderState.READY || _this.state === LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.stop()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' or \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' before'));\n }\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n resolve();\n };\n _this.mediaRecorder.stop();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Pauses the recording of the Stream. [[state]] property must be `RECORDING`. After method succeeds is set to `PAUSED`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not\n */\n LocalRecorder.prototype.pause = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.RECORDING) {\n reject(Error('\\'LocalRecord.pause()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' or \\'LocalRecorder.resume()\\' before'));\n }\n _this.mediaRecorder.pause();\n _this.state = LocalRecorderState_1.LocalRecorderState.PAUSED;\n }\n catch (error) {\n reject(error);\n }\n });\n };\n /**\n * Resumes the recording of the Stream. [[state]] property must be `PAUSED`. After method succeeds is set to `RECORDING`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not\n */\n LocalRecorder.prototype.resume = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.PAUSED) {\n throw (Error('\\'LocalRecord.resume()\\' needs \\'LocalRecord.state\\' to be \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.pause()\\' before'));\n }\n _this.mediaRecorder.resume();\n _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING;\n }\n catch (error) {\n reject(error);\n }\n });\n };\n /**\n * Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.preview = function (parentElement) {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.preview()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n this.videoPreview = document.createElement('video');\n this.videoPreview.id = this.id;\n this.videoPreview.autoplay = true;\n if (typeof parentElement === 'string') {\n this.htmlParentElementId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.videoPreview = parentElementDom.appendChild(this.videoPreview);\n }\n }\n else {\n this.htmlParentElementId = parentElement.id;\n this.videoPreview = parentElement.appendChild(this.videoPreview);\n }\n this.videoPreview.src = this.videoPreviewSrc;\n return this.videoPreview;\n };\n /**\n * Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets [[state]] to `READY` so the recording can start again\n */\n LocalRecorder.prototype.clean = function () {\n var _this = this;\n var f = function () {\n delete _this.blob;\n _this.chunks = [];\n _this.count = 0;\n delete _this.mediaRecorder;\n _this.state = LocalRecorderState_1.LocalRecorderState.READY;\n };\n if (this.state === LocalRecorderState_1.LocalRecorderState.RECORDING || this.state === LocalRecorderState_1.LocalRecorderState.PAUSED) {\n this.stop().then(function () { return f(); })[\"catch\"](function () { return f(); });\n }\n else {\n f();\n }\n };\n /**\n * Downloads the recorded video through the browser. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.download = function () {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.download()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var a = document.createElement('a');\n a.style.display = 'none';\n document.body.appendChild(a);\n var url = window.URL.createObjectURL(this.blob);\n a.href = url;\n a.download = this.id + '.webm';\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n }\n };\n /**\n * Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.getBlob = function () {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('Call \\'LocalRecord.stop()\\' before getting Blob file'));\n }\n else {\n return this.blob;\n }\n };\n /**\n * Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:\n * ```\n * var headers = {\n * \"Cookie\": \"$Version=1; Skin=new;\",\n * \"Authorization\":\"Basic QWxhZGpbjpuIHNlctZQ==\"\n * }\n * ```\n * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not\n */\n LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n reject(Error('\\'LocalRecord.uploadAsBinary()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_1 = new XMLHttpRequest();\n http_1.open('POST', endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_1.setRequestHeader(key, headers[key]);\n }\n }\n http_1.onreadystatechange = function () {\n if (http_1.readyState === 4) {\n if (http_1.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_1.responseText);\n }\n else {\n reject(http_1.status);\n }\n }\n };\n http_1.send(_this.blob);\n }\n });\n };\n /**\n * Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:\n * ```\n * var headers = {\n * \"Cookie\": \"$Version=1; Skin=new;\",\n * \"Authorization\":\"Basic QWxhZGpbjpuIHNlctZQ==\"\n * }\n * ```\n * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not:\n */\n LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n reject(Error('\\'LocalRecord.uploadAsMultipartfile()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_2 = new XMLHttpRequest();\n http_2.open('POST', endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_2.setRequestHeader(key, headers[key]);\n }\n }\n var sendable = new FormData();\n sendable.append('file', _this.blob, _this.id + '.webm');\n http_2.onreadystatechange = function () {\n if (http_2.readyState === 4) {\n if (http_2.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_2.responseText);\n }\n else {\n reject(http_2.status);\n }\n }\n };\n http_2.send(sendable);\n }\n });\n };\n /* Private methods */\n LocalRecorder.prototype.onStopDefault = function () {\n console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + ')');\n this.blob = new Blob(this.chunks, { type: 'video/webm' });\n this.chunks = [];\n this.videoPreviewSrc = window.URL.createObjectURL(this.blob);\n this.state = LocalRecorderState_1.LocalRecorderState.FINISHED;\n };\n return LocalRecorder;\n}());\nexports.LocalRecorder = LocalRecorder;\n//# sourceMappingURL=LocalRecorder.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/LocalRecorder.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar __1 = require(\"..\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar VersionAdapter_1 = require(\"../OpenViduInternal/VersionAdapter\");\nvar RpcBuilder = require(\"../OpenViduInternal/KurentoUtils/kurento-jsonrpc\");\nvar screenSharingAuto = require(\"../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto\");\nvar screenSharing = require(\"../OpenViduInternal/ScreenSharing/Screen-Capturing\");\nvar platform = require(\"platform\");\n/**\n * Entrypoint of OpenVidu Browser library.\n * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]]\n */\nvar OpenVidu = /** @class */ (function () {\n function OpenVidu() {\n /**\n * @hidden\n */\n this.secret = '';\n /**\n * @hidden\n */\n this.recorder = false;\n /**\n * @hidden\n */\n this.advancedConfiguration = {};\n console.info(\"'OpenVidu' initialized\");\n }\n /**\n * Returns a session with id `sessionId`\n * @param sessionId Session unique ID generated in openvidu-server\n */\n OpenVidu.prototype.initSession = function (sessionId) {\n if (!!sessionId) {\n console.warn(\"DEPRECATION WANING: In future releases 'OpenVidu.initSession' method won't require a parameter. Remove it (see http://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)\");\n }\n this.session = new __1.Session(this);\n return this.session;\n };\n /**\n * Returns a new publisher\n *\n * #### Events dispatched\n *\n * The [[Publisher]] object will dispatch an `accessDialogOpened` event, only if the pop-up shown by the browser to request permissions for the camera is opened. You can use this event to alert the user about granting permissions\n * for your website. An `accessDialogClosed` event will also be dispatched after user clicks on \"Allow\" or \"Block\" in the pop-up.\n *\n * The [[Publisher]] object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not.\n *\n * The [[Publisher]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (if _targetElement_ not null or undefined)\n *\n * The [[Publisher]] object will dispatch a `videoPlaying` event once the local video starts playing (only if `videoElementCreated` event has been previously dispatched)\n *\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see [[PublisherProperties.insertMode]]). If null or undefined no default video will be created for this Publisher\n * (you can always access the native MediaStream object by calling _Publisher.stream.getMediaStream()_ and use it as _srcObject_ of any HTML video element)\n * @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails.\n * `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event\n */\n OpenVidu.prototype.initPublisher = function (targetElement, param2, param3) {\n var properties;\n if (!!param2 && (typeof param2 !== 'function')) {\n // Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)'\n properties = param2;\n // DEPRECATED WARNING\n properties = VersionAdapter_1.adaptPublisherProperties(properties);\n properties = {\n audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined,\n frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined),\n insertMode: (typeof properties.insertMode !== 'undefined') ? ((typeof properties.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[properties.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true,\n publishAudio: (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true,\n publishVideo: (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true,\n resolution: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'),\n videoSource: (typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined\n };\n }\n else {\n // Matches 'initPublisher(targetElement)' or 'initPublisher(targetElement, completionHandler)'\n properties = {\n insertMode: VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: true,\n publishAudio: true,\n publishVideo: true,\n resolution: '640x480'\n };\n }\n var publisher = new __1.Publisher(targetElement, properties, this);\n var completionHandler;\n if (!!param2 && (typeof param2 === 'function')) {\n completionHandler = param2;\n }\n else if (!!param3) {\n completionHandler = param3;\n }\n publisher.initialize()\n .then(function () {\n if (completionHandler !== undefined) {\n completionHandler(undefined);\n }\n publisher.emitEvent('accessAllowed', []);\n })[\"catch\"](function (error) {\n if (!!completionHandler !== undefined) {\n completionHandler(error);\n }\n publisher.emitEvent('accessDenied', []);\n });\n return publisher;\n };\n OpenVidu.prototype.initPublisherAsync = function (targetElement, properties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var publisher;\n var callback = function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve(publisher);\n }\n };\n if (!!properties) {\n publisher = _this.initPublisher(targetElement, properties, callback);\n }\n else {\n publisher = _this.initPublisher(targetElement, callback);\n }\n });\n };\n /**\n * Returns a new local recorder for recording streams straight away from the browser\n * @param stream Stream to record\n */\n OpenVidu.prototype.initLocalRecorder = function (stream) {\n return new __1.LocalRecorder(stream);\n };\n /**\n * Checks if the browser supports OpenVidu\n * @returns 1 if the browser supports OpenVidu, 0 otherwise\n */\n OpenVidu.prototype.checkSystemRequirements = function () {\n var browser = platform.name;\n var version = platform.version;\n if ((browser !== 'Chrome') && (browser !== 'Chrome Mobile') &&\n (browser !== 'Firefox') && (browser !== 'Firefox Mobile') && (browser !== 'Firefox for iOS') &&\n (browser !== 'Opera') && (browser !== 'Opera Mobile') &&\n (browser !== 'Safari')) {\n return 0;\n }\n else {\n return 1;\n }\n };\n /**\n * Collects information about the media input devices available on the system. You can pass property `deviceId` of a [[Device]] object as value of `audioSource` or `videoSource` properties in [[initPublisher]] method\n */\n OpenVidu.prototype.getDevices = function () {\n return new Promise(function (resolve, reject) {\n navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) {\n var devices = [];\n deviceInfos.forEach(function (deviceInfo) {\n if (deviceInfo.kind === 'audioinput' || deviceInfo.kind === 'videoinput') {\n devices.push({\n kind: deviceInfo.kind,\n deviceId: deviceInfo.deviceId,\n label: deviceInfo.label\n });\n }\n });\n resolve(devices);\n })[\"catch\"](function (error) {\n console.error('Error getting devices', error);\n reject(error);\n });\n });\n };\n /**\n * Get a MediaStream object that you can customize before calling [[initPublisher]] (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in [[initPublisher]])\n *\n * Parameter `options` is the same as in [[initPublisher]] second parameter (of type [[PublisherProperties]]), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution`\n *\n * To customize the Publisher's video, the API for HTMLCanvasElement is very useful. For example, to get a black-and-white video at 10 fps and HD resolution with no sound:\n * ```\n * var OV = new OpenVidu();\n * var FRAME_RATE = 10;\n *\n * OV.getUserMedia({\n * audioSource: false;\n * videoSource: undefined,\n * resolution: '1280x720',\n * frameRate: FRAME_RATE\n * })\n * .then(mediaStream => {\n *\n * var videoTrack = mediaStream.getVideoTracks()[0];\n * var video = document.createElement('video');\n * video.srcObject = new MediaStream([videoTrack]);\n *\n * var canvas = document.createElement('canvas');\n * var ctx = canvas.getContext('2d');\n * ctx.filter = 'grayscale(100%)';\n *\n * video.addEventListener('play', () => {\n * var loop = () => {\n * if (!video.paused && !video.ended) {\n * ctx.drawImage(video, 0, 0, 300, 170);\n * setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps\n * }\n * };\n * loop();\n * });\n * video.play();\n *\n * var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0];\n * var publisher = this.OV.initPublisher(\n * myHtmlTarget,\n * {\n * audioSource: false,\n * videoSource: grayVideoTrack\n * });\n * });\n * ```\n */\n OpenVidu.prototype.getUserMedia = function (options) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.generateMediaConstraints(options)\n .then(function (constraints) {\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (mediaStream) {\n resolve(mediaStream);\n })[\"catch\"](function (error) {\n var errorName;\n var errorMessage = error.toString();\n if (!(options.videoSource === 'screen')) {\n errorName = (options.videoSource === false || options.videoSource === null) ? OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED : OpenViduError_1.OpenViduErrorName.CAMERA_ACCESS_DENIED;\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED;\n }\n reject(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n /* tslint:disable:no-empty */\n /**\n * Disable all logging except error level\n */\n OpenVidu.prototype.enableProdMode = function () {\n console.log = function () { };\n console.debug = function () { };\n console.info = function () { };\n console.warn = function () { };\n };\n /* tslint:enable:no-empty */\n /**\n * Set OpenVidu advanced configuration options. Currently `configuration` is an object with the following optional properties (see [[OpenViduAdvancedConfiguration]] for more details):\n * - `iceServers`: set custom STUN/TURN servers to be used by OpenVidu Browser\n * - `screenShareChromeExtension`: url to a custom screen share extension for Chrome to be used instead of the default one, based on ours [https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)\n * - `publisherSpeakingEventsOptions`: custom configuration for the [[PublisherSpeakingEvent]] feature\n */\n OpenVidu.prototype.setAdvancedConfiguration = function (configuration) {\n this.advancedConfiguration = configuration;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n OpenVidu.prototype.generateMediaConstraints = function (publisherProperties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var audio, video;\n if (publisherProperties.audioSource === null || publisherProperties.audioSource === false) {\n audio = false;\n }\n else if (publisherProperties.audioSource === undefined) {\n audio = true;\n }\n else {\n audio = publisherProperties.audioSource;\n }\n if (publisherProperties.videoSource === null || publisherProperties.videoSource === false) {\n video = false;\n }\n else {\n video = {\n height: {\n ideal: 480\n },\n width: {\n ideal: 640\n }\n };\n }\n var mediaConstraints = {\n audio: audio,\n video: video\n };\n if (typeof mediaConstraints.audio === 'string') {\n mediaConstraints.audio = { deviceId: { exact: mediaConstraints.audio } };\n }\n if (mediaConstraints.video) {\n if (!!publisherProperties.resolution) {\n var widthAndHeight = publisherProperties.resolution.toLowerCase().split('x');\n var width = Number(widthAndHeight[0]);\n var height = Number(widthAndHeight[1]);\n mediaConstraints.video.width.ideal = width;\n mediaConstraints.video.height.ideal = height;\n }\n if (!!publisherProperties.frameRate) {\n mediaConstraints.video.frameRate = { ideal: publisherProperties.frameRate };\n }\n if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') {\n if (publisherProperties.videoSource === 'screen') {\n if (platform.name !== 'Chrome' && platform.name !== 'Firefox') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform.name);\n console.error(error);\n reject(error);\n }\n else {\n if (!!_this.advancedConfiguration.screenShareChromeExtension) {\n // Custom screen sharing extension for Chrome\n var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim();\n screenSharing.getChromeExtensionStatus(extensionId, function (status) {\n if (status === 'installed-enabled') {\n screenSharing.getScreenConstraints(function (error, screenConstraints) {\n if (!!error && error === 'permission-denied') {\n var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');\n console.error(error_1);\n reject(error_1);\n }\n else {\n mediaConstraints.video = screenConstraints;\n resolve(mediaConstraints);\n }\n });\n }\n if (status === 'installed-disabled') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');\n console.error(error);\n reject(error);\n }\n if (status === 'not-installed') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension);\n console.error(error);\n reject(error);\n }\n });\n }\n else {\n // Default screen sharing extension for Chrome\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (!!error) {\n if (error === 'not-installed') {\n var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_2);\n reject(error_2);\n }\n else if (error === 'installed-disabled') {\n var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');\n console.error(error_3);\n reject(error_3);\n }\n else if (error === 'permission-denied') {\n var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');\n console.error(error_4);\n reject(error_4);\n }\n }\n else {\n mediaConstraints.video = screenConstraints.video;\n resolve(mediaConstraints);\n }\n });\n }\n publisherProperties.videoSource = 'screen';\n }\n }\n else {\n // tslint:disable-next-line:no-string-literal\n mediaConstraints.video['deviceId'] = { exact: publisherProperties.videoSource };\n resolve(mediaConstraints);\n }\n }\n else {\n resolve(mediaConstraints);\n }\n }\n else {\n resolve(mediaConstraints);\n }\n });\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.startWs = function (onConnectSucces) {\n var config = {\n heartbeat: 5000,\n sendCloseMessage: false,\n ws: {\n uri: this.wsUri,\n useSockJS: false,\n onconnected: onConnectSucces,\n ondisconnect: this.disconnectCallback.bind(this),\n onreconnecting: this.reconnectingCallback.bind(this),\n onreconnected: this.reconnectedCallback.bind(this)\n },\n rpc: {\n requestTimeout: 15000,\n participantJoined: this.session.onParticipantJoined.bind(this.session),\n participantPublished: this.session.onParticipantPublished.bind(this.session),\n participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),\n participantLeft: this.session.onParticipantLeft.bind(this.session),\n participantEvicted: this.session.onParticipantEvicted.bind(this.session),\n recordingStarted: this.session.onRecordingStarted.bind(this.session),\n recordingStopped: this.session.onRecordingStopped.bind(this.session),\n sendMessage: this.session.onNewMessage.bind(this.session),\n iceCandidate: this.session.recvIceCandidate.bind(this.session),\n mediaError: this.session.onMediaError.bind(this.session)\n }\n };\n this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config);\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.closeWs = function () {\n this.jsonRpcClient.close();\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.sendRequest = function (method, params, callback) {\n if (params && params instanceof Function) {\n callback = params;\n params = {};\n }\n console.debug('Sending request: {method:\"' + method + '\", params: ' + JSON.stringify(params) + '}');\n this.jsonRpcClient.send(method, params, callback);\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.isMediaStreamTrack = function (mediaSource) {\n var is = (!!mediaSource &&\n mediaSource.enabled !== undefined && typeof mediaSource.enabled === 'boolean' &&\n mediaSource.id !== undefined && typeof mediaSource.id === 'string' &&\n mediaSource.kind !== undefined && typeof mediaSource.kind === 'string' &&\n mediaSource.label !== undefined && typeof mediaSource.label === 'string' &&\n mediaSource.muted !== undefined && typeof mediaSource.muted === 'boolean' &&\n mediaSource.readyState !== undefined && typeof mediaSource.readyState === 'string');\n return is;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getWsUri = function () {\n return this.wsUri;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getSecret = function () {\n return this.secret;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getRecorder = function () {\n return this.recorder;\n };\n /* Private methods */\n OpenVidu.prototype.disconnectCallback = function () {\n console.warn('Websocket connection lost');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenVidu.prototype.reconnectingCallback = function () {\n console.warn('Websocket connection lost (reconnecting)');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenVidu.prototype.reconnectedCallback = function () {\n console.warn('Websocket reconnected');\n };\n OpenVidu.prototype.isRoomAvailable = function () {\n if (this.session !== undefined && this.session instanceof __1.Session) {\n return true;\n }\n else {\n console.warn('Session instance not found');\n return false;\n }\n };\n return OpenVidu;\n}());\nexports.OpenVidu = OpenVidu;\n//# sourceMappingURL=OpenVidu.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar __1 = require(\"..\");\nvar StreamEvent_1 = require(\"../OpenViduInternal/Events/StreamEvent\");\nvar VideoElementEvent_1 = require(\"../OpenViduInternal/Events/VideoElementEvent\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method\n */\nvar Publisher = /** @class */ (function () {\n /**\n * @hidden\n */\n function Publisher(targetElement, properties, openvidu) {\n var _this = this;\n this.openvidu = openvidu;\n /**\n * Whether the Publisher has been granted access to the requested input devices or not\n */\n this.accessAllowed = false;\n this.ee = new EventEmitter();\n this.properties = properties;\n this.stream = new __1.Stream(this.session, { publisherProperties: properties, mediaConstraints: {} });\n this.stream.on('video-removed', function (element) {\n _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementDestroyed')]);\n });\n this.stream.on('stream-destroyed-by-disconnect', function (reason) {\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', _this.stream, reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n });\n if (typeof targetElement === 'string') {\n var e = document.getElementById(targetElement);\n if (!!e) {\n this.element = e;\n }\n }\n else if (targetElement instanceof HTMLElement) {\n this.element = targetElement;\n }\n if (!this.element) {\n console.warn(\"The provided 'targetElement' for the Publisher couldn't be resolved to any HTML element: \" + targetElement);\n }\n }\n /**\n * Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to publish the audio stream, `false` to unpublish it\n */\n Publisher.prototype.publishAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n console.info(\"'Publisher' has \" + (value ? 'published' : 'unpublished') + ' its audio stream');\n };\n /**\n * Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to publish the video stream, `false` to unpublish it\n */\n Publisher.prototype.publishVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n console.info(\"'Publisher' has \" + (value ? 'published' : 'unpublished') + ' its video stream');\n };\n /**\n * Call this method before [[Session.publish]] to subscribe to your Publisher's stream as any other user would do. The local video will be automatically replaced by the remote video\n */\n Publisher.prototype.subscribeToRemote = function () {\n this.stream.subscribeToMyRemote();\n };\n /**\n * See [[EventDispatcher.on]]\n */\n Publisher.prototype.on = function (type, handler) {\n var _this = this;\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\");\n }\n handler(event);\n });\n if (type === 'streamCreated') {\n if (!!this.stream && this.stream.isPublisherPublished) {\n this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);\n }\n else {\n this.stream.on('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);\n });\n }\n }\n if (type === 'videoElementCreated') {\n if (!!this.stream && this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.on('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.on('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n if (type === 'remoteVideoPlaying') {\n var video = this.stream.getVideoElement();\n if (this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'remoteVideoPlaying')]);\n }\n else {\n this.stream.on('remote-video-is-playing', function (element) {\n _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'remoteVideoPlaying')]);\n });\n }\n }\n if (type === 'accessAllowed') {\n if (this.stream.accessIsAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n }\n if (type === 'accessDenied') {\n if (this.stream.accessIsDenied) {\n this.ee.emitEvent('accessDenied');\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Publisher.prototype.once = function (type, handler) {\n var _this = this;\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\");\n }\n handler(event);\n });\n if (type === 'streamCreated') {\n if (!!this.stream && this.stream.isPublisherPublished) {\n this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);\n }\n else {\n this.stream.once('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);\n });\n }\n }\n if (type === 'videoElementCreated') {\n if (!!this.stream && this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.once('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.once('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n if (type === 'remoteVideoPlaying') {\n var video = this.stream.getVideoElement();\n if (this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'remoteVideoPlaying')]);\n }\n else {\n this.stream.once('remote-video-is-playing', function (element) {\n _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'remoteVideoPlaying')]);\n });\n }\n }\n if (type === 'accessAllowed') {\n if (this.stream.accessIsAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n }\n if (type === 'accessDenied') {\n if (this.stream.accessIsDenied) {\n this.ee.emitEvent('accessDenied');\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Publisher.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n return this;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n Publisher.prototype.initialize = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var errorCallback = function (openViduError) {\n _this.stream.accessIsDenied = true;\n _this.stream.accessIsAllowed = false;\n reject(openViduError);\n };\n var successCallback = function (mediaStream) {\n _this.stream.accessIsAllowed = true;\n _this.stream.accessIsDenied = false;\n if (_this.openvidu.isMediaStreamTrack(_this.properties.audioSource)) {\n mediaStream.removeTrack(mediaStream.getAudioTracks()[0]);\n mediaStream.addTrack(_this.properties.audioSource);\n }\n if (_this.openvidu.isMediaStreamTrack(_this.properties.videoSource)) {\n mediaStream.removeTrack(mediaStream.getVideoTracks()[0]);\n mediaStream.addTrack(_this.properties.videoSource);\n }\n // Apply PublisherProperties.publishAudio and PublisherProperties.publishVideo\n if (!!mediaStream.getAudioTracks()[0]) {\n mediaStream.getAudioTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishAudio;\n }\n if (!!mediaStream.getVideoTracks()[0]) {\n mediaStream.getVideoTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishVideo;\n }\n _this.stream.setMediaStream(mediaStream);\n _this.stream.insertVideo(_this.element, _this.properties.insertMode);\n resolve();\n };\n _this.openvidu.generateMediaConstraints(_this.properties)\n .then(function (constraints) {\n var outboundStreamOptions = {\n mediaConstraints: constraints,\n publisherProperties: _this.properties\n };\n _this.stream.setOutboundStreamOptions(outboundStreamOptions);\n // Ask independently for audio stream and video stream. If the user asks for both of them and one is blocked, the method still\n // success only with the allowed input. This is not the desierd behaviour: if any of them is blocked, access should be denied\n var constraintsAux = {};\n var timeForDialogEvent = 1250;\n if (_this.stream.isSendVideo()) {\n constraintsAux.audio = false;\n constraintsAux.video = constraints.video;\n var startTime_1 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraintsAux)\n .then(function (videoOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n if (_this.stream.isSendAudio()) {\n constraintsAux.audio = (constraints.audio === undefined) ? true : constraints.audio;\n constraintsAux.video = false;\n startTime_1 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraintsAux)\n .then(function (audioOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n videoOnlyStream.addTrack(audioOnlyStream.getAudioTracks()[0]);\n successCallback(videoOnlyStream);\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n videoOnlyStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n var errorName;\n var errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n break;\n case 'notallowederror':\n errorName = OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;\n errorMessage = error.toString();\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = \"Audio input device with deviceId '\" + constraints.audio.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Audio input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n }\n else {\n successCallback(videoOnlyStream);\n }\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n var errorName;\n var errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n break;\n case 'notallowederror':\n errorName = _this.stream.isSendScreen() ? OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED : OpenViduError_1.OpenViduErrorName.CAMERA_ACCESS_DENIED;\n errorMessage = error.toString();\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;\n errorMessage = \"Video input device with deviceId '\" + constraints.video.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Video input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n }\n else if (_this.stream.isSendAudio()) {\n constraintsAux.audio = (constraints.audio === undefined) ? true : constraints.audio;\n constraintsAux.video = false;\n var startTime_2 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (audioOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_2, timeForDialogEvent);\n successCallback(audioOnlyStream);\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_2, timeForDialogEvent);\n var errorName;\n var errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n break;\n case 'notallowederror':\n errorName = OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;\n errorMessage = error.toString();\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = \"Audio input device with deviceId '\" + constraints.audio.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Audio input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n }\n else {\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET, \"Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'\"));\n }\n })[\"catch\"](function (error) {\n errorCallback(error);\n });\n });\n };\n /**\n * @hidden\n */\n Publisher.prototype.updateSession = function (session) {\n this.session = session;\n this.stream.session = session;\n };\n /**\n * @hidden\n */\n Publisher.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /* Private methods */\n Publisher.prototype.setPermissionDialogTimer = function (waitTime) {\n var _this = this;\n this.permissionDialogTimeout = setTimeout(function () {\n _this.ee.emitEvent('accessDialogOpened', []);\n }, waitTime);\n };\n Publisher.prototype.clearPermissionDialogTimer = function (startTime, waitTime) {\n clearTimeout(this.permissionDialogTimeout);\n if ((Date.now() - startTime) > waitTime) {\n // Permission dialog was shown and now is closed\n this.ee.emitEvent('accessDialogClosed', []);\n }\n };\n /* Private methods */\n Publisher.prototype.userMediaHasVideo = function (callback) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // If the user is going to publish its screen there's a video source\n if ((typeof _this.properties.videoSource === 'string') && _this.properties.videoSource === 'screen') {\n resolve(true);\n }\n else {\n _this.openvidu.getDevices()\n .then(function (devices) {\n resolve(!!(devices.filter(function (device) {\n return device.kind === 'videoinput';\n })[0]));\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n Publisher.prototype.userMediaHasAudio = function (callback) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.openvidu.getDevices()\n .then(function (devices) {\n resolve(!!(devices.filter(function (device) {\n return device.kind === 'audioinput';\n })[0]));\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n return Publisher;\n}());\nexports.Publisher = Publisher;\n//# sourceMappingURL=Publisher.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Publisher.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Publisher.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar __1 = require(\"..\");\nvar ConnectionEvent_1 = require(\"../OpenViduInternal/Events/ConnectionEvent\");\nvar RecordingEvent_1 = require(\"../OpenViduInternal/Events/RecordingEvent\");\nvar SessionDisconnectedEvent_1 = require(\"../OpenViduInternal/Events/SessionDisconnectedEvent\");\nvar SignalEvent_1 = require(\"../OpenViduInternal/Events/SignalEvent\");\nvar StreamEvent_1 = require(\"../OpenViduInternal/Events/StreamEvent\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar VersionAdapter_1 = require(\"../OpenViduInternal/VersionAdapter\");\nvar platform = require(\"platform\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Represents a video call. It can also be seen as a videoconference room where multiple users can connect.\n * Participants who publish their videos to a session will be seen by the rest of users connected to that specific session.\n * Initialized with [[OpenVidu.initSession]] method\n */\nvar Session = /** @class */ (function () {\n /**\n * @hidden\n */\n function Session(openvidu) {\n // This map is only used to avoid race condition between 'joinRoom' response and 'onParticipantPublished' notification\n /**\n * @hidden\n */\n this.remoteStreamsCreated = {};\n /**\n * @hidden\n */\n this.remoteConnections = {};\n /**\n * @hidden\n */\n this.speakingEventsEnabled = false;\n this.ee = new EventEmitter();\n this.openvidu = openvidu;\n }\n /**\n * Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when\n * they receive `streamCreated` event. The structure of `metadata` string is up to you (maybe some standarized format\n * as JSON or XML is a good idea), the only restriction is a maximum length of 10000 chars.\n *\n * This metadata is not considered secure, as it is generated in the client side. To pass securized data, add it as a parameter in the\n * token generation operation (through the API REST, openvidu-java-client or openvidu-node-client).\n *\n * Only after the returned Promise is successfully resolved [[Session.connection]] object will be available and properly defined.\n *\n * #### Events dispatched\n *\n * The [[Session]] object of the local participant will first dispatch one or more `connectionCreated` events upon successful termination of this method:\n * - First one for your own local Connection object, so you can retrieve [[Session.connection]] property.\n * - Then one for each remote Connection previously connected to the Session, if any. Any other remote user connecting to the Session after you have\n * successfully connected will also dispatch a `connectionCreated` event when they do so.\n *\n * The [[Session]] object of the local participant will also dispatch a `streamCreated` event for each remote active [[Publisher]] after dispatching all remote\n * `connectionCreated` events.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `connectionCreated` event.\n *\n * See [[ConnectionEvent]] and [[StreamEvent]] to learn more.\n *\n * @returns A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not\n *\n */\n Session.prototype.connect = function (token, metadata, param3) {\n var _this = this;\n // DEPRECATED WARNING\n return VersionAdapter_1.solveIfCallback('Session.connect', (!!param3 && (typeof param3 === 'function')) ? param3 : ((typeof metadata === 'function') ? metadata : ''), \n /*return */ new Promise(function (resolve, reject) {\n _this.processToken(token);\n if (_this.openvidu.checkSystemRequirements()) {\n // Early configuration to deactivate automatic subscription to streams\n _this.options = {\n sessionId: _this.sessionId,\n participantId: token,\n metadata: !!metadata ? _this.stringClientMetadata(metadata) : ''\n };\n _this.connectAux(token).then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu'));\n }\n }));\n };\n /**\n * Leaves the session, destroying all streams and deleting the user as a participant.\n *\n * #### Events dispatched\n *\n * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event.\n * This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also delete the HTML video element associated to it.\n * Call `event.preventDefault()` to avoid this beahviour and take care of disposing and cleaning all the Subscriber objects yourself. See [[SessionDisconnectedEvent]] to learn more.\n *\n * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session.\n * This event will automatically stop all media tracks and delete the HTML video element associated to it.\n * Call `event.preventDefault()` if you want clean the Publisher object yourself or re-publish it in a different Session (to do so it is a mandatory\n * requirement to call `Session.unpublish()` or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing.\n * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and delete the HTML video element associated to it.\n * Call `event.preventDefault()` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself. See [[StreamEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `connectionDestroyed` event in any case. See [[ConnectionEvent]] to learn more.\n */\n Session.prototype.disconnect = function () {\n this.leave(false, 'disconnect');\n };\n /**\n * Subscribes to a `stream`, adding a new HTML video element to DOM with `subscriberProperties` settings. This method is usually called in the callback of `streamCreated` event.\n *\n * #### Events dispatched\n *\n * The [[Subscriber]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (if _targetElement_ not null or undefined)\n *\n * The [[Subscriber]] object will dispatch a `videoPlaying` event once the remote video starts playing (only if `videoElementCreated` event has been previously dispatched)\n *\n * See [[VideoElementEvent]] to learn more.\n *\n * @param stream Stream object to subscribe to\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Subscriber will be inserted (see [[SubscriberProperties.insertMode]]). If null or undefined no default video will be created for this Subscriber\n * (you can always access the native MediaStream object by calling _Subscriber.stream.getMediaStream()_ and use it as _srcObject_ of any HTML video element)\n * @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails.\n */\n Session.prototype.subscribe = function (stream, targetElement, param3, param4) {\n var properties = {};\n if (!!param3 && typeof param3 !== 'function') {\n properties = {\n insertMode: (typeof param3.insertMode !== 'undefined') ? ((typeof param3.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[param3.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND,\n subscribeToAudio: (typeof param3.subscribeToAudio !== 'undefined') ? param3.subscribeToAudio : true,\n subscribeToVideo: (typeof param3.subscribeToVideo !== 'undefined') ? param3.subscribeToVideo : true\n };\n }\n else {\n properties = {\n insertMode: VideoInsertMode_1.VideoInsertMode.APPEND,\n subscribeToAudio: true,\n subscribeToVideo: true\n };\n }\n var completionHandler;\n if (!!param3 && (typeof param3 === 'function')) {\n completionHandler = param3;\n }\n else if (!!param4) {\n completionHandler = param4;\n }\n console.info('Subscribing to ' + stream.connection.connectionId);\n stream.subscribe()\n .then(function () {\n console.info('Subscribed correctly to ' + stream.connection.connectionId);\n if (completionHandler !== undefined) {\n completionHandler(undefined);\n }\n })[\"catch\"](function (error) {\n if (completionHandler !== undefined) {\n completionHandler(error);\n }\n });\n var subscriber = new __1.Subscriber(stream, targetElement, properties);\n stream.insertVideo(subscriber.element, properties.insertMode);\n return subscriber;\n };\n Session.prototype.subscribeAsync = function (stream, targetElement, properties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var subscriber;\n var callback = function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve(subscriber);\n }\n };\n if (!!properties) {\n subscriber = _this.subscribe(stream, targetElement, properties, callback);\n }\n else {\n subscriber = _this.subscribe(stream, targetElement, callback);\n }\n });\n };\n /**\n * Unsubscribes from `subscriber`, automatically removing its HTML video element.\n *\n * #### Events dispatched\n *\n * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event (only if it previously dispatched a `videoElementCreated` event). See [[VideoElementEvent]] to learn more\n */\n Session.prototype.unsubscribe = function (subscriber) {\n var connectionId = subscriber.stream.connection.connectionId;\n console.info('Unsubscribing from ' + connectionId);\n this.openvidu.sendRequest('unsubscribeFromVideo', {\n sender: subscriber.stream.connection.connectionId\n }, function (error, response) {\n if (error) {\n console.error('Error unsubscribing from ' + connectionId, error);\n }\n else {\n console.info('Unsubscribed correctly from ' + connectionId);\n }\n subscriber.stream.disposeWebRtcPeer();\n subscriber.stream.disposeMediaStream();\n });\n subscriber.stream.removeVideo();\n };\n /**\n * Publishes the participant's audio-video stream contained in `publisher` object to the session\n *\n * #### Events dispatched\n *\n * The local [[Publisher]] object will dispatch a `streamCreated` event upon successful termination of this method. See [[StreamEvent]] to learn more.\n *\n * The local [[Publisher]] object will dispatch a `remoteVideoPlaying` event only if [[Publisher.subscribeToRemote]] was called before this method, once the remote video starts playing.\n * See [[VideoElementEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamCreated` event so they can subscribe to it. See [[StreamEvent]] to learn more.\n *\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the publisher was successfully published and rejected with an Error object if not\n */\n Session.prototype.publish = function (publisher) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n publisher.session = _this;\n publisher.stream.session = _this;\n if (!publisher.stream.isPublisherPublished) {\n // 'Session.unpublish(Publisher)' has NOT been called\n _this.connection.addStream(publisher.stream);\n publisher.stream.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n // 'Session.unpublish(Publisher)' has been called. Must initialize again Publisher\n publisher.initialize()\n .then(function () {\n _this.connection.addStream(publisher.stream);\n publisher.stream.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n /**\n * Unpublishes the participant's audio-video stream contained in `publisher` object.\n *\n * #### Events dispatched\n *\n * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event.\n * This event will automatically stop all media tracks and delete the HTML video element associated to it.\n * Call `event.preventDefault()` if you want clean the Publisher object yourself or re-publish it in a different Session.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event.\n * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and delete the HTML video element associated to it.\n * Call `event.preventDefault()` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself.\n *\n * See [[StreamEvent]] to learn more.\n */\n Session.prototype.unpublish = function (publisher) {\n var stream = publisher.stream;\n if (!stream.connection) {\n console.error('The associated Connection object of this Publisher is null', stream);\n return;\n }\n else if (stream.connection !== this.connection) {\n console.error('The associated Connection object of this Publisher is not your local Connection.' +\n \"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method\", stream);\n return;\n }\n else {\n console.info('Unpublishing local media (' + stream.connection.connectionId + ')');\n this.openvidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info('Media unpublished correctly');\n }\n });\n stream.disposeWebRtcPeer();\n delete stream.connection.stream;\n var streamEvent = new StreamEvent_1.StreamEvent(true, publisher, 'streamDestroyed', publisher.stream, 'unpublish');\n publisher.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n }\n };\n /**\n * Sends one signal. `signal` object has the following optional properties:\n * ```json\n * {data:string, to:Connection[], type:string}\n * ```\n * All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local\n * Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more.\n *\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't\n * mean that openvidu-server could resend the message to all the listed receivers._\n */\n /* tslint:disable:no-string-literal */\n Session.prototype.signal = function (signal, callback) {\n var _this = this;\n // DEPRECATED WARNING\n return VersionAdapter_1.solveIfCallback('Session.signal', callback, \n /*return */ new Promise(function (resolve, reject) {\n var signalMessage = {};\n if (signal.to && signal.to.length > 0) {\n var connectionIds_1 = [];\n signal.to.forEach(function (connection) {\n connectionIds_1.push(connection.connectionId);\n });\n signalMessage['to'] = connectionIds_1;\n }\n else {\n signalMessage['to'] = [];\n }\n signalMessage['data'] = signal.data ? signal.data : '';\n signalMessage['type'] = signal.type ? signal.type : '';\n _this.openvidu.sendRequest('sendMessage', {\n message: JSON.stringify(signalMessage)\n }, function (error, response) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve();\n }\n });\n }));\n };\n /* tslint:enable:no-string-literal */\n /**\n * See [[EventDispatcher.on]]\n */\n Session.prototype.on = function (type, handler) {\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\");\n }\n handler(event);\n });\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = true;\n // If there are already available remote streams, enable hark 'speaking' event in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !str.speechEvent && str.hasAudio) {\n str.enableSpeakingEvents();\n }\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Session.prototype.once = function (type, handler) {\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\");\n }\n handler(event);\n });\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = true;\n // If there are already available remote streams, enable hark in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !str.speechEvent && str.hasAudio) {\n str.enableOnceSpeakingEvents();\n }\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Session.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = false;\n // If there are already available remote streams, disablae hark in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !!str.speechEvent) {\n str.disableSpeakingEvents();\n }\n }\n }\n return this;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n Session.prototype.onParticipantJoined = function (response) {\n var _this = this;\n // Connection shouldn't exist\n this.getConnection(response.id, '')\n .then(function (connection) {\n console.warn('Connection ' + response.id + ' already exists in connections list');\n })[\"catch\"](function (openViduError) {\n var connection = new __1.Connection(_this, response);\n _this.remoteConnections[response.id] = connection;\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantLeft = function (msg) {\n var _this = this;\n this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + \" unknown when 'onParticipantLeft'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (connection) {\n if (!!connection.stream) {\n var stream = connection.stream;\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', stream, msg.reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n delete _this.remoteStreamsCreated[stream.streamId];\n }\n delete _this.remoteConnections[connection.connectionId];\n _this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionDestroyed', connection, msg.reason)]);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantPublished = function (response) {\n var _this = this;\n var afterConnectionFound = function (connection) {\n _this.remoteConnections[connection.connectionId] = connection;\n if (!_this.remoteStreamsCreated[connection.stream.streamId]) {\n // Avoid race condition between stream.subscribe() in \"onParticipantPublished\" and in \"joinRoom\" rpc callback\n // This condition is false if openvidu-server sends \"participantPublished\" event to a subscriber participant that has\n // already subscribed to certain stream in the callback of \"joinRoom\" method\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', connection.stream, '')]);\n }\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n };\n // Get the existing Connection created on 'onParticipantJoined' for\n // existing participants or create a new one for new participants\n var connection;\n this.getRemoteConnection(response.id, \"Remote connection '\" + response.id + \"' unknown when 'onParticipantPublished'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (con) {\n // Update existing Connection\n connection = con;\n response.metadata = con.data;\n connection.options = response;\n connection.initRemoteStreams(response.streams);\n afterConnectionFound(connection);\n })[\"catch\"](function (openViduError) {\n // Create new Connection\n connection = new __1.Connection(_this, response);\n afterConnectionFound(connection);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantUnpublished = function (msg) {\n var _this = this;\n this.getRemoteConnection(msg.name, \"Remote connection '\" + msg.name + \"' unknown when 'onParticipantUnpublished'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (connection) {\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', connection.stream, msg.reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n // Deleting the remote stream\n var streamId = connection.stream.streamId;\n delete _this.remoteStreamsCreated[streamId];\n connection.removeStream(streamId);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantEvicted = function (msg) {\n /*this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + \" unknown when 'onParticipantLeft'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n\n .then(connection => {\n if (!!connection.stream) {\n const stream = connection.stream;\n\n const streamEvent = new StreamEvent(true, this, 'streamDestroyed', stream, 'forceDisconnect');\n this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n\n delete this.remoteStreamsCreated[stream.streamId];\n }\n connection.dispose();\n delete this.remoteConnections[connection.connectionId];\n this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent(false, this, 'connectionDestroyed', connection, 'forceDisconnect')]);\n })\n .catch(openViduError => {\n console.error(openViduError);\n });*/\n };\n /**\n * @hidden\n */\n Session.prototype.onNewMessage = function (msg) {\n var _this = this;\n console.info('New signal: ' + JSON.stringify(msg));\n this.getConnection(msg.from, \"Connection '\" + msg.from + \"' unknow when 'onNewMessage'. Existing remote connections: \"\n + JSON.stringify(Object.keys(this.remoteConnections)) + '. Existing local connection: ' + this.connection.connectionId)\n .then(function (connection) {\n _this.ee.emitEvent('signal', [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]);\n _this.ee.emitEvent('signal:' + msg.type, [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.recvIceCandidate = function (msg) {\n var candidate = {\n candidate: msg.candidate,\n sdpMid: msg.sdpMid,\n sdpMLineIndex: msg.sdpMLineIndex\n };\n this.getConnection(msg.endpointName, 'Connection not found for endpoint ' + msg.endpointName + '. Ice candidate will be ignored: ' + candidate)\n .then(function (connection) {\n var stream = connection.stream;\n stream.getWebRtcPeer().addIceCandidate(candidate, function (error) {\n if (error) {\n console.error('Error adding candidate for ' + stream.streamId\n + ' stream of endpoint ' + msg.endpointName + ': ' + error);\n }\n });\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onSessionClosed = function (msg) {\n console.info('Session closed: ' + JSON.stringify(msg));\n var s = msg.room;\n if (s !== undefined) {\n this.ee.emitEvent('session-closed', [{\n session: s\n }]);\n }\n else {\n console.warn('Session undefined on session closed', msg);\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onLostConnection = function () {\n if (!this.connection) {\n console.warn('Not connected to session: if you are not debugging, this is probably a certificate error');\n var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0];\n if (window.confirm('If you are not debugging, this is probably a certificate error at \\\"' + url + '\\\"\\n\\nClick OK to navigate and accept it')) {\n location.assign(url + '/accept-certificate');\n }\n return;\n }\n console.warn('Lost connection in Session ' + this.sessionId);\n if (!!this.sessionId && !this.connection.disposed) {\n this.leave(true, 'networkDisconnect');\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onMediaError = function (params) {\n console.error('Media error: ' + JSON.stringify(params));\n var err = params.error;\n if (err) {\n this.ee.emitEvent('error-media', [{\n error: err\n }]);\n }\n else {\n console.warn('Received undefined media error. Params:', params);\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onRecordingStarted = function (response) {\n this.ee.emitEvent('recordingStarted', [new RecordingEvent_1.RecordingEvent(this, 'recordingStarted', response.id, response.name)]);\n };\n /**\n * @hidden\n */\n Session.prototype.onRecordingStopped = function (response) {\n this.ee.emitEvent('recordingStopped', [new RecordingEvent_1.RecordingEvent(this, 'recordingStopped', response.id, response.name)]);\n };\n /**\n * @hidden\n */\n Session.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /**\n * @hidden\n */\n Session.prototype.leave = function (forced, reason) {\n var _this = this;\n forced = !!forced;\n console.info('Leaving Session (forced=' + forced + ')');\n if (!!this.connection) {\n if (!this.connection.disposed && !forced) {\n this.openvidu.sendRequest('leaveRoom', function (error, response) {\n if (error) {\n console.error(error);\n }\n _this.openvidu.closeWs();\n });\n }\n else {\n this.openvidu.closeWs();\n }\n if (!!this.connection.stream) {\n // Make Publisher object dispatch 'streamDestroyed' event (if there's a local stream)\n this.connection.stream.disposeWebRtcPeer();\n this.connection.stream.emitEvent('stream-destroyed-by-disconnect', [reason]);\n }\n if (!this.connection.disposed) {\n // Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed)\n var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason);\n this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]);\n sessionDisconnectEvent.callDefaultBehaviour();\n }\n }\n else {\n console.warn('You were not connected to the session ' + this.sessionId);\n }\n };\n /* Private methods */\n Session.prototype.connectAux = function (token) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.openvidu.startWs(function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n var joinParams = {\n token: (!!token) ? token : '',\n session: _this.sessionId,\n metadata: !!_this.options.metadata ? _this.options.metadata : '',\n secret: _this.openvidu.getSecret(),\n recorder: _this.openvidu.getRecorder()\n };\n _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) {\n if (!!error) {\n reject(error);\n }\n else {\n // Initialize local Connection object with values returned by openvidu-server\n _this.connection = new __1.Connection(_this);\n _this.connection.connectionId = response.id;\n _this.connection.data = response.metadata;\n // Initialize remote Connections with value returned by openvidu-server\n var events_1 = {\n connections: new Array(),\n streams: new Array()\n };\n var existingParticipants = response.value;\n existingParticipants.forEach(function (participant) {\n var connection = new __1.Connection(_this, participant);\n _this.remoteConnections[connection.connectionId] = connection;\n events_1.connections.push(connection);\n if (!!connection.stream) {\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n events_1.streams.push(connection.stream);\n }\n });\n // Own 'connectionCreated' event\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]);\n // One 'connectionCreated' event for each existing connection in the session\n events_1.connections.forEach(function (connection) {\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]);\n });\n // One 'streamCreated' event for each active stream in the session\n events_1.streams.forEach(function (stream) {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]);\n });\n resolve();\n }\n });\n }\n });\n });\n };\n Session.prototype.stringClientMetadata = function (metadata) {\n if (typeof metadata !== 'string') {\n return JSON.stringify(metadata);\n }\n else {\n return metadata;\n }\n };\n Session.prototype.getConnection = function (connectionId, errorMessage) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var connection = _this.remoteConnections[connectionId];\n if (!!connection) {\n // Resolve remote connection\n resolve(connection);\n }\n else {\n if (_this.connection.connectionId === connectionId) {\n // Resolve local connection\n resolve(_this.connection);\n }\n else {\n // Connection not found. Reject with OpenViduError\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage));\n }\n }\n });\n };\n Session.prototype.getRemoteConnection = function (connectionId, errorMessage) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var connection = _this.remoteConnections[connectionId];\n if (!!connection) {\n // Resolve remote connection\n resolve(connection);\n }\n else {\n // Remote connection not found. Reject with OpenViduError\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage));\n }\n });\n };\n Session.prototype.processToken = function (token) {\n var url = new URL(token);\n this.sessionId = url.searchParams.get('sessionId');\n var secret = url.searchParams.get('secret');\n var recorder = url.searchParams.get('recorder');\n if (!!secret) {\n this.openvidu.secret = secret;\n }\n if (!!recorder) {\n this.openvidu.recorder = true;\n }\n this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';\n };\n return Session;\n}());\nexports.Session = Session;\n//# sourceMappingURL=Session.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Session.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Session.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar WebRtcStats_1 = require(\"../OpenViduInternal/WebRtcStats/WebRtcStats\");\nvar PublisherSpeakingEvent_1 = require(\"../OpenViduInternal/Events/PublisherSpeakingEvent\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar kurentoUtils = require(\"../OpenViduInternal/KurentoUtils/kurento-utils-js\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\n/**\n * Represents each one of the videos send and receive by a user in a session.\n * Therefore each [[Publisher]] and [[Subscriber]] has an attribute of type Stream\n */\nvar Stream = /** @class */ (function () {\n /**\n * @hidden\n */\n function Stream(session, options) {\n var _this = this;\n this.ee = new EventEmitter();\n this.isSubscribeToRemote = false;\n /**\n * @hidden\n */\n this.isReadyToPublish = false;\n /**\n * @hidden\n */\n this.isPublisherPublished = false;\n /**\n * @hidden\n */\n this.isVideoELementCreated = false;\n /**\n * @hidden\n */\n this.accessIsAllowed = false;\n /**\n * @hidden\n */\n this.accessIsDenied = false;\n this.session = session;\n if (options.hasOwnProperty('id')) {\n // InboundStreamOptions: stream belongs to a Subscriber\n this.inboundStreamOpts = options;\n this.streamId = this.inboundStreamOpts.id;\n this.hasAudio = this.inboundStreamOpts.recvAudio;\n this.hasVideo = this.inboundStreamOpts.recvVideo;\n this.typeOfVideo = (!this.inboundStreamOpts.typeOfVideo) ? undefined : this.inboundStreamOpts.typeOfVideo;\n this.frameRate = (this.inboundStreamOpts.frameRate === -1) ? undefined : this.inboundStreamOpts.frameRate;\n }\n else {\n // OutboundStreamOptions: stream belongs to a Publisher\n this.outboundStreamOpts = options;\n if (this.isSendVideo()) {\n if (this.isSendScreen()) {\n this.streamId = 'SCREEN';\n this.typeOfVideo = 'SCREEN';\n }\n else {\n this.streamId = 'CAMERA';\n this.typeOfVideo = 'CAMERA';\n }\n this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate;\n }\n else {\n this.streamId = 'MICRO';\n delete this.typeOfVideo;\n }\n this.hasAudio = this.isSendAudio();\n this.hasVideo = this.isSendVideo();\n }\n this.on('mediastream-updated', function () {\n if (_this.video)\n _this.video.srcObject = _this.mediaStream;\n console.debug('Video srcObject [' + _this.mediaStream + '] updated in stream [' + _this.streamId + ']');\n });\n }\n /* Hidden methods */\n /**\n * @hidden\n */\n Stream.prototype.getMediaStream = function () {\n return this.mediaStream;\n };\n /**\n * @hidden\n */\n Stream.prototype.setMediaStream = function (mediaStream) {\n this.mediaStream = mediaStream;\n this.ee.emitEvent('mediastream-updated');\n };\n /**\n * @hidden\n */\n Stream.prototype.getWebRtcPeer = function () {\n return this.webRtcPeer;\n };\n /**\n * @hidden\n */\n Stream.prototype.getRTCPeerConnection = function () {\n return this.webRtcPeer.peerConnection;\n };\n /**\n * @hidden\n */\n Stream.prototype.getVideoElement = function () {\n return this.video;\n };\n /**\n * @hidden\n */\n Stream.prototype.subscribeToMyRemote = function () {\n this.isSubscribeToRemote = true;\n };\n /**\n * @hidden\n */\n Stream.prototype.setOutboundStreamOptions = function (outboundStreamOpts) {\n this.outboundStreamOpts = outboundStreamOpts;\n };\n /**\n * @hidden\n */\n Stream.prototype.subscribe = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.initWebRtcPeerReceive()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.publish = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.isReadyToPublish) {\n _this.initWebRtcPeerSend()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n _this.ee.once('stream-ready-to-publish', function (streamEvent) {\n _this.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n }\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.disposeWebRtcPeer = function () {\n if (this.webRtcPeer) {\n this.webRtcPeer.dispose();\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n this.stopWebRtcStats();\n console.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + \"WebRTCPeer from 'Stream' with id [\" + this.streamId + '] is now closed');\n };\n /**\n * @hidden\n */\n Stream.prototype.disposeMediaStream = function () {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n }\n console.info((!!this.outboundStreamOpts ? 'Local ' : 'Remote ') + \"MediaStream from 'Stream' with id [\" + this.streamId + '] is now disposed');\n };\n /**\n * @hidden\n */\n Stream.prototype.displayMyRemote = function () {\n return this.isSubscribeToRemote;\n };\n /**\n * @hidden\n */\n Stream.prototype.on = function (eventName, listener) {\n this.ee.on(eventName, listener);\n };\n /**\n * @hidden\n */\n Stream.prototype.once = function (eventName, listener) {\n this.ee.once(eventName, listener);\n };\n /**\n * @hidden\n */\n Stream.prototype.insertVideo = function (targetElement, insertMode) {\n var _this = this;\n if (!!targetElement) {\n this.video = document.createElement('video');\n this.video.id = (this.isLocal() ? 'local-' : 'remote-') + 'video-' + this.streamId;\n this.video.autoplay = true;\n this.video.controls = false;\n this.video.srcObject = this.mediaStream;\n if (this.isLocal() && !this.displayMyRemote()) {\n this.video.muted = true;\n if (this.outboundStreamOpts.publisherProperties.mirror) {\n this.mirrorVideo(this.video);\n }\n this.video.oncanplay = function () {\n console.info(\"Local 'Stream' with id [\" + _this.streamId + '] video is now playing');\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n };\n }\n else {\n this.video.title = this.streamId;\n }\n this.targetElement = targetElement;\n this.parentId = targetElement.id;\n var insMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND;\n this.insertElementWithMode(this.video, insMode);\n this.ee.emitEvent('video-element-created-by-stream', [{\n element: this.video\n }]);\n this.isVideoELementCreated = true;\n }\n this.isReadyToPublish = true;\n this.ee.emitEvent('stream-ready-to-publish');\n return this.video;\n };\n /**\n * @hidden\n */\n Stream.prototype.removeVideo = function () {\n if (this.video) {\n if (document.getElementById(this.parentId)) {\n document.getElementById(this.parentId).removeChild(this.video);\n this.ee.emitEvent('video-removed', [this.video]);\n }\n delete this.video;\n }\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendAudio = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.audioSource !== null &&\n this.outboundStreamOpts.publisherProperties.audioSource !== false);\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendVideo = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.videoSource !== null &&\n this.outboundStreamOpts.publisherProperties.videoSource !== false);\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendScreen = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.videoSource === 'screen');\n };\n /**\n * @hidden\n */\n Stream.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /**\n * @hidden\n */\n Stream.prototype.setSpeechEventIfNotExists = function () {\n if (!this.speechEvent) {\n var harkOptions = this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {};\n harkOptions.interval = (typeof harkOptions.interval === 'number') ? harkOptions.interval : 50;\n harkOptions.threshold = (typeof harkOptions.threshold === 'number') ? harkOptions.threshold : -50;\n this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.mediaStream, harkOptions);\n }\n };\n /**\n * @hidden\n */\n Stream.prototype.enableSpeakingEvents = function () {\n var _this = this;\n this.setSpeechEventIfNotExists();\n this.speechEvent.on('speaking', function () {\n _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]);\n });\n this.speechEvent.on('stopped_speaking', function () {\n _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]);\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.enableOnceSpeakingEvents = function () {\n var _this = this;\n this.setSpeechEventIfNotExists();\n this.speechEvent.on('speaking', function () {\n _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]);\n _this.disableSpeakingEvents();\n });\n this.speechEvent.on('stopped_speaking', function () {\n _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]);\n _this.disableSpeakingEvents();\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.disableSpeakingEvents = function () {\n this.speechEvent.stop();\n this.speechEvent = undefined;\n };\n /* Private methods */\n Stream.prototype.initWebRtcPeerSend = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var userMediaConstraints = {\n audio: _this.isSendAudio(),\n video: _this.isSendVideo()\n };\n var options = {\n videoStream: _this.mediaStream,\n mediaConstraints: userMediaConstraints,\n onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),\n iceServers: _this.session.openvidu.advancedConfiguration.iceServers\n };\n var successCallback = function (error, sdpOfferParam, wp) {\n if (error) {\n reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error)));\n }\n console.debug('Sending SDP offer to publish as '\n + _this.streamId, sdpOfferParam);\n _this.session.openvidu.sendRequest('publishVideo', {\n sdpOffer: sdpOfferParam,\n doLoopback: _this.displayMyRemote() || false,\n audioActive: _this.isSendAudio(),\n videoActive: _this.isSendVideo(),\n typeOfVideo: ((_this.isSendVideo()) ? (_this.isSendScreen() ? 'SCREEN' : 'CAMERA') : ''),\n frameRate: !!_this.frameRate ? _this.frameRate : -1\n }, function (error, response) {\n if (error) {\n reject('Error on publishVideo: ' + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer)\n .then(function () {\n _this.ee.emitEvent('stream-created-by-publisher');\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n console.info(\"'Publisher' successfully published to session\");\n }\n });\n };\n if (_this.displayMyRemote()) {\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (err) {\n if (err) {\n reject(err);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n }\n else {\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {\n if (error) {\n reject(error);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n }\n _this.isPublisherPublished = true;\n });\n };\n Stream.prototype.initWebRtcPeerReceive = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var offerConstraints = {\n audio: _this.inboundStreamOpts.recvAudio,\n video: _this.inboundStreamOpts.recvVideo\n };\n console.debug(\"'Session.subscribe(Stream)' called. Constraints of generate SDP offer\", offerConstraints);\n var options = {\n onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),\n mediaConstraints: offerConstraints\n };\n var successCallback = function (error, sdpOfferParam, wp) {\n if (error) {\n reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error)));\n }\n console.debug('Sending SDP offer to subscribe to '\n + _this.streamId, sdpOfferParam);\n _this.session.openvidu.sendRequest('receiveVideoFrom', {\n sender: _this.streamId,\n sdpOffer: sdpOfferParam\n }, function (error, response) {\n if (error) {\n reject(new Error('Error on recvVideoFrom: ' + JSON.stringify(error)));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer).then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {\n if (error) {\n reject(error);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n });\n };\n Stream.prototype.processSdpAnswer = function (sdpAnswer) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n console.debug(_this.streamId + ': set peer connection with recvd SDP answer', sdpAnswer);\n var streamId = _this.streamId;\n var peerConnection = _this.webRtcPeer.peerConnection;\n peerConnection.setRemoteDescription(answer, function () {\n // Avoids to subscribe to your own stream remotely\n // except when showMyRemote is true\n if (!_this.isLocal() || _this.displayMyRemote()) {\n _this.mediaStream = peerConnection.getRemoteStreams()[0];\n console.debug('Peer remote stream', _this.mediaStream);\n if (!!_this.mediaStream) {\n _this.ee.emitEvent('mediastream-updated');\n if (!!_this.mediaStream.getAudioTracks()[0] && _this.session.speakingEventsEnabled) {\n _this.enableSpeakingEvents();\n }\n }\n if (!!_this.video) {\n // let thumbnailId = this.video.thumb;\n _this.video.oncanplay = function () {\n if (_this.isLocal() && _this.displayMyRemote()) {\n console.info(\"Your own remote 'Stream' with id [\" + _this.streamId + '] video is now playing');\n _this.ee.emitEvent('remote-video-is-playing', [{\n element: _this.video\n }]);\n }\n else if (!_this.isLocal() && !_this.displayMyRemote()) {\n console.info(\"Remote 'Stream' with id [\" + _this.streamId + '] video is now playing');\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n }\n // show(thumbnailId);\n // this.hideSpinner(this.streamId);\n };\n }\n _this.session.emitEvent('stream-subscribed', [{\n stream: _this\n }]);\n }\n _this.initWebRtcStats();\n resolve();\n }, function (error) {\n reject(new Error(_this.streamId + ': Error setting SDP to the peer connection: ' + JSON.stringify(error)));\n });\n });\n };\n Stream.prototype.initWebRtcStats = function () {\n this.webRtcStats = new WebRtcStats_1.WebRtcStats(this);\n this.webRtcStats.initWebRtcStats();\n };\n Stream.prototype.stopWebRtcStats = function () {\n if (!!this.webRtcStats && this.webRtcStats.isEnabled()) {\n this.webRtcStats.stopWebRtcStats();\n }\n };\n Stream.prototype.isLocal = function () {\n // inbound options undefined and outbound options defined\n return (!this.inboundStreamOpts && !!this.outboundStreamOpts);\n };\n Stream.prototype.insertElementWithMode = function (element, insertMode) {\n if (!!this.targetElement) {\n switch (insertMode) {\n case VideoInsertMode_1.VideoInsertMode.AFTER:\n this.targetElement.parentNode.insertBefore(element, this.targetElement.nextSibling);\n break;\n case VideoInsertMode_1.VideoInsertMode.APPEND:\n this.targetElement.appendChild(element);\n break;\n case VideoInsertMode_1.VideoInsertMode.BEFORE:\n this.targetElement.parentNode.insertBefore(element, this.targetElement);\n break;\n case VideoInsertMode_1.VideoInsertMode.PREPEND:\n this.targetElement.insertBefore(element, this.targetElement.childNodes[0]);\n break;\n case VideoInsertMode_1.VideoInsertMode.REPLACE:\n this.targetElement.parentNode.replaceChild(element, this.targetElement);\n break;\n default:\n this.insertElementWithMode(element, VideoInsertMode_1.VideoInsertMode.APPEND);\n }\n }\n };\n Stream.prototype.mirrorVideo = function (video) {\n video.style.transform = 'rotateY(180deg)';\n video.style.webkitTransform = 'rotateY(180deg)';\n };\n return Stream;\n}());\nexports.Stream = Stream;\n//# sourceMappingURL=Stream.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Stream.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Stream.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar VideoElementEvent_1 = require(\"../OpenViduInternal/Events/VideoElementEvent\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Packs remote media streams. Participants automatically receive them when others publish their streams. Initialized with [[Session.subscribe]] method\n */\nvar Subscriber = /** @class */ (function () {\n /**\n * @hidden\n */\n function Subscriber(stream, targetElement, properties) {\n var _this = this;\n this.ee = new EventEmitter();\n this.stream = stream;\n this.properties = properties;\n if (typeof targetElement === 'string') {\n var e = document.getElementById(targetElement);\n if (!!e) {\n this.element = e;\n }\n }\n else if (targetElement instanceof HTMLElement) {\n this.element = targetElement;\n }\n this.stream.once('video-removed', function (element) {\n _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementDestroyed')]);\n });\n }\n /**\n * Subscribe or unsubscribe from the audio stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to subscribe to the audio stream, `false` to unsubscribe from it\n */\n Subscriber.prototype.subscribeToAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n console.info(\"'Subscriber' has \" + (value ? 'subscribed' : 'unsubscribed') + ' to its audio stream');\n return this;\n };\n /**\n * Subscribe or unsubscribe from the video stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to subscribe to the video stream, `false` to unsubscribe from it\n */\n Subscriber.prototype.subscribeToVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n console.info(\"'Subscriber' has \" + (value ? 'subscribed' : 'unsubscribed') + ' to its video stream');\n return this;\n };\n /**\n * See [[EventDispatcher.on]]\n */\n Subscriber.prototype.on = function (type, handler) {\n var _this = this;\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Subscriber'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Subscriber'\");\n }\n handler(event);\n });\n if (type === 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.once('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.once('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Subscriber.prototype.once = function (type, handler) {\n var _this = this;\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered once by 'Subscriber'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered once by 'Subscriber'\");\n }\n handler(event);\n });\n if (type === 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.once('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.once('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Subscriber.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n return this;\n };\n return Subscriber;\n}());\nexports.Subscriber = Subscriber;\n//# sourceMappingURL=Subscriber.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenVidu/Subscriber.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Subscriber.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorderState;\n(function (LocalRecorderState) {\n LocalRecorderState[\"READY\"] = \"READY\";\n LocalRecorderState[\"RECORDING\"] = \"RECORDING\";\n LocalRecorderState[\"PAUSED\"] = \"PAUSED\";\n LocalRecorderState[\"FINISHED\"] = \"FINISHED\";\n})(LocalRecorderState = exports.LocalRecorderState || (exports.LocalRecorderState = {}));\n//# sourceMappingURL=LocalRecorderState.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar OpenViduErrorName;\n(function (OpenViduErrorName) {\n OpenViduErrorName[\"BROWSER_NOT_SUPPORTED\"] = \"BROWSER_NOT_SUPPORTED\";\n OpenViduErrorName[\"CAMERA_ACCESS_DENIED\"] = \"CAMERA_ACCESS_DENIED\";\n OpenViduErrorName[\"MICROPHONE_ACCESS_DENIED\"] = \"MICROPHONE_ACCESS_DENIED\";\n OpenViduErrorName[\"SCREEN_CAPTURE_DENIED\"] = \"SCREEN_CAPTURE_DENIED\";\n OpenViduErrorName[\"SCREEN_SHARING_NOT_SUPPORTED\"] = \"SCREEN_SHARING_NOT_SUPPORTED\";\n OpenViduErrorName[\"SCREEN_EXTENSION_NOT_INSTALLED\"] = \"SCREEN_EXTENSION_NOT_INSTALLED\";\n OpenViduErrorName[\"SCREEN_EXTENSION_DISABLED\"] = \"SCREEN_EXTENSION_DISABLED\";\n OpenViduErrorName[\"INPUT_VIDEO_DEVICE_NOT_FOUND\"] = \"INPUT_VIDEO_DEVICE_NOT_FOUND\";\n OpenViduErrorName[\"INPUT_AUDIO_DEVICE_NOT_FOUND\"] = \"INPUT_AUDIO_DEVICE_NOT_FOUND\";\n OpenViduErrorName[\"NO_INPUT_SOURCE_SET\"] = \"NO_INPUT_SOURCE_SET\";\n OpenViduErrorName[\"PUBLISHER_PROPERTIES_ERROR\"] = \"PUBLISHER_PROPERTIES_ERROR\";\n OpenViduErrorName[\"OPENVIDU_PERMISSION_DENIED\"] = \"OPENVIDU_PERMISSION_DENIED\";\n OpenViduErrorName[\"OPENVIDU_NOT_CONNECTED\"] = \"OPENVIDU_NOT_CONNECTED\";\n OpenViduErrorName[\"GENERIC_ERROR\"] = \"GENERIC_ERROR\";\n})(OpenViduErrorName = exports.OpenViduErrorName || (exports.OpenViduErrorName = {}));\n/**\n * Simple object to identify runtime errors on the client side\n */\nvar OpenViduError = /** @class */ (function () {\n /**\n * @hidden\n */\n function OpenViduError(name, message) {\n this.name = name;\n this.message = message;\n }\n return OpenViduError;\n}());\nexports.OpenViduError = OpenViduError;\n//# sourceMappingURL=OpenViduError.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\n/**\n * How the video will be inserted in the DOM for Publishers and Subscribers. See [[PublisherProperties.insertMode]] and [[SubscriberProperties.insertMode]]\n */\nvar VideoInsertMode;\n(function (VideoInsertMode) {\n /**\n * Video inserted after the target element (as next sibling)\n */\n VideoInsertMode[\"AFTER\"] = \"AFTER\";\n /**\n * Video inserted as last child of the target element\n */\n VideoInsertMode[\"APPEND\"] = \"APPEND\";\n /**\n * Video inserted before the target element (as previous sibling)\n */\n VideoInsertMode[\"BEFORE\"] = \"BEFORE\";\n /**\n * Video inserted as first child of the target element\n */\n VideoInsertMode[\"PREPEND\"] = \"PREPEND\";\n /**\n * Video replaces target element\n */\n VideoInsertMode[\"REPLACE\"] = \"REPLACE\";\n})(VideoInsertMode = exports.VideoInsertMode || (exports.VideoInsertMode = {}));\n//# sourceMappingURL=VideoInsertMode.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `connectionCreated`: dispatched by [[Session]]\n * - `connectionDestroyed`: dispatched by [[Session]]\n */\nvar ConnectionEvent = /** @class */ (function (_super) {\n __extends(ConnectionEvent, _super);\n /**\n * @hidden\n */\n function ConnectionEvent(cancelable, target, type, connection, reason) {\n var _this = _super.call(this, cancelable, target, type) || this;\n _this.connection = connection;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n ConnectionEvent.prototype.callDefaultBehaviour = function () { };\n return ConnectionEvent;\n}(Event_1.Event));\nexports.ConnectionEvent = ConnectionEvent;\n//# sourceMappingURL=ConnectionEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Event = /** @class */ (function () {\n /**\n * @hidden\n */\n function Event(cancelable, target, type) {\n this.hasBeenPrevented = false;\n this.cancelable = cancelable;\n this.target = target;\n this.type = type;\n }\n /**\n * Whether the default beahivour of the event has been prevented or not. Call [[Event.preventDefault]] to prevent it\n */\n Event.prototype.isDefaultPrevented = function () {\n return this.hasBeenPrevented;\n };\n /**\n * Prevents the default behaviour of the event. The following events have a default behaviour:\n * - `sessionDisconnected`: automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also deletes the HTML video element associated to it.\n * - `streamDestroyed`: if dispatched by a [[Publisher]] (_you_ have unpublished), automatically stops all media tracks and deletes the HTML video element associated to the stream. If dispatched by [[Session]],\n * (_other user_ has unpublished), automatically unsubscribes the proper Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and deletes the HTML video element associated to it.\n */\n Event.prototype.preventDefault = function () {\n // tslint:disable-next-line:no-empty\n this.callDefaultBehaviour = function () { };\n this.hasBeenPrevented = true;\n };\n return Event;\n}());\nexports.Event = Event;\n//# sourceMappingURL=Event.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/Event.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `publisherStartSpeaking`: dispatched by [[Session]]\n * - `publisherStopSpeaking`: dispatched by [[Session]]\n *\n * More information:\n * - This events will only be triggered for **remote streams that have audio tracks**\n * - Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call `Session.off('publisherStopSpeaking')`,\n * keep in mind that this will also internally remove any 'publisherStartSpeaking' event\n * - You can further configure how the events are dispatched by setting property `publisherSpeakingEventsOptions` in the call of [[OpenVidu.setAdvancedConfiguration]]\n */\nvar PublisherSpeakingEvent = /** @class */ (function (_super) {\n __extends(PublisherSpeakingEvent, _super);\n /**\n * @hidden\n */\n function PublisherSpeakingEvent(target, type, connection, streamId) {\n var _this = _super.call(this, false, target, type) || this;\n _this.type = type;\n _this.connection = connection;\n _this.streamId = streamId;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n PublisherSpeakingEvent.prototype.callDefaultBehaviour = function () { };\n return PublisherSpeakingEvent;\n}(Event_1.Event));\nexports.PublisherSpeakingEvent = PublisherSpeakingEvent;\n//# sourceMappingURL=PublisherSpeakingEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `recordingStarted`: dispatched by [[Session]]\n * - `recordingStopped`: dispatched by [[Session]]\n */\nvar RecordingEvent = /** @class */ (function (_super) {\n __extends(RecordingEvent, _super);\n /**\n * @hidden\n */\n function RecordingEvent(target, type, id, name) {\n var _this = _super.call(this, false, target, type) || this;\n _this.id = id;\n if (name !== id) {\n _this.name = name;\n }\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n RecordingEvent.prototype.callDefaultBehaviour = function () { };\n return RecordingEvent;\n}(Event_1.Event));\nexports.RecordingEvent = RecordingEvent;\n//# sourceMappingURL=RecordingEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines event `sessionDisconnected` dispatched by [[Session]]\n */\nvar SessionDisconnectedEvent = /** @class */ (function (_super) {\n __extends(SessionDisconnectedEvent, _super);\n /**\n * @hidden\n */\n function SessionDisconnectedEvent(target, reason) {\n var _this = _super.call(this, true, target, 'sessionDisconnected') || this;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n SessionDisconnectedEvent.prototype.callDefaultBehaviour = function () {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Session'\");\n var session = this.target;\n // Dispose and delete all remote Connections\n for (var connectionId in session.remoteConnections) {\n if (!!session.remoteConnections[connectionId].stream) {\n session.remoteConnections[connectionId].stream.disposeWebRtcPeer();\n session.remoteConnections[connectionId].stream.disposeMediaStream();\n session.remoteConnections[connectionId].stream.removeVideo();\n delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId];\n session.remoteConnections[connectionId].dispose();\n }\n delete session.remoteConnections[connectionId];\n }\n };\n return SessionDisconnectedEvent;\n}(Event_1.Event));\nexports.SessionDisconnectedEvent = SessionDisconnectedEvent;\n//# sourceMappingURL=SessionDisconnectedEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `signal`: dispatched by [[Session]]\n * - `signal:TYPE`: dispatched by [[Session]]\n */\nvar SignalEvent = /** @class */ (function (_super) {\n __extends(SignalEvent, _super);\n /**\n * @hidden\n */\n function SignalEvent(target, type, data, from) {\n var _this = _super.call(this, false, target, type) || this;\n _this.type = type;\n _this.data = data;\n _this.from = from;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n SignalEvent.prototype.callDefaultBehaviour = function () { };\n return SignalEvent;\n}(Event_1.Event));\nexports.SignalEvent = SignalEvent;\n//# sourceMappingURL=SignalEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\nvar __1 = require(\"../..\");\n/**\n * Defines the following events:\n * - `streamCreated`: dispatched by [[Session]] and [[Publisher]]\n * - `streamDestroyed`: dispatched by [[Session]] and [[Publisher]]\n */\nvar StreamEvent = /** @class */ (function (_super) {\n __extends(StreamEvent, _super);\n /**\n * @hidden\n */\n function StreamEvent(cancelable, target, type, stream, reason) {\n var _this = _super.call(this, cancelable, target, type) || this;\n _this.stream = stream;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n StreamEvent.prototype.callDefaultBehaviour = function () {\n if (this.type === 'streamDestroyed') {\n if (this.target instanceof __1.Session) {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Session'\");\n // Remote Stream\n this.stream.disposeWebRtcPeer();\n this.stream.disposeMediaStream();\n this.stream.removeVideo();\n }\n else if (this.target instanceof __1.Publisher) {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Publisher'\");\n // Local Stream\n this.stream.disposeMediaStream();\n this.stream.removeVideo();\n this.stream.isReadyToPublish = false;\n }\n // Delete stream from Session.remoteStreamsCreated map\n delete this.stream.session.remoteStreamsCreated[this.stream.streamId];\n // Delete StreamOptionsServer from remote Connection\n var remoteConnection = this.stream.session.remoteConnections[this.stream.connection.connectionId];\n if (!!remoteConnection && !!remoteConnection.options) {\n var streamOptionsServer = remoteConnection.options.streams;\n for (var i = streamOptionsServer.length - 1; i >= 0; --i) {\n if (streamOptionsServer[i].id === this.stream.streamId) {\n streamOptionsServer.splice(i, 1);\n }\n }\n }\n }\n };\n return StreamEvent;\n}(Event_1.Event));\nexports.StreamEvent = StreamEvent;\n//# sourceMappingURL=StreamEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]]\n * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]]\n * - `videoPlaying`: dispatched by [[Publisher]] and [[Subscriber]]\n * - `remoteVideoPlaying`: dispatched by [[Publisher]] if `Publisher.subscribeToRemote()` was called before `Session.publish(Publisher)`\n */\nvar VideoElementEvent = /** @class */ (function (_super) {\n __extends(VideoElementEvent, _super);\n /**\n * @hidden\n */\n function VideoElementEvent(element, target, type) {\n var _this = _super.call(this, false, target, type) || this;\n _this.element = element;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n VideoElementEvent.prototype.callDefaultBehaviour = function () { };\n return VideoElementEvent;\n}(Event_1.Event));\nexports.VideoElementEvent = VideoElementEvent;\n//# sourceMappingURL=VideoElementEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js\n// module chunks = main","function Mapper() {\n var sources = {};\n this.forEach = function (callback) {\n for (var key in sources) {\n var source = sources[key];\n for (var key2 in source)\n callback(source[key2]);\n }\n ;\n };\n this.get = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return undefined;\n return ids[id];\n };\n this.remove = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return;\n delete ids[id];\n for (var i in ids) {\n return false;\n }\n delete sources[source];\n };\n this.set = function (value, id, source) {\n if (value == undefined)\n return this.remove(id, source);\n var ids = sources[source];\n if (ids == undefined)\n sources[source] = ids = {};\n ids[id] = value;\n };\n}\n;\nMapper.prototype.pop = function (id, source) {\n var value = this.get(id, source);\n if (value == undefined)\n return undefined;\n this.remove(id, source);\n return value;\n};\nmodule.exports = Mapper;\n//# sourceMappingURL=Mapper.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module chunks = main","var JsonRpcClient = require('./jsonrpcclient');\nexports.JsonRpcClient = JsonRpcClient;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module chunks = main","var RpcBuilder = require('../');\nvar WebSocketWithReconnection = require('./transports/webSocketWithReconnection');\nDate.now = Date.now || function () {\n return +new Date;\n};\nvar PING_INTERVAL = 5000;\nvar RECONNECTING = 'RECONNECTING';\nvar CONNECTED = 'CONNECTED';\nvar DISCONNECTED = 'DISCONNECTED';\nvar Logger = console;\nfunction JsonRpcClient(configuration) {\n var self = this;\n var wsConfig = configuration.ws;\n var notReconnectIfNumLessThan = -1;\n var pingNextNum = 0;\n var enabledPings = true;\n var pingPongStarted = false;\n var pingInterval;\n var status = DISCONNECTED;\n var onreconnecting = wsConfig.onreconnecting;\n var onreconnected = wsConfig.onreconnected;\n var onconnected = wsConfig.onconnected;\n var onerror = wsConfig.onerror;\n configuration.rpc.pull = function (params, request) {\n request.reply(null, \"push\");\n };\n wsConfig.onreconnecting = function () {\n Logger.debug(\"--------- ONRECONNECTING -----------\");\n if (status === RECONNECTING) {\n Logger.error(\"Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it\");\n return;\n }\n status = RECONNECTING;\n if (onreconnecting) {\n onreconnecting();\n }\n };\n wsConfig.onreconnected = function () {\n Logger.debug(\"--------- ONRECONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n updateNotReconnectIfLessThan();\n usePing();\n if (onreconnected) {\n onreconnected();\n }\n };\n wsConfig.onconnected = function () {\n Logger.debug(\"--------- ONCONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n usePing();\n if (onconnected) {\n onconnected();\n }\n };\n wsConfig.onerror = function (error) {\n Logger.debug(\"--------- ONERROR -----------\");\n status = DISCONNECTED;\n if (onerror) {\n onerror(error);\n }\n };\n var ws = new WebSocketWithReconnection(wsConfig);\n Logger.debug('Connecting websocket to URI: ' + wsConfig.uri);\n var rpcBuilderOptions = {\n request_timeout: configuration.rpc.requestTimeout,\n ping_request_timeout: configuration.rpc.heartbeatRequestTimeout\n };\n var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) {\n Logger.debug('Received request: ' + JSON.stringify(request));\n try {\n var func = configuration.rpc[request.method];\n if (func === undefined) {\n Logger.error(\"Method \" + request.method + \" not registered in client\");\n }\n else {\n func(request.params, request);\n }\n }\n catch (err) {\n Logger.error('Exception processing request: ' + JSON.stringify(request));\n Logger.error(err);\n }\n });\n this.send = function (method, params, callback) {\n if (method !== 'ping') {\n Logger.debug('Request: method:' + method + \" params:\" + JSON.stringify(params));\n }\n var requestTime = Date.now();\n rpc.encode(method, params, function (error, result) {\n if (error) {\n try {\n Logger.error(\"ERROR:\" + error.message + \" in Request: method:\" +\n method + \" params:\" + JSON.stringify(params) + \" request:\" +\n error.request);\n if (error.data) {\n Logger.error(\"ERROR DATA:\" + JSON.stringify(error.data));\n }\n }\n catch (e) { }\n error.requestTime = requestTime;\n }\n if (callback) {\n if (result != undefined && result.value !== 'pong') {\n Logger.debug('Response: ' + JSON.stringify(result));\n }\n callback(error, result);\n }\n });\n };\n function updateNotReconnectIfLessThan() {\n Logger.debug(\"notReconnectIfNumLessThan = \" + pingNextNum + ' (old=' +\n notReconnectIfNumLessThan + ')');\n notReconnectIfNumLessThan = pingNextNum;\n }\n function sendPing() {\n if (enabledPings) {\n var params = null;\n if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) {\n params = {\n interval: configuration.heartbeat || PING_INTERVAL\n };\n }\n pingNextNum++;\n self.send('ping', params, (function (pingNum) {\n return function (error, result) {\n if (error) {\n Logger.debug(\"Error in ping request #\" + pingNum + \" (\" +\n error.message + \")\");\n if (pingNum > notReconnectIfNumLessThan) {\n enabledPings = false;\n updateNotReconnectIfLessThan();\n Logger.debug(\"Server did not respond to ping message #\" +\n pingNum + \". Reconnecting... \");\n ws.reconnectWs();\n }\n }\n };\n })(pingNextNum));\n }\n else {\n Logger.debug(\"Trying to send ping, but ping is not enabled\");\n }\n }\n function usePing() {\n if (!pingPongStarted) {\n Logger.debug(\"Starting ping (if configured)\");\n pingPongStarted = true;\n if (configuration.heartbeat != undefined) {\n pingInterval = setInterval(sendPing, configuration.heartbeat);\n sendPing();\n }\n }\n }\n this.close = function () {\n Logger.debug(\"Closing jsonRpcClient explicitly by client\");\n if (pingInterval != undefined) {\n Logger.debug(\"Clearing ping interval\");\n clearInterval(pingInterval);\n }\n pingPongStarted = false;\n enabledPings = false;\n if (configuration.sendCloseMessage) {\n Logger.debug(\"Sending close message\");\n this.send('closeSession', null, function (error, result) {\n if (error) {\n Logger.error(\"Error sending close message: \" + JSON.stringify(error));\n }\n ws.close();\n });\n }\n else {\n ws.close();\n }\n };\n this.forceClose = function (millis) {\n ws.forceClose(millis);\n };\n this.reconnect = function () {\n ws.reconnectWs();\n };\n}\nmodule.exports = JsonRpcClient;\n//# sourceMappingURL=jsonrpcclient.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module chunks = main","var WebSocketWithReconnection = require('./webSocketWithReconnection');\nexports.WebSocketWithReconnection = WebSocketWithReconnection;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module chunks = main","\"use strict\";\nvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\nvar Logger = console;\nvar MAX_RETRIES = 2000;\nvar RETRY_TIME_MS = 3000;\nvar CONNECTING = 0;\nvar OPEN = 1;\nvar CLOSING = 2;\nvar CLOSED = 3;\nfunction WebSocketWithReconnection(config) {\n var closing = false;\n var registerMessageHandler;\n var wsUri = config.uri;\n var useSockJS = config.useSockJS;\n var reconnecting = false;\n var forcingDisconnection = false;\n var ws;\n if (useSockJS) {\n ws = new SockJS(wsUri);\n }\n else {\n ws = new WebSocket(wsUri);\n }\n ws.onopen = function () {\n logConnected(ws, wsUri);\n if (config.onconnected) {\n config.onconnected();\n }\n };\n ws.onerror = function (error) {\n Logger.error(\"Could not connect to \" + wsUri + \" (invoking onerror if defined)\", error);\n if (config.onerror) {\n config.onerror(error);\n }\n };\n function logConnected(ws, wsUri) {\n try {\n Logger.debug(\"WebSocket connected to \" + wsUri);\n }\n catch (e) {\n Logger.error(e);\n }\n }\n var reconnectionOnClose = function () {\n if (ws.readyState === CLOSED) {\n if (closing) {\n Logger.debug(\"Connection closed by user\");\n }\n else {\n Logger.debug(\"Connection closed unexpectecly. Reconnecting...\");\n reconnectToSameUri(MAX_RETRIES, 1);\n }\n }\n else {\n Logger.debug(\"Close callback from previous websocket. Ignoring it\");\n }\n };\n ws.onclose = reconnectionOnClose;\n function reconnectToSameUri(maxRetries, numRetries) {\n Logger.debug(\"reconnectToSameUri (attempt #\" + numRetries + \", max=\" + maxRetries + \")\");\n if (numRetries === 1) {\n if (reconnecting) {\n Logger.warn(\"Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.\");\n return;\n }\n else {\n reconnecting = true;\n }\n if (config.onreconnecting) {\n config.onreconnecting();\n }\n }\n if (forcingDisconnection) {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n else {\n if (config.newWsUriOnReconnection) {\n config.newWsUriOnReconnection(function (error, newWsUri) {\n if (error) {\n Logger.debug(error);\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, newWsUri);\n }\n });\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n }\n }\n function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) {\n Logger.debug(\"Reconnection attempt #\" + numRetries);\n ws.close();\n wsUri = reconnectWsUri || wsUri;\n var newWs;\n if (useSockJS) {\n newWs = new SockJS(wsUri);\n }\n else {\n newWs = new WebSocket(wsUri);\n }\n newWs.onopen = function () {\n Logger.debug(\"Reconnected after \" + numRetries + \" attempts...\");\n logConnected(newWs, wsUri);\n reconnecting = false;\n registerMessageHandler();\n if (config.onreconnected()) {\n config.onreconnected();\n }\n newWs.onclose = reconnectionOnClose;\n };\n var onErrorOrClose = function (error) {\n Logger.warn(\"Reconnection error: \", error);\n if (numRetries === maxRetries) {\n if (config.ondisconnect) {\n config.ondisconnect();\n }\n }\n else {\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n };\n newWs.onerror = onErrorOrClose;\n ws = newWs;\n }\n this.close = function () {\n closing = true;\n ws.close();\n };\n this.forceClose = function (millis) {\n Logger.debug(\"Testing: Force WebSocket close\");\n if (millis) {\n Logger.debug(\"Testing: Change wsUri for \" + millis + \" millis to simulate net failure\");\n var goodWsUri = wsUri;\n wsUri = \"wss://21.234.12.34.4:443/\";\n forcingDisconnection = true;\n setTimeout(function () {\n Logger.debug(\"Testing: Recover good wsUri \" + goodWsUri);\n wsUri = goodWsUri;\n forcingDisconnection = false;\n }, millis);\n }\n ws.close();\n };\n this.reconnectWs = function () {\n Logger.debug(\"reconnectWs\");\n reconnectToSameUri(MAX_RETRIES, 1, wsUri);\n };\n this.send = function (message) {\n ws.send(message);\n };\n this.addEventListener = function (type, callback) {\n registerMessageHandler = function () {\n ws.addEventListener(type, callback);\n };\n registerMessageHandler();\n };\n}\nmodule.exports = WebSocketWithReconnection;\n//# sourceMappingURL=webSocketWithReconnection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module chunks = main","var defineProperty_IE8 = false;\nif (Object.defineProperty) {\n try {\n Object.defineProperty({}, \"x\", {});\n }\n catch (e) {\n defineProperty_IE8 = true;\n }\n}\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis) {\n if (typeof this !== 'function') {\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () {\n return fToBind.apply(this instanceof fNOP && oThis\n ? this\n : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n fNOP.prototype = this.prototype;\n fBound.prototype = new fNOP();\n return fBound;\n };\n}\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\nvar packers = require('./packers');\nvar Mapper = require('./Mapper');\nvar BASE_TIMEOUT = 5000;\nfunction unifyResponseMethods(responseMethods) {\n if (!responseMethods)\n return {};\n for (var key in responseMethods) {\n var value = responseMethods[key];\n if (typeof value == 'string')\n responseMethods[key] =\n {\n response: value\n };\n }\n ;\n return responseMethods;\n}\n;\nfunction unifyTransport(transport) {\n if (!transport)\n return;\n if (transport instanceof Function)\n return { send: transport };\n if (transport.send instanceof Function)\n return transport;\n if (transport.postMessage instanceof Function) {\n transport.send = transport.postMessage;\n return transport;\n }\n if (transport.write instanceof Function) {\n transport.send = transport.write;\n return transport;\n }\n if (transport.onmessage !== undefined)\n return;\n if (transport.pause instanceof Function)\n return;\n throw new SyntaxError(\"Transport is not a function nor a valid object\");\n}\n;\nfunction RpcNotification(method, params) {\n if (defineProperty_IE8) {\n this.method = method;\n this.params = params;\n }\n else {\n Object.defineProperty(this, 'method', { value: method, enumerable: true });\n Object.defineProperty(this, 'params', { value: params, enumerable: true });\n }\n}\n;\nfunction RpcBuilder(packer, options, transport, onRequest) {\n var self = this;\n if (!packer)\n throw new SyntaxError('Packer is not defined');\n if (!packer.pack || !packer.unpack)\n throw new SyntaxError('Packer is invalid');\n var responseMethods = unifyResponseMethods(packer.responseMethods);\n if (options instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = options;\n transport = undefined;\n options = undefined;\n }\n ;\n if (options && options.send instanceof Function) {\n if (transport && !(transport instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n onRequest = transport;\n transport = options;\n options = undefined;\n }\n ;\n if (transport instanceof Function) {\n if (onRequest != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = transport;\n transport = undefined;\n }\n ;\n if (transport && transport.send instanceof Function)\n if (onRequest && !(onRequest instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n options = options || {};\n EventEmitter.call(this);\n if (onRequest)\n this.on('request', onRequest);\n if (defineProperty_IE8)\n this.peerID = options.peerID;\n else\n Object.defineProperty(this, 'peerID', { value: options.peerID });\n var max_retries = options.max_retries || 0;\n function transportMessage(event) {\n self.decode(event.data || event);\n }\n ;\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n if (transport) {\n if (transport.removeEventListener)\n transport.removeEventListener('message', transportMessage);\n else if (transport.removeListener)\n transport.removeListener('data', transportMessage);\n }\n ;\n if (value) {\n if (value.addEventListener)\n value.addEventListener('message', transportMessage);\n else if (value.addListener)\n value.addListener('data', transportMessage);\n }\n ;\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n this.setTransport(transport);\n var request_timeout = options.request_timeout || BASE_TIMEOUT;\n var ping_request_timeout = options.ping_request_timeout || request_timeout;\n var response_timeout = options.response_timeout || BASE_TIMEOUT;\n var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT;\n var requestID = 0;\n var requests = new Mapper();\n var responses = new Mapper();\n var processedResponses = new Mapper();\n var message2Key = {};\n function storeResponse(message, id, dest) {\n var response = {\n message: message,\n timeout: setTimeout(function () {\n responses.remove(id, dest);\n }, response_timeout)\n };\n responses.set(response, id, dest);\n }\n ;\n function storeProcessedResponse(ack, from) {\n var timeout = setTimeout(function () {\n processedResponses.remove(ack, from);\n }, duplicates_timeout);\n processedResponses.set(timeout, ack, from);\n }\n ;\n function RpcRequest(method, params, id, from, transport) {\n RpcNotification.call(this, method, params);\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n var response = responses.get(id, from);\n if (!(transport || self.getTransport())) {\n if (defineProperty_IE8)\n this.duplicated = Boolean(response);\n else\n Object.defineProperty(this, 'duplicated', {\n value: Boolean(response)\n });\n }\n var responseMethod = responseMethods[method];\n this.pack = packer.pack.bind(packer, this, id);\n this.reply = function (error, result, transport) {\n if (error instanceof Function || error && error.send instanceof Function) {\n if (result != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = error;\n result = null;\n error = undefined;\n }\n else if (result instanceof Function\n || result && result.send instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = result;\n result = null;\n }\n ;\n transport = unifyTransport(transport);\n if (response)\n clearTimeout(response.timeout);\n if (from != undefined) {\n if (error)\n error.dest = from;\n if (result)\n result.dest = from;\n }\n ;\n var message;\n if (error || result != undefined) {\n if (self.peerID != undefined) {\n if (error)\n error.from = self.peerID;\n else\n result.from = self.peerID;\n }\n if (responseMethod) {\n if (responseMethod.error == undefined && error)\n message =\n {\n error: error\n };\n else {\n var method = error\n ? responseMethod.error\n : responseMethod.response;\n message =\n {\n method: method,\n params: error || result\n };\n }\n }\n else\n message =\n {\n error: error,\n result: result\n };\n message = packer.pack(message, id);\n }\n else if (response)\n message = response.message;\n else\n message = packer.pack({ result: null }, id);\n storeResponse(message, id, from);\n transport = transport || this.getTransport() || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n }\n ;\n inherits(RpcRequest, RpcNotification);\n function cancel(message) {\n var key = message2Key[message];\n if (!key)\n return;\n delete message2Key[message];\n var request = requests.pop(key.id, key.dest);\n if (!request)\n return;\n clearTimeout(request.timeout);\n storeProcessedResponse(key.id, key.dest);\n }\n ;\n this.cancel = function (message) {\n if (message)\n return cancel(message);\n for (var message in message2Key)\n cancel(message);\n };\n this.close = function () {\n var transport = this.getTransport();\n if (transport && transport.close)\n transport.close();\n this.cancel();\n processedResponses.forEach(clearTimeout);\n responses.forEach(function (response) {\n clearTimeout(response.timeout);\n });\n };\n this.encode = function (method, params, dest, transport, callback) {\n if (params instanceof Function) {\n if (dest != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = params;\n transport = undefined;\n dest = undefined;\n params = undefined;\n }\n else if (dest instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = dest;\n transport = undefined;\n dest = undefined;\n }\n else if (transport instanceof Function) {\n if (callback != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = transport;\n transport = undefined;\n }\n ;\n if (self.peerID != undefined) {\n params = params || {};\n params.from = self.peerID;\n }\n ;\n if (dest != undefined) {\n params = params || {};\n params.dest = dest;\n }\n ;\n var message = {\n method: method,\n params: params\n };\n if (callback) {\n var id = requestID++;\n var retried = 0;\n message = packer.pack(message, id);\n function dispatchCallback(error, result) {\n self.cancel(message);\n callback(error, result);\n }\n ;\n var request = {\n message: message,\n callback: dispatchCallback,\n responseMethods: responseMethods[method] || {}\n };\n var encode_transport = unifyTransport(transport);\n function sendRequest(transport) {\n var rt = (method === 'ping' ? ping_request_timeout : request_timeout);\n request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++));\n message2Key[message] = { id: id, dest: dest };\n requests.set(request, id, dest);\n transport = transport || encode_transport || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n }\n ;\n function retry(transport) {\n transport = unifyTransport(transport);\n console.warn(retried + ' retry for request message:', message);\n var timeout = processedResponses.pop(id, dest);\n clearTimeout(timeout);\n return sendRequest(transport);\n }\n ;\n function timeout() {\n if (retried < max_retries)\n return retry(transport);\n var error = new Error('Request has timed out');\n error.request = message;\n error.retry = retry;\n dispatchCallback(error);\n }\n ;\n return sendRequest(transport);\n }\n ;\n message = packer.pack(message);\n transport = transport || this.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n this.decode = function (message, transport) {\n if (!message)\n throw new TypeError(\"Message is not defined\");\n try {\n message = packer.unpack(message);\n }\n catch (e) {\n return console.debug(e, message);\n }\n ;\n var id = message.id;\n var ack = message.ack;\n var method = message.method;\n var params = message.params || {};\n var from = params.from;\n var dest = params.dest;\n if (self.peerID != undefined && from == self.peerID)\n return;\n if (id == undefined && ack == undefined) {\n var notification = new RpcNotification(method, params);\n if (self.emit('request', notification))\n return;\n return notification;\n }\n ;\n function processRequest() {\n transport = unifyTransport(transport) || self.getTransport();\n if (transport) {\n var response = responses.get(id, from);\n if (response)\n return transport.send(response.message);\n }\n ;\n var idAck = (id != undefined) ? id : ack;\n var request = new RpcRequest(method, params, idAck, from, transport);\n if (self.emit('request', request))\n return;\n return request;\n }\n ;\n function processResponse(request, error, result) {\n request.callback(error, result);\n }\n ;\n function duplicatedResponse(timeout) {\n console.warn(\"Response already processed\", message);\n clearTimeout(timeout);\n storeProcessedResponse(ack, from);\n }\n ;\n if (method) {\n if (dest == undefined || dest == self.peerID) {\n var request = requests.get(ack, from);\n if (request) {\n var responseMethods = request.responseMethods;\n if (method == responseMethods.error)\n return processResponse(request, params);\n if (method == responseMethods.response)\n return processResponse(request, null, params);\n return processRequest();\n }\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n }\n return processRequest();\n }\n ;\n var error = message.error;\n var result = message.result;\n if (error && error.dest && error.dest != self.peerID)\n return;\n if (result && result.dest && result.dest != self.peerID)\n return;\n var request = requests.get(ack, from);\n if (!request) {\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n return console.warn(\"No callback was defined for this message\", message);\n }\n ;\n processResponse(request, error, result);\n };\n}\n;\ninherits(RpcBuilder, EventEmitter);\nRpcBuilder.RpcNotification = RpcNotification;\nmodule.exports = RpcBuilder;\nvar clients = require('./clients');\nvar transports = require('./clients/transports');\nRpcBuilder.clients = clients;\nRpcBuilder.clients.transports = transports;\nRpcBuilder.packers = packers;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js\n// module chunks = main","function pack(message, id) {\n var result = {\n jsonrpc: \"2.0\"\n };\n if (message.method) {\n result.method = message.method;\n if (message.params)\n result.params = message.params;\n if (id != undefined)\n result.id = id;\n }\n else if (id != undefined) {\n if (message.error) {\n if (message.result !== undefined)\n throw new TypeError(\"Both result and error are defined\");\n result.error = message.error;\n }\n else if (message.result !== undefined)\n result.result = message.result;\n else\n throw new TypeError(\"No result or error is defined\");\n result.id = id;\n }\n ;\n return JSON.stringify(result);\n}\n;\nfunction unpack(message) {\n var result = message;\n if (typeof message === 'string' || message instanceof String) {\n result = JSON.parse(message);\n }\n var version = result.jsonrpc;\n if (version !== '2.0')\n throw new TypeError(\"Invalid JsonRPC version '\" + version + \"': \" + message);\n if (result.method == undefined) {\n if (result.id == undefined)\n throw new TypeError(\"Invalid message: \" + message);\n var result_defined = result.result !== undefined;\n var error_defined = result.error !== undefined;\n if (result_defined && error_defined)\n throw new TypeError(\"Both result and error are defined: \" + message);\n if (!result_defined && !error_defined)\n throw new TypeError(\"No result or error is defined: \" + message);\n result.ack = result.id;\n delete result.id;\n }\n return result;\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=JsonRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module chunks = main","function pack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nfunction unpack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=XmlRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module chunks = main","var JsonRPC = require('./JsonRPC');\nvar XmlRPC = require('./XmlRPC');\nexports.JsonRPC = JsonRPC;\nexports.XmlRPC = XmlRPC;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module chunks = main","var freeice = require('freeice');\nvar inherits = require('inherits');\nvar UAParser = require('ua-parser-js');\nvar uuid = require('uuid');\nvar hark = require('hark');\nvar EventEmitter = require('events').EventEmitter;\nvar recursive = require('merge').recursive.bind(undefined, true);\nvar sdpTranslator = require('sdp-translator');\nvar logger = window.Logger || console;\nvar MEDIA_CONSTRAINTS = {\n audio: true,\n video: {\n width: 640,\n framerate: 15\n }\n};\nvar ua = (window && window.navigator) ? window.navigator.userAgent : '';\nvar parser = new UAParser(ua);\nvar browser = parser.getBrowser();\nvar usePlanB = false;\nif (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug(browser.name + \": using SDP PlanB\");\n usePlanB = true;\n}\nfunction noop(error) {\n if (error)\n logger.error(error);\n}\nfunction trackStop(track) {\n track.stop && track.stop();\n}\nfunction streamStop(stream) {\n stream.getTracks().forEach(trackStop);\n}\nvar dumpSDP = function (description) {\n if (typeof description === 'undefined' || description === null) {\n return '';\n }\n return 'type: ' + description.type + '\\r\\n' + description.sdp;\n};\nfunction bufferizeCandidates(pc, onerror) {\n var candidatesQueue = [];\n pc.addEventListener('signalingstatechange', function () {\n if (this.signalingState === 'stable') {\n while (candidatesQueue.length) {\n var entry = candidatesQueue.shift();\n pc.addIceCandidate(entry.candidate, entry.callback, entry.callback);\n }\n }\n });\n return function (candidate, callback) {\n callback = callback || onerror;\n switch (pc.signalingState) {\n case 'closed':\n callback(new Error('PeerConnection object is closed'));\n break;\n case 'stable':\n if (pc.remoteDescription) {\n pc.addIceCandidate(candidate, callback, callback);\n }\n break;\n default:\n candidatesQueue.push({\n candidate: candidate,\n callback: callback\n });\n }\n };\n}\nfunction removeFIDFromOffer(sdp) {\n var n = sdp.indexOf(\"a=ssrc-group:FID\");\n if (n > 0) {\n return sdp.slice(0, n);\n }\n else {\n return sdp;\n }\n}\nfunction getSimulcastInfo(videoStream) {\n var videoTracks = videoStream.getVideoTracks();\n if (!videoTracks.length) {\n logger.warn('No video tracks available in the video stream');\n return '';\n }\n var lines = [\n 'a=x-google-flag:conference',\n 'a=ssrc-group:SIM 1 2 3',\n 'a=ssrc:1 cname:localVideo',\n 'a=ssrc:1 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:1 mslabel:' + videoStream.id,\n 'a=ssrc:1 label:' + videoTracks[0].id,\n 'a=ssrc:2 cname:localVideo',\n 'a=ssrc:2 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:2 mslabel:' + videoStream.id,\n 'a=ssrc:2 label:' + videoTracks[0].id,\n 'a=ssrc:3 cname:localVideo',\n 'a=ssrc:3 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:3 mslabel:' + videoStream.id,\n 'a=ssrc:3 label:' + videoTracks[0].id\n ];\n lines.push('');\n return lines.join('\\n');\n}\nfunction WebRtcPeer(mode, options, callback) {\n if (!(this instanceof WebRtcPeer)) {\n return new WebRtcPeer(mode, options, callback);\n }\n WebRtcPeer.super_.call(this);\n if (options instanceof Function) {\n callback = options;\n options = undefined;\n }\n options = options || {};\n callback = (callback || noop).bind(this);\n var self = this;\n var localVideo = options.localVideo;\n var remoteVideo = options.remoteVideo;\n var videoStream = options.videoStream;\n var audioStream = options.audioStream;\n var mediaConstraints = options.mediaConstraints;\n var connectionConstraints = options.connectionConstraints;\n var pc = options.peerConnection;\n var sendSource = options.sendSource || 'webcam';\n var guid = uuid.v4();\n var configuration = recursive({\n iceServers: (!!options.iceServers && options.iceServers.length > 0) ? options.iceServers : freeice()\n }, options.configuration);\n var onicecandidate = options.onicecandidate;\n if (onicecandidate)\n this.on('icecandidate', onicecandidate);\n var oncandidategatheringdone = options.oncandidategatheringdone;\n if (oncandidategatheringdone) {\n this.on('candidategatheringdone', oncandidategatheringdone);\n }\n var simulcast = options.simulcast;\n var multistream = options.multistream;\n var interop = new sdpTranslator.Interop();\n var candidatesQueueOut = [];\n var candidategatheringdone = false;\n Object.defineProperties(this, {\n 'peerConnection': {\n get: function () {\n return pc;\n }\n },\n 'id': {\n value: options.id || guid,\n writable: false\n },\n 'remoteVideo': {\n get: function () {\n return remoteVideo;\n }\n },\n 'localVideo': {\n get: function () {\n return localVideo;\n }\n },\n 'currentFrame': {\n get: function () {\n if (!remoteVideo)\n return;\n if (remoteVideo.readyState < remoteVideo.HAVE_CURRENT_DATA)\n throw new Error('No video stream data available');\n var canvas = document.createElement('canvas');\n canvas.width = remoteVideo.videoWidth;\n canvas.height = remoteVideo.videoHeight;\n canvas.getContext('2d').drawImage(remoteVideo, 0, 0);\n return canvas;\n }\n }\n });\n if (!pc) {\n pc = new RTCPeerConnection(configuration);\n }\n pc.addEventListener('icecandidate', function (event) {\n var candidate = event.candidate;\n if (EventEmitter.listenerCount(self, 'icecandidate') ||\n EventEmitter.listenerCount(self, 'candidategatheringdone')) {\n if (candidate) {\n var cand;\n if (multistream && usePlanB) {\n cand = interop.candidateToUnifiedPlan(candidate);\n }\n else {\n cand = candidate;\n }\n self.emit('icecandidate', cand);\n candidategatheringdone = false;\n }\n else if (!candidategatheringdone) {\n self.emit('candidategatheringdone');\n candidategatheringdone = true;\n }\n }\n else if (!candidategatheringdone) {\n candidatesQueueOut.push(candidate);\n if (!candidate)\n candidategatheringdone = true;\n }\n });\n pc.onaddstream = options.onaddstream;\n pc.onnegotiationneeded = options.onnegotiationneeded;\n this.on('newListener', function (event, listener) {\n if (event === 'icecandidate' || event === 'candidategatheringdone') {\n while (candidatesQueueOut.length) {\n var candidate = candidatesQueueOut.shift();\n if (!candidate === (event === 'candidategatheringdone')) {\n listener(candidate);\n }\n }\n }\n });\n var addIceCandidate = bufferizeCandidates(pc);\n this.addIceCandidate = function (iceCandidate, callback) {\n var candidate;\n if (multistream && usePlanB) {\n candidate = interop.candidateToPlanB(iceCandidate);\n }\n else {\n candidate = new RTCIceCandidate(iceCandidate);\n }\n logger.debug('Remote ICE candidate received', iceCandidate);\n callback = (callback || noop).bind(this);\n addIceCandidate(candidate, callback);\n };\n this.generateOffer = function (callback) {\n callback = callback.bind(this);\n var offerAudio = true;\n var offerVideo = true;\n if (mediaConstraints) {\n offerAudio = (typeof mediaConstraints.audio === 'boolean') ?\n mediaConstraints.audio : true;\n offerVideo = (typeof mediaConstraints.video === 'boolean') ?\n mediaConstraints.video : true;\n }\n var browserDependantConstraints = {\n offerToReceiveAudio: (mode !== 'sendonly' && offerAudio),\n offerToReceiveVideo: (mode !== 'sendonly' && offerVideo)\n };\n var constraints = browserDependantConstraints;\n logger.debug('constraints: ' + JSON.stringify(constraints));\n pc.createOffer(constraints).then(function (offer) {\n logger.debug('Created SDP offer');\n offer = mangleSdpToAddSimulcast(offer);\n return pc.setLocalDescription(offer);\n }).then(function () {\n var localDescription = pc.localDescription;\n logger.debug('Local description set', localDescription.sdp);\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('offer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n callback(null, localDescription.sdp, self.processAnswer.bind(self));\n }).catch(callback);\n };\n this.getLocalSessionDescriptor = function () {\n return pc.localDescription;\n };\n this.getRemoteSessionDescriptor = function () {\n return pc.remoteDescription;\n };\n function setRemoteVideo() {\n if (remoteVideo) {\n remoteVideo.pause();\n var stream = pc.getRemoteStreams()[0];\n remoteVideo.srcObject = stream;\n logger.debug('Remote stream:', stream);\n remoteVideo.load();\n }\n }\n this.showLocalVideo = function () {\n localVideo.srcObject = videoStream;\n localVideo.muted = true;\n };\n this.processAnswer = function (sdpAnswer, callback) {\n callback = (callback || noop).bind(this);\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n if (multistream && usePlanB) {\n var planBAnswer = interop.toPlanB(answer);\n logger.debug('asnwer::planB', dumpSDP(planBAnswer));\n answer = planBAnswer;\n }\n logger.debug('SDP answer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(answer, function () {\n setRemoteVideo();\n callback();\n }, callback);\n };\n this.processOffer = function (sdpOffer, callback) {\n callback = callback.bind(this);\n var offer = new RTCSessionDescription({\n type: 'offer',\n sdp: sdpOffer\n });\n if (multistream && usePlanB) {\n var planBOffer = interop.toPlanB(offer);\n logger.debug('offer::planB', dumpSDP(planBOffer));\n offer = planBOffer;\n }\n logger.debug('SDP offer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(offer).then(function () {\n return setRemoteVideo();\n }).then(function () {\n return pc.createAnswer();\n }).then(function (answer) {\n answer = mangleSdpToAddSimulcast(answer);\n logger.debug('Created SDP answer');\n return pc.setLocalDescription(answer);\n }).then(function () {\n var localDescription = pc.localDescription;\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('answer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n logger.debug('Local description set', localDescription.sdp);\n callback(null, localDescription.sdp);\n }).catch(callback);\n };\n function mangleSdpToAddSimulcast(answer) {\n if (simulcast) {\n if (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug('Adding multicast info');\n answer = new RTCSessionDescription({\n 'type': answer.type,\n 'sdp': removeFIDFromOffer(answer.sdp) + getSimulcastInfo(videoStream)\n });\n }\n else {\n logger.warn('Simulcast is only available in Chrome browser.');\n }\n }\n return answer;\n }\n function start() {\n if (pc.signalingState === 'closed') {\n callback('The peer connection object is in \"closed\" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue');\n }\n if (videoStream && localVideo) {\n self.showLocalVideo();\n }\n if (videoStream) {\n pc.addStream(videoStream);\n }\n if (audioStream) {\n pc.addStream(audioStream);\n }\n var browser = parser.getBrowser();\n if (mode === 'sendonly' &&\n (browser.name === 'Chrome' || browser.name === 'Chromium') &&\n browser.major === 39) {\n mode = 'sendrecv';\n }\n callback();\n }\n if (mode !== 'recvonly' && !videoStream && !audioStream) {\n function getMedia(constraints) {\n if (constraints === undefined) {\n constraints = MEDIA_CONSTRAINTS;\n }\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n videoStream = stream;\n start();\n }).catch(callback);\n }\n if (sendSource === 'webcam') {\n getMedia(mediaConstraints);\n }\n else {\n getScreenConstraints(sendSource, function (error, constraints_) {\n if (error)\n return callback(error);\n constraints = [mediaConstraints];\n constraints.unshift(constraints_);\n getMedia(recursive.apply(undefined, constraints));\n }, guid);\n }\n }\n else {\n setTimeout(start, 0);\n }\n this.on('_dispose', function () {\n if (localVideo) {\n localVideo.pause();\n localVideo.srcObject = null;\n localVideo.load();\n localVideo.muted = false;\n }\n if (remoteVideo) {\n remoteVideo.pause();\n remoteVideo.srcObject = null;\n remoteVideo.load();\n }\n self.removeAllListeners();\n if (window.cancelChooseDesktopMedia !== undefined) {\n window.cancelChooseDesktopMedia(guid);\n }\n });\n}\ninherits(WebRtcPeer, EventEmitter);\nfunction createEnableDescriptor(type) {\n var method = 'get' + type + 'Tracks';\n return {\n enumerable: true,\n get: function () {\n if (!this.peerConnection)\n return;\n var streams = this.peerConnection.getLocalStreams();\n if (!streams.length)\n return;\n for (var i = 0, stream; stream = streams[i]; i++) {\n var tracks = stream[method]();\n for (var j = 0, track; track = tracks[j]; j++)\n if (!track.enabled)\n return false;\n }\n return true;\n },\n set: function (value) {\n function trackSetEnable(track) {\n track.enabled = value;\n }\n this.peerConnection.getLocalStreams().forEach(function (stream) {\n stream[method]().forEach(trackSetEnable);\n });\n }\n };\n}\nObject.defineProperties(WebRtcPeer.prototype, {\n 'enabled': {\n enumerable: true,\n get: function () {\n return this.audioEnabled && this.videoEnabled;\n },\n set: function (value) {\n this.audioEnabled = this.videoEnabled = value;\n }\n },\n 'audioEnabled': createEnableDescriptor('Audio'),\n 'videoEnabled': createEnableDescriptor('Video')\n});\nWebRtcPeer.prototype.getLocalStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getLocalStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.getRemoteStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getRemoteStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.dispose = function () {\n logger.debug('Disposing WebRtcPeer');\n var pc = this.peerConnection;\n try {\n if (pc) {\n if (pc.signalingState === 'closed')\n return;\n pc.getLocalStreams().forEach(streamStop);\n pc.close();\n }\n }\n catch (err) {\n logger.warn('Exception disposing webrtc peer ' + err);\n }\n this.emit('_dispose');\n};\nfunction WebRtcPeerRecvonly(options, callback) {\n if (!(this instanceof WebRtcPeerRecvonly)) {\n return new WebRtcPeerRecvonly(options, callback);\n }\n WebRtcPeerRecvonly.super_.call(this, 'recvonly', options, callback);\n}\ninherits(WebRtcPeerRecvonly, WebRtcPeer);\nfunction WebRtcPeerSendonly(options, callback) {\n if (!(this instanceof WebRtcPeerSendonly)) {\n return new WebRtcPeerSendonly(options, callback);\n }\n WebRtcPeerSendonly.super_.call(this, 'sendonly', options, callback);\n}\ninherits(WebRtcPeerSendonly, WebRtcPeer);\nfunction WebRtcPeerSendrecv(options, callback) {\n if (!(this instanceof WebRtcPeerSendrecv)) {\n return new WebRtcPeerSendrecv(options, callback);\n }\n WebRtcPeerSendrecv.super_.call(this, 'sendrecv', options, callback);\n}\ninherits(WebRtcPeerSendrecv, WebRtcPeer);\nfunction harkUtils(stream, options) {\n return hark(stream, options);\n}\nexports.bufferizeCandidates = bufferizeCandidates;\nexports.WebRtcPeerRecvonly = WebRtcPeerRecvonly;\nexports.WebRtcPeerSendonly = WebRtcPeerSendonly;\nexports.WebRtcPeerSendrecv = WebRtcPeerSendrecv;\nexports.hark = harkUtils;\n//# sourceMappingURL=WebRtcPeer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module chunks = main","var WebRtcPeer = require('./WebRtcPeer');\nexports.WebRtcPeer = WebRtcPeer;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js\n// module chunks = main","window.getScreenId = function (callback) {\n if (!!navigator.mozGetUserMedia) {\n callback(null, 'firefox', {\n video: {\n mozMediaSource: 'window',\n mediaSource: 'window'\n }\n });\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeMediaSourceId) {\n if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {\n callback('permission-denied');\n }\n else {\n callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));\n }\n window.removeEventListener('message', onIFrameCallback);\n }\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));\n window.removeEventListener('message', onIFrameCallback);\n }\n }\n setTimeout(postGetSourceIdMessage, 100);\n};\nfunction getScreenConstraints(error, sourceId) {\n var screen_constraints = {\n audio: false,\n video: {\n mandatory: {\n chromeMediaSource: error ? 'screen' : 'desktop',\n maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,\n maxHeight: window.screen.height > 1080 ? window.screen.height : 1080\n },\n optional: []\n }\n };\n if (sourceId) {\n screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;\n }\n return screen_constraints;\n}\nvar iframe;\nfunction postGetSourceIdMessage() {\n if (!iframe) {\n loadIFrame(postGetSourceIdMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetSourceIdMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n captureSourceId: true\n }, '*');\n}\nfunction loadIFrame(loadCallback) {\n if (iframe) {\n loadCallback();\n return;\n }\n iframe = document.createElement('iframe');\n iframe.onload = function () {\n iframe.isLoaded = true;\n loadCallback();\n };\n iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';\n iframe.style.display = 'none';\n (document.body || document.documentElement).appendChild(iframe);\n}\nwindow.getChromeExtensionStatus = function (callback) {\n if (!!navigator.mozGetUserMedia) {\n callback('installed-enabled');\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus);\n }\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n};\nfunction postGetChromeExtensionStatusMessage() {\n if (!iframe) {\n loadIFrame(postGetChromeExtensionStatusMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n getChromeExtensionStatus: true\n }, '*');\n}\nexports.getScreenId = getScreenId;\n//# sourceMappingURL=Screen-Capturing-Auto.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js\n// module chunks = main","var chromeMediaSource = 'screen';\nvar screenCallback;\nvar isFirefox = typeof window.InstallTrigger !== 'undefined';\nvar isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;\nvar isChrome = !!window.chrome && !isOpera;\nwindow.addEventListener('message', function (event) {\n if (event.origin != window.location.origin) {\n return;\n }\n onMessageCallback(event.data);\n});\nfunction onMessageCallback(data) {\n if (data == 'PermissionDeniedError') {\n chromeMediaSource = 'PermissionDeniedError';\n if (screenCallback)\n return screenCallback('PermissionDeniedError');\n else\n throw new Error('PermissionDeniedError');\n }\n if (data == 'rtcmulticonnection-extension-loaded') {\n chromeMediaSource = 'desktop';\n }\n if (data.sourceId && screenCallback) {\n screenCallback(sourceId = data.sourceId);\n }\n}\nfunction isChromeExtensionAvailable(callback) {\n if (isFirefox)\n return callback(false);\n if (chromeMediaSource == 'desktop')\n return callback('isFirefox');\n window.postMessage('are-you-there', '*');\n setTimeout(function () {\n if (chromeMediaSource == 'screen') {\n callback('unavailable');\n }\n else\n callback('available');\n }, 2000);\n}\nfunction getSourceId(callback) {\n if (!callback)\n throw '\"callback\" parameter is mandatory.';\n if (sourceId)\n return callback(sourceId);\n screenCallback = callback;\n window.postMessage('get-sourceId', '*');\n}\nfunction getChromeExtensionStatus(extensionid, callback) {\n if (isFirefox)\n return callback('not-chrome');\n if (arguments.length != 2) {\n callback = extensionid;\n extensionid = 'ajhifddimkapgcifgcodmmfdlknahffk';\n }\n var image = document.createElement('img');\n image.src = 'chrome-extension://' + extensionid + '/icon.png';\n image.onload = function () {\n chromeMediaSource = 'screen';\n window.postMessage('are-you-there', '*');\n setTimeout(function () {\n if (chromeMediaSource == 'screen') {\n callback(extensionid == extensionid ? 'installed-enabled' : 'installed-disabled');\n }\n else\n callback('installed-enabled');\n }, 2000);\n };\n image.onerror = function () {\n callback('not-installed');\n };\n}\nfunction getScreenConstraints(callback) {\n sourceId = '';\n var firefoxScreenConstraints = {\n mozMediaSource: 'window',\n mediaSource: 'window'\n };\n if (isFirefox)\n return callback(null, firefoxScreenConstraints);\n var screen_constraints = {\n mandatory: {\n chromeMediaSource: chromeMediaSource,\n maxWidth: screen.width > 1920 ? screen.width : 1920,\n maxHeight: screen.height > 1080 ? screen.height : 1080\n },\n optional: []\n };\n if (chromeMediaSource == 'desktop' && !sourceId) {\n getSourceId(function () {\n screen_constraints.mandatory.chromeMediaSourceId = sourceId;\n callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);\n });\n return;\n }\n if (chromeMediaSource == 'desktop') {\n screen_constraints.mandatory.chromeMediaSourceId = sourceId;\n }\n callback(null, screen_constraints);\n}\nexports.getScreenConstraints = getScreenConstraints;\nexports.isChromeExtensionAvailable = isChromeExtensionAvailable;\nexports.getChromeExtensionStatus = getChromeExtensionStatus;\nexports.getSourceId = getSourceId;\n//# sourceMappingURL=Screen-Capturing.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar VideoInsertMode_1 = require(\"./Enums/VideoInsertMode\");\nfunction solveIfCallback(methodName, completionHandler, promise) {\n if (!!completionHandler) {\n console.warn(\"DEPRECATION WANING: In future releases the 'completionHandler' parameter will be removed from method '\" + methodName + \"'. Refactor your callbacks to Promise API (see http://openvidu.io/api/openvidu-browser/index.html)\");\n }\n return new Promise(function (resolve, reject) {\n if (!!completionHandler && typeof completionHandler === 'function') {\n promise.then(function () {\n completionHandler(undefined);\n })[\"catch\"](function (error) {\n completionHandler(error);\n });\n }\n else {\n promise.then(function () {\n return resolve();\n })[\"catch\"](function (error) {\n return reject(error);\n });\n }\n });\n}\nexports.solveIfCallback = solveIfCallback;\nfunction adaptPublisherProperties(properties) {\n if ('audio' in properties ||\n 'video' in properties ||\n 'audioActive' in properties ||\n 'videoActive' in properties ||\n 'quality' in properties ||\n 'screen' in properties) {\n console.warn(\"DEPRECATION WANING: In future releases the properties passed to 'OpenVidu.initPublisher' method must match PublisherProperties interface (see http://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)\");\n }\n var scr = (typeof properties.screen !== 'undefined' && properties.screen === true);\n var res = '';\n if (typeof properties.quality === 'string') {\n switch (properties.quality) {\n case 'LOW':\n res = '320x240';\n break;\n case 'MEDIUM':\n res = '640x480';\n break;\n case 'HIGH':\n res = '1280x720';\n break;\n }\n }\n var publisherProperties = {\n audioSource: (typeof properties.audio !== 'undefined' && properties.audio === false) ? false : ((typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined),\n frameRate: (typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined,\n insertMode: (typeof properties.insertMode !== 'undefined') ? properties.insertMode : VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true,\n publishAudio: (typeof properties.audioActive !== 'undefined' && properties.audioActive === false) ? false : (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true,\n publishVideo: (typeof properties.videoActive !== 'undefined' && properties.videoActive === false) ? false : (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true,\n resolution: !!res ? res : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'),\n videoSource: scr ? 'screen' : ((typeof properties.video !== 'undefined' && properties.video === false) ? false : ((typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined))\n };\n return publisherProperties;\n}\nexports.adaptPublisherProperties = adaptPublisherProperties;\n//# sourceMappingURL=VersionAdapter.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/VersionAdapter.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/VersionAdapter.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar platform = require(\"platform\");\nvar WebRtcStats = /** @class */ (function () {\n function WebRtcStats(stream) {\n this.stream = stream;\n this.webRtcStatsEnabled = false;\n this.statsInterval = 1;\n this.stats = {\n inbound: {\n audio: {\n bytesReceived: 0,\n packetsReceived: 0,\n packetsLost: 0\n },\n video: {\n bytesReceived: 0,\n packetsReceived: 0,\n packetsLost: 0,\n framesDecoded: 0,\n nackCount: 0\n }\n },\n outbound: {\n audio: {\n bytesSent: 0,\n packetsSent: 0\n },\n video: {\n bytesSent: 0,\n packetsSent: 0,\n framesEncoded: 0,\n nackCount: 0\n }\n }\n };\n }\n WebRtcStats.prototype.isEnabled = function () {\n return this.webRtcStatsEnabled;\n };\n WebRtcStats.prototype.initWebRtcStats = function () {\n var _this = this;\n var elastestInstrumentation = localStorage.getItem('elastest-instrumentation');\n if (elastestInstrumentation) {\n // ElasTest instrumentation object found in local storage\n console.warn('WebRtc stats enabled for stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);\n this.webRtcStatsEnabled = true;\n var instrumentation_1 = JSON.parse(elastestInstrumentation);\n this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds\n console.warn('localStorage item: ' + JSON.stringify(instrumentation_1));\n this.webRtcStatsIntervalId = setInterval(function () {\n _this.sendStatsToHttpEndpoint(instrumentation_1);\n }, this.statsInterval * 1000);\n return;\n }\n console.debug('WebRtc stats not enabled');\n };\n WebRtcStats.prototype.stopWebRtcStats = function () {\n if (this.webRtcStatsEnabled) {\n clearInterval(this.webRtcStatsIntervalId);\n console.warn('WebRtc stats stopped for disposed stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);\n }\n };\n WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) {\n var _this = this;\n var sendPost = function (json) {\n var http = new XMLHttpRequest();\n var url = instrumentation.webrtc.httpEndpoint;\n http.open('POST', url, true);\n http.setRequestHeader('Content-type', 'application/json');\n http.onreadystatechange = function () {\n if (http.readyState === 4 && http.status === 200) {\n console.log('WebRtc stats successfully sent to ' + url + ' for stream ' + _this.stream.streamId + ' of connection ' + _this.stream.connection.connectionId);\n }\n };\n http.send(json);\n };\n var f = function (stats) {\n if (platform.name.indexOf('Firefox') !== -1) {\n stats.forEach(function (stat) {\n var json = {};\n if ((stat.type === 'inbound-rtp') &&\n (\n // Avoid firefox empty outbound-rtp statistics\n stat.nackCount !== null &&\n stat.isRemote === false &&\n stat.id.startsWith('inbound') &&\n stat.remoteId.startsWith('inbound'))) {\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var jit = stat.jitter * 1000;\n var metrics = {\n bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n jitter: jit,\n packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n bytesReceived: 'bytes',\n jitter: 'ms',\n packetsReceived: 'packets',\n packetsLost: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = 'frames';\n units['nackCount'] = 'packets';\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.nackCount;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ((stat.type === 'outbound-rtp') &&\n (\n // Avoid firefox empty inbound-rtp statistics\n stat.isRemote === false &&\n stat.id.toLowerCase().includes('outbound'))) {\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n bytesSent: 'bytes',\n packetsSent: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = 'frames';\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n });\n }\n else if (platform.name.indexOf('Chrome') !== -1) {\n for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) {\n var key = _a[_i];\n var stat = stats[key];\n if (stat.type === 'ssrc') {\n var json = {};\n if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) ||\n (stat.mediaType === 'video' && 'qpSum' in stat))) {\n // inbound-rtp\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n jitter: stat.googJitterBufferMs,\n packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n bytesReceived: 'bytes',\n jitter: 'ms',\n packetsReceived: 'packets',\n packetsLost: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = 'frames';\n units['nackCount'] = 'packets';\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.googNacksSent;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ('bytesSent' in stat) {\n // outbound-rtp\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n bytesSent: 'bytes',\n packetsSent: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = 'frames';\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n }\n }\n }\n };\n this.getStatsAgnostic(this.stream.getRTCPeerConnection(), f, function (error) { console.log(error); });\n };\n WebRtcStats.prototype.standardizeReport = function (response) {\n if (platform.name.indexOf('Firefox') !== -1) {\n return response;\n }\n var standardReport = {};\n response.result().forEach(function (report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: report.type\n };\n report.names().forEach(function (name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n return standardReport;\n };\n WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) {\n var _this = this;\n if (platform.name.indexOf('Firefox') !== -1) {\n // getStats takes args in different order in Chrome and Firefox\n return pc.getStats(null, function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, failureCb);\n }\n else if (platform.name.indexOf('Chrome') !== -1) {\n // In Chrome, the first two arguments are reversed\n return pc.getStats(function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, null, failureCb);\n }\n };\n return WebRtcStats;\n}());\nexports.WebRtcStats = WebRtcStats;\n//# sourceMappingURL=WebRtcStats.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenVidu_1 = require(\"./OpenVidu/OpenVidu\");\nexports.OpenVidu = OpenVidu_1.OpenVidu;\nvar Session_1 = require(\"./OpenVidu/Session\");\nexports.Session = Session_1.Session;\nvar Publisher_1 = require(\"./OpenVidu/Publisher\");\nexports.Publisher = Publisher_1.Publisher;\nvar Subscriber_1 = require(\"./OpenVidu/Subscriber\");\nexports.Subscriber = Subscriber_1.Subscriber;\nvar Stream_1 = require(\"./OpenVidu/Stream\");\nexports.Stream = Stream_1.Stream;\nvar Connection_1 = require(\"./OpenVidu/Connection\");\nexports.Connection = Connection_1.Connection;\nvar LocalRecorder_1 = require(\"./OpenVidu/LocalRecorder\");\nexports.LocalRecorder = LocalRecorder_1.LocalRecorder;\nvar LocalRecorderState_1 = require(\"./OpenViduInternal/Enums/LocalRecorderState\");\nexports.LocalRecorderState = LocalRecorderState_1.LocalRecorderState;\nvar OpenViduError_1 = require(\"./OpenViduInternal/Enums/OpenViduError\");\nexports.OpenViduError = OpenViduError_1.OpenViduError;\nvar VideoInsertMode_1 = require(\"./OpenViduInternal/Enums/VideoInsertMode\");\nexports.VideoInsertMode = VideoInsertMode_1.VideoInsertMode;\nvar Event_1 = require(\"./OpenViduInternal/Events/Event\");\nexports.Event = Event_1.Event;\nvar ConnectionEvent_1 = require(\"./OpenViduInternal/Events/ConnectionEvent\");\nexports.ConnectionEvent = ConnectionEvent_1.ConnectionEvent;\nvar PublisherSpeakingEvent_1 = require(\"./OpenViduInternal/Events/PublisherSpeakingEvent\");\nexports.PublisherSpeakingEvent = PublisherSpeakingEvent_1.PublisherSpeakingEvent;\nvar RecordingEvent_1 = require(\"./OpenViduInternal/Events/RecordingEvent\");\nexports.RecordingEvent = RecordingEvent_1.RecordingEvent;\nvar SessionDisconnectedEvent_1 = require(\"./OpenViduInternal/Events/SessionDisconnectedEvent\");\nexports.SessionDisconnectedEvent = SessionDisconnectedEvent_1.SessionDisconnectedEvent;\nvar SignalEvent_1 = require(\"./OpenViduInternal/Events/SignalEvent\");\nexports.SignalEvent = SignalEvent_1.SignalEvent;\nvar StreamEvent_1 = require(\"./OpenViduInternal/Events/StreamEvent\");\nexports.StreamEvent = StreamEvent_1.StreamEvent;\nvar VideoElementEvent_1 = require(\"./OpenViduInternal/Events/VideoElementEvent\");\nexports.VideoElementEvent = VideoElementEvent_1.VideoElementEvent;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/lib/index.js\n// module id = ../../../../openvidu-browser/lib/index.js\n// module chunks = main","/* jshint node: true */\n'use strict';\n\nvar normalice = require('normalice');\n\n/**\n # freeice\n\n The `freeice` module is a simple way of getting random STUN or TURN server\n for your WebRTC application. The list of servers (just STUN at this stage)\n were sourced from this [gist](https://gist.github.com/zziuni/3741933).\n\n ## Example Use\n\n The following demonstrates how you can use `freeice` with\n [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect):\n\n <<< examples/quickconnect.js\n\n As the `freeice` module generates ice servers in a list compliant with the\n WebRTC spec you will be able to use it with raw `RTCPeerConnection`\n constructors and other WebRTC libraries.\n\n ## Hey, don't use my STUN/TURN server!\n\n If for some reason your free STUN or TURN server ends up in the\n list of servers ([stun](https://github.com/DamonOehlman/freeice/blob/master/stun.json) or\n [turn](https://github.com/DamonOehlman/freeice/blob/master/turn.json))\n that is used in this module, you can feel\n free to open an issue on this repository and those servers will be removed\n within 24 hours (or sooner). This is the quickest and probably the most\n polite way to have something removed (and provides us some visibility\n if someone opens a pull request requesting that a server is added).\n\n ## Please add my server!\n\n If you have a server that you wish to add to the list, that's awesome! I'm\n sure I speak on behalf of a whole pile of WebRTC developers who say thanks.\n To get it into the list, feel free to either open a pull request or if you\n find that process a bit daunting then just create an issue requesting\n the addition of the server (make sure you provide all the details, and if\n you have a Terms of Service then including that in the PR/issue would be\n awesome).\n\n ## I know of a free server, can I add it?\n\n Sure, if you do your homework and make sure it is ok to use (I'm currently\n in the process of reviewing the terms of those STUN servers included from\n the original list). If it's ok to go, then please see the previous entry\n for how to add it.\n\n ## Current List of Servers\n\n * current as at the time of last `README.md` file generation\n\n ### STUN\n\n <<< stun.json\n\n ### TURN\n\n <<< turn.json\n\n**/\n\nvar freeice = module.exports = function(opts) {\n // if a list of servers has been provided, then use it instead of defaults\n var servers = {\n stun: (opts || {}).stun || require('./stun.json'),\n turn: (opts || {}).turn || require('./turn.json')\n };\n\n var stunCount = (opts || {}).stunCount || 2;\n var turnCount = (opts || {}).turnCount || 0;\n var selected;\n\n function getServers(type, count) {\n var out = [];\n var input = [].concat(servers[type]);\n var idx;\n\n while (input.length && out.length < count) {\n idx = (Math.random() * input.length) | 0;\n out = out.concat(input.splice(idx, 1));\n }\n\n return out.map(function(url) {\n //If it's a not a string, don't try to \"normalice\" it otherwise using type:url will screw it up\n if ((typeof url !== 'string') && (! (url instanceof String))) {\n return url;\n } else {\n return normalice(type + ':' + url);\n }\n });\n }\n\n // add stun servers\n selected = [].concat(getServers('stun', stunCount));\n\n if (turnCount) {\n selected = selected.concat(getServers('turn', turnCount));\n }\n\n return selected;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/index.js\n// module id = ../../../../openvidu-browser/node_modules/freeice/index.js\n// module chunks = main","module.exports = [\"stun.l.google.com:19302\",\"stun1.l.google.com:19302\",\"stun2.l.google.com:19302\",\"stun3.l.google.com:19302\",\"stun4.l.google.com:19302\",\"stun.ekiga.net\",\"stun.ideasip.com\",\"stun.schlund.de\",\"stun.stunprotocol.org:3478\",\"stun.voiparound.com\",\"stun.voipbuster.com\",\"stun.voipstunt.com\",\"stun.voxgratia.org\",\"stun.services.mozilla.com\"]\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/stun.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/stun.json\n// module chunks = main","module.exports = []\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/freeice/turn.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/turn.json\n// module chunks = main","var WildEmitter = require('wildemitter');\n\nfunction getMaxVolume (analyser, fftBins) {\n var maxVolume = -Infinity;\n analyser.getFloatFrequencyData(fftBins);\n\n for(var i=4, ii=fftBins.length; i < ii; i++) {\n if (fftBins[i] > maxVolume && fftBins[i] < 0) {\n maxVolume = fftBins[i];\n }\n };\n\n return maxVolume;\n}\n\n\nvar audioContextType;\nif (typeof window !== 'undefined') {\n audioContextType = window.AudioContext || window.webkitAudioContext;\n}\n// use a single audio context due to hardware limits\nvar audioContext = null;\nmodule.exports = function(stream, options) {\n var harker = new WildEmitter();\n\n\n // make it not break in non-supported browsers\n if (!audioContextType) return harker;\n\n //Config\n var options = options || {},\n smoothing = (options.smoothing || 0.1),\n interval = (options.interval || 50),\n threshold = options.threshold,\n play = options.play,\n history = options.history || 10,\n running = true;\n\n //Setup Audio Context\n if (!audioContext) {\n audioContext = new audioContextType();\n }\n var sourceNode, fftBins, analyser;\n\n analyser = audioContext.createAnalyser();\n analyser.fftSize = 512;\n analyser.smoothingTimeConstant = smoothing;\n fftBins = new Float32Array(analyser.frequencyBinCount);\n\n if (stream.jquery) stream = stream[0];\n if (stream instanceof HTMLAudioElement || stream instanceof HTMLVideoElement) {\n //Audio Tag\n sourceNode = audioContext.createMediaElementSource(stream);\n if (typeof play === 'undefined') play = true;\n threshold = threshold || -50;\n } else {\n //WebRTC Stream\n sourceNode = audioContext.createMediaStreamSource(stream);\n threshold = threshold || -50;\n }\n\n sourceNode.connect(analyser);\n if (play) analyser.connect(audioContext.destination);\n\n harker.speaking = false;\n\n harker.suspend = function() {\n audioContext.suspend();\n }\n harker.resume = function() {\n audioContext.resume();\n }\n Object.defineProperty(harker, 'state', { get: function() {\n return audioContext.state;\n }});\n audioContext.onstatechange = function() {\n harker.emit('state_change', audioContext.state);\n }\n\n harker.setThreshold = function(t) {\n threshold = t;\n };\n\n harker.setInterval = function(i) {\n interval = i;\n };\n\n harker.stop = function() {\n running = false;\n harker.emit('volume_change', -100, threshold);\n if (harker.speaking) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n analyser.disconnect();\n sourceNode.disconnect();\n };\n harker.speakingHistory = [];\n for (var i = 0; i < history; i++) {\n harker.speakingHistory.push(0);\n }\n\n // Poll the analyser node to determine if speaking\n // and emit events if changed\n var looper = function() {\n setTimeout(function() {\n\n //check if stop has been called\n if(!running) {\n return;\n }\n\n var currentVolume = getMaxVolume(analyser, fftBins);\n\n harker.emit('volume_change', currentVolume, threshold);\n\n var history = 0;\n if (currentVolume > threshold && !harker.speaking) {\n // trigger quickly, short history\n for (var i = harker.speakingHistory.length - 3; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history >= 2) {\n harker.speaking = true;\n harker.emit('speaking');\n }\n } else if (currentVolume < threshold && harker.speaking) {\n for (var i = 0; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history == 0) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n }\n harker.speakingHistory.shift();\n harker.speakingHistory.push(0 + (currentVolume > threshold));\n\n looper();\n }, interval);\n };\n looper();\n\n\n return harker;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/hark/hark.js\n// module id = ../../../../openvidu-browser/node_modules/hark/hark.js\n// module chunks = main","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/inherits/inherits_browser.js\n// module id = ../../../../openvidu-browser/node_modules/inherits/inherits_browser.js\n// module chunks = main","/*!\r\n * @name JavaScript/NodeJS Merge v1.2.0\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\r\n\r\n;(function(isNode) {\r\n\r\n\t/**\r\n\t * Merge one or more objects \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tvar Public = function(clone) {\r\n\r\n\t\treturn merge(clone === true, false, arguments);\r\n\r\n\t}, publicName = 'merge';\r\n\r\n\t/**\r\n\t * Merge two or more objects recursively \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tPublic.recursive = function(clone) {\r\n\r\n\t\treturn merge(clone === true, true, arguments);\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Clone the input removing any reference\r\n\t * @param mixed input\r\n\t * @return mixed\r\n\t */\r\n\r\n\tPublic.clone = function(input) {\r\n\r\n\t\tvar output = input,\r\n\t\t\ttype = typeOf(input),\r\n\t\t\tindex, size;\r\n\r\n\t\tif (type === 'array') {\r\n\r\n\t\t\toutput = [];\r\n\t\t\tsize = input.length;\r\n\r\n\t\t\tfor (index=0;index 1) {\n url = parts[1];\n parts = parts[0].split(':');\n\n // add the output credential and username\n output.username = parts[0];\n output.credential = (input || {}).credential || parts[1] || '';\n }\n\n output.url = protocol + url;\n output.urls = [ output.url ];\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/normalice/index.js\n// module id = ../../../../openvidu-browser/node_modules/normalice/index.js\n// module chunks = main","/*!\n * Platform.js \n * Copyright 2014-2018 Benjamin Tan \n * Copyright 2011-2013 John-David Dalton \n * Available under MIT license \n */\n;(function() {\n 'use strict';\n\n /** Used to determine if values are of the language type `Object`. */\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n /** Used as a reference to the global object. */\n var root = (objectTypes[typeof window] && window) || this;\n\n /** Backup possible global object. */\n var oldRoot = root;\n\n /** Detect free variable `exports`. */\n var freeExports = objectTypes[typeof exports] && exports;\n\n /** Detect free variable `module`. */\n var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;\n\n /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */\n var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n }\n\n /**\n * Used as the maximum length of an array-like object.\n * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)\n * for more details.\n */\n var maxSafeInteger = Math.pow(2, 53) - 1;\n\n /** Regular expression to detect Opera. */\n var reOpera = /\\bOpera/;\n\n /** Possible global object. */\n var thisBinding = this;\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check for own properties of an object. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to resolve the internal `[[Class]]` of values. */\n var toString = objectProto.toString;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Capitalizes a string value.\n *\n * @private\n * @param {string} string The string to capitalize.\n * @returns {string} The capitalized string.\n */\n function capitalize(string) {\n string = String(string);\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n /**\n * A utility function to clean up the OS name.\n *\n * @private\n * @param {string} os The OS name to clean up.\n * @param {string} [pattern] A `RegExp` pattern matching the OS name.\n * @param {string} [label] A label for the OS.\n */\n function cleanupOS(os, pattern, label) {\n // Platform tokens are defined at:\n // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n var data = {\n '10.0': '10',\n '6.4': '10 Technical Preview',\n '6.3': '8.1',\n '6.2': '8',\n '6.1': 'Server 2008 R2 / 7',\n '6.0': 'Server 2008 / Vista',\n '5.2': 'Server 2003 / XP 64-bit',\n '5.1': 'XP',\n '5.01': '2000 SP1',\n '5.0': '2000',\n '4.0': 'NT',\n '4.90': 'ME'\n };\n // Detect Windows version from platform tokens.\n if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) &&\n (data = data[/[\\d.]+$/.exec(os)])) {\n os = 'Windows ' + data;\n }\n // Correct character case and cleanup string.\n os = String(os);\n\n if (pattern && label) {\n os = os.replace(RegExp(pattern, 'i'), label);\n }\n\n os = format(\n os.replace(/ ce$/i, ' CE')\n .replace(/\\bhpw/i, 'web')\n .replace(/\\bMacintosh\\b/, 'Mac OS')\n .replace(/_PowerPC\\b/i, ' OS')\n .replace(/\\b(OS X) [^ \\d]+/i, '$1')\n .replace(/\\bMac (OS X)\\b/, '$1')\n .replace(/\\/(\\d)/, ' $1')\n .replace(/_/g, '.')\n .replace(/(?: BePC|[ .]*fc[ \\d.]+)$/i, '')\n .replace(/\\bx86\\.64\\b/gi, 'x86_64')\n .replace(/\\b(Windows Phone) OS\\b/, '$1')\n .replace(/\\b(Chrome OS \\w+) [\\d.]+\\b/, '$1')\n .split(' on ')[0]\n );\n\n return os;\n }\n\n /**\n * An iteration utility for arrays and objects.\n *\n * @private\n * @param {Array|Object} object The object to iterate over.\n * @param {Function} callback The function called per iteration.\n */\n function each(object, callback) {\n var index = -1,\n length = object ? object.length : 0;\n\n if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {\n while (++index < length) {\n callback(object[index], index, object);\n }\n } else {\n forOwn(object, callback);\n }\n }\n\n /**\n * Trim and conditionally capitalize string values.\n *\n * @private\n * @param {string} string The string to format.\n * @returns {string} The formatted string.\n */\n function format(string) {\n string = trim(string);\n return /^(?:webOS|i(?:OS|P))/.test(string)\n ? string\n : capitalize(string);\n }\n\n /**\n * Iterates over an object's own properties, executing the `callback` for each.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} callback The function executed per own property.\n */\n function forOwn(object, callback) {\n for (var key in object) {\n if (hasOwnProperty.call(object, key)) {\n callback(object[key], key, object);\n }\n }\n }\n\n /**\n * Gets the internal `[[Class]]` of a value.\n *\n * @private\n * @param {*} value The value.\n * @returns {string} The `[[Class]]`.\n */\n function getClassOf(value) {\n return value == null\n ? capitalize(value)\n : toString.call(value).slice(8, -1);\n }\n\n /**\n * Host objects can return type values that are different from their actual\n * data type. The objects we are concerned with usually return non-primitive\n * types of \"object\", \"function\", or \"unknown\".\n *\n * @private\n * @param {*} object The owner of the property.\n * @param {string} property The property to check.\n * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.\n */\n function isHostType(object, property) {\n var type = object != null ? typeof object[property] : 'number';\n return !/^(?:boolean|number|string|undefined)$/.test(type) &&\n (type == 'object' ? !!object[property] : true);\n }\n\n /**\n * Prepares a string for use in a `RegExp` by making hyphens and spaces optional.\n *\n * @private\n * @param {string} string The string to qualify.\n * @returns {string} The qualified string.\n */\n function qualify(string) {\n return String(string).replace(/([ -])(?!$)/g, '$1?');\n }\n\n /**\n * A bare-bones `Array#reduce` like utility function.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function called per iteration.\n * @returns {*} The accumulated result.\n */\n function reduce(array, callback) {\n var accumulator = null;\n each(array, function(value, index) {\n accumulator = callback(accumulator, value, index, array);\n });\n return accumulator;\n }\n\n /**\n * Removes leading and trailing whitespace from a string.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} The trimmed string.\n */\n function trim(string) {\n return String(string).replace(/^ +| +$/g, '');\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Creates a new platform object.\n *\n * @memberOf platform\n * @param {Object|string} [ua=navigator.userAgent] The user agent string or\n * context object.\n * @returns {Object} A platform object.\n */\n function parse(ua) {\n\n /** The environment context object. */\n var context = root;\n\n /** Used to flag when a custom context is provided. */\n var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String';\n\n // Juggle arguments.\n if (isCustomContext) {\n context = ua;\n ua = null;\n }\n\n /** Browser navigator object. */\n var nav = context.navigator || {};\n\n /** Browser user agent string. */\n var userAgent = nav.userAgent || '';\n\n ua || (ua = userAgent);\n\n /** Used to flag when `thisBinding` is the [ModuleScope]. */\n var isModuleScope = isCustomContext || thisBinding == oldRoot;\n\n /** Used to detect if browser is like Chrome. */\n var likeChrome = isCustomContext\n ? !!nav.likeChrome\n : /\\bChrome\\b/.test(ua) && !/internal|\\n/i.test(toString.toString());\n\n /** Internal `[[Class]]` value shortcuts. */\n var objectClass = 'Object',\n airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject',\n enviroClass = isCustomContext ? objectClass : 'Environment',\n javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java),\n phantomClass = isCustomContext ? objectClass : 'RuntimeObject';\n\n /** Detect Java environments. */\n var java = /\\bJava/.test(javaClass) && context.java;\n\n /** Detect Rhino. */\n var rhino = java && getClassOf(context.environment) == enviroClass;\n\n /** A character to represent alpha. */\n var alpha = java ? 'a' : '\\u03b1';\n\n /** A character to represent beta. */\n var beta = java ? 'b' : '\\u03b2';\n\n /** Browser document object. */\n var doc = context.document || {};\n\n /**\n * Detect Opera browser (Presto-based).\n * http://www.howtocreate.co.uk/operaStuff/operaObject.html\n * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini\n */\n var opera = context.operamini || context.opera;\n\n /** Opera `[[Class]]`. */\n var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera))\n ? operaClass\n : (opera = null);\n\n /*------------------------------------------------------------------------*/\n\n /** Temporary variable used over the script's lifetime. */\n var data;\n\n /** The CPU architecture. */\n var arch = ua;\n\n /** Platform description array. */\n var description = [];\n\n /** Platform alpha/beta indicator. */\n var prerelease = null;\n\n /** A flag to indicate that environment features should be used to resolve the platform. */\n var useFeatures = ua == userAgent;\n\n /** The browser/environment version. */\n var version = useFeatures && opera && typeof opera.version == 'function' && opera.version();\n\n /** A flag to indicate if the OS ends with \"/ Version\" */\n var isSpecialCasedOS;\n\n /* Detectable layout engines (order is important). */\n var layout = getLayout([\n { 'label': 'EdgeHTML', 'pattern': 'Edge' },\n 'Trident',\n { 'label': 'WebKit', 'pattern': 'AppleWebKit' },\n 'iCab',\n 'Presto',\n 'NetFront',\n 'Tasman',\n 'KHTML',\n 'Gecko'\n ]);\n\n /* Detectable browser names (order is important). */\n var name = getName([\n 'Adobe AIR',\n 'Arora',\n 'Avant Browser',\n 'Breach',\n 'Camino',\n 'Electron',\n 'Epiphany',\n 'Fennec',\n 'Flock',\n 'Galeon',\n 'GreenBrowser',\n 'iCab',\n 'Iceweasel',\n 'K-Meleon',\n 'Konqueror',\n 'Lunascape',\n 'Maxthon',\n { 'label': 'Microsoft Edge', 'pattern': 'Edge' },\n 'Midori',\n 'Nook Browser',\n 'PaleMoon',\n 'PhantomJS',\n 'Raven',\n 'Rekonq',\n 'RockMelt',\n { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' },\n 'SeaMonkey',\n { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n 'Sleipnir',\n 'SlimBrowser',\n { 'label': 'SRWare Iron', 'pattern': 'Iron' },\n 'Sunrise',\n 'Swiftfox',\n 'Waterfox',\n 'WebPositive',\n 'Opera Mini',\n { 'label': 'Opera Mini', 'pattern': 'OPiOS' },\n 'Opera',\n { 'label': 'Opera', 'pattern': 'OPR' },\n 'Chrome',\n { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },\n { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },\n { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },\n { 'label': 'IE', 'pattern': 'IEMobile' },\n { 'label': 'IE', 'pattern': 'MSIE' },\n 'Safari'\n ]);\n\n /* Detectable products (order is important). */\n var product = getProduct([\n { 'label': 'BlackBerry', 'pattern': 'BB10' },\n 'BlackBerry',\n { 'label': 'Galaxy S', 'pattern': 'GT-I9000' },\n { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' },\n { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' },\n { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' },\n { 'label': 'Galaxy S5', 'pattern': 'SM-G900' },\n { 'label': 'Galaxy S6', 'pattern': 'SM-G920' },\n { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' },\n { 'label': 'Galaxy S7', 'pattern': 'SM-G930' },\n { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' },\n 'Google TV',\n 'Lumia',\n 'iPad',\n 'iPod',\n 'iPhone',\n 'Kindle',\n { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n 'Nexus',\n 'Nook',\n 'PlayBook',\n 'PlayStation Vita',\n 'PlayStation',\n 'TouchPad',\n 'Transformer',\n { 'label': 'Wii U', 'pattern': 'WiiU' },\n 'Wii',\n 'Xbox One',\n { 'label': 'Xbox 360', 'pattern': 'Xbox' },\n 'Xoom'\n ]);\n\n /* Detectable manufacturers. */\n var manufacturer = getManufacturer({\n 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },\n 'Archos': {},\n 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },\n 'Asus': { 'Transformer': 1 },\n 'Barnes & Noble': { 'Nook': 1 },\n 'BlackBerry': { 'PlayBook': 1 },\n 'Google': { 'Google TV': 1, 'Nexus': 1 },\n 'HP': { 'TouchPad': 1 },\n 'HTC': {},\n 'LG': {},\n 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },\n 'Motorola': { 'Xoom': 1 },\n 'Nintendo': { 'Wii U': 1, 'Wii': 1 },\n 'Nokia': { 'Lumia': 1 },\n 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },\n 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }\n });\n\n /* Detectable operating systems (order is important). */\n var os = getOS([\n 'Windows Phone',\n 'Android',\n 'CentOS',\n { 'label': 'Chrome OS', 'pattern': 'CrOS' },\n 'Debian',\n 'Fedora',\n 'FreeBSD',\n 'Gentoo',\n 'Haiku',\n 'Kubuntu',\n 'Linux Mint',\n 'OpenBSD',\n 'Red Hat',\n 'SuSE',\n 'Ubuntu',\n 'Xubuntu',\n 'Cygwin',\n 'Symbian OS',\n 'hpwOS',\n 'webOS ',\n 'webOS',\n 'Tablet OS',\n 'Tizen',\n 'Linux',\n 'Mac OS X',\n 'Macintosh',\n 'Mac',\n 'Windows 98;',\n 'Windows '\n ]);\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Picks the layout engine from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected layout engine.\n */\n function getLayout(guesses) {\n return reduce(guesses, function(result, guess) {\n return result || RegExp('\\\\b' + (\n guess.pattern || qualify(guess)\n ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n });\n }\n\n /**\n * Picks the manufacturer from an array of guesses.\n *\n * @private\n * @param {Array} guesses An object of guesses.\n * @returns {null|string} The detected manufacturer.\n */\n function getManufacturer(guesses) {\n return reduce(guesses, function(result, value, key) {\n // Lookup the manufacturer by product or scan the UA for the manufacturer.\n return result || (\n value[product] ||\n value[/^[a-z]+(?: +[a-z]+\\b)*/i.exec(product)] ||\n RegExp('\\\\b' + qualify(key) + '(?:\\\\b|\\\\w*\\\\d)', 'i').exec(ua)\n ) && key;\n });\n }\n\n /**\n * Picks the browser name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected browser name.\n */\n function getName(guesses) {\n return reduce(guesses, function(result, guess) {\n return result || RegExp('\\\\b' + (\n guess.pattern || qualify(guess)\n ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n });\n }\n\n /**\n * Picks the OS name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected OS name.\n */\n function getOS(guesses) {\n return reduce(guesses, function(result, guess) {\n var pattern = guess.pattern || qualify(guess);\n if (!result && (result =\n RegExp('\\\\b' + pattern + '(?:/[\\\\d.]+|[ \\\\w.]*)', 'i').exec(ua)\n )) {\n result = cleanupOS(result, pattern, guess.label || guess);\n }\n return result;\n });\n }\n\n /**\n * Picks the product name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected product name.\n */\n function getProduct(guesses) {\n return reduce(guesses, function(result, guess) {\n var pattern = guess.pattern || qualify(guess);\n if (!result && (result =\n RegExp('\\\\b' + pattern + ' *\\\\d+[.\\\\w_]*', 'i').exec(ua) ||\n RegExp('\\\\b' + pattern + ' *\\\\w+-[\\\\w]*', 'i').exec(ua) ||\n RegExp('\\\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\\\d+|[^ ();-]*)', 'i').exec(ua)\n )) {\n // Split by forward slash and append product version if needed.\n if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\\d.]+/.test(result[0])) {\n result[0] += ' ' + result[1];\n }\n // Correct character case and cleanup string.\n guess = guess.label || guess;\n result = format(result[0]\n .replace(RegExp(pattern, 'i'), guess)\n .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ')\n .replace(RegExp('(' + guess + ')[-_.]?(\\\\w)', 'i'), '$1 $2'));\n }\n return result;\n });\n }\n\n /**\n * Resolves the version using an array of UA patterns.\n *\n * @private\n * @param {Array} patterns An array of UA patterns.\n * @returns {null|string} The detected version.\n */\n function getVersion(patterns) {\n return reduce(patterns, function(result, pattern) {\n return result || (RegExp(pattern +\n '(?:-[\\\\d.]+/|(?: for [\\\\w-]+)?[ /-])([\\\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;\n });\n }\n\n /**\n * Returns `platform.description` when the platform object is coerced to a string.\n *\n * @name toString\n * @memberOf platform\n * @returns {string} Returns `platform.description` if available, else an empty string.\n */\n function toStringPlatform() {\n return this.description || '';\n }\n\n /*------------------------------------------------------------------------*/\n\n // Convert layout to an array so we can add extra details.\n layout && (layout = [layout]);\n\n // Detect product names that contain their manufacturer's name.\n if (manufacturer && !product) {\n product = getProduct([manufacturer]);\n }\n // Clean up Google TV.\n if ((data = /\\bGoogle TV\\b/.exec(product))) {\n product = data[0];\n }\n // Detect simulators.\n if (/\\bSimulator\\b/i.test(ua)) {\n product = (product ? product + ' ' : '') + 'Simulator';\n }\n // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS.\n if (name == 'Opera Mini' && /\\bOPiOS\\b/.test(ua)) {\n description.push('running in Turbo/Uncompressed mode');\n }\n // Detect IE Mobile 11.\n if (name == 'IE' && /\\blike iPhone OS\\b/.test(ua)) {\n data = parse(ua.replace(/like iPhone OS/, ''));\n manufacturer = data.manufacturer;\n product = data.product;\n }\n // Detect iOS.\n else if (/^iP/.test(product)) {\n name || (name = 'Safari');\n os = 'iOS' + ((data = / OS ([\\d_]+)/i.exec(ua))\n ? ' ' + data[1].replace(/_/g, '.')\n : '');\n }\n // Detect Kubuntu.\n else if (name == 'Konqueror' && !/buntu/i.test(os)) {\n os = 'Kubuntu';\n }\n // Detect Android browsers.\n else if ((manufacturer && manufacturer != 'Google' &&\n ((/Chrome/.test(name) && !/\\bMobile Safari\\b/i.test(ua)) || /\\bVita\\b/.test(product))) ||\n (/\\bAndroid\\b/.test(os) && /^Chrome/.test(name) && /\\bVersion\\//i.test(ua))) {\n name = 'Android Browser';\n os = /\\bAndroid\\b/.test(os) ? os : 'Android';\n }\n // Detect Silk desktop/accelerated modes.\n else if (name == 'Silk') {\n if (!/\\bMobi/i.test(ua)) {\n os = 'Android';\n description.unshift('desktop mode');\n }\n if (/Accelerated *= *true/i.test(ua)) {\n description.unshift('accelerated');\n }\n }\n // Detect PaleMoon identifying as Firefox.\n else if (name == 'PaleMoon' && (data = /\\bFirefox\\/([\\d.]+)\\b/.exec(ua))) {\n description.push('identifying as Firefox ' + data[1]);\n }\n // Detect Firefox OS and products running Firefox.\n else if (name == 'Firefox' && (data = /\\b(Mobile|Tablet|TV)\\b/i.exec(ua))) {\n os || (os = 'Firefox OS');\n product || (product = data[1]);\n }\n // Detect false positives for Firefox/Safari.\n else if (!name || (data = !/\\bMinefield\\b/i.test(ua) && /\\b(?:Firefox|Safari)\\b/.exec(name))) {\n // Escape the `/` for Firefox 1.\n if (name && !product && /[\\/,]|^[^(]+?\\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) {\n // Clear name of false positives.\n name = null;\n }\n // Reassign a generic name.\n if ((data = product || manufacturer || os) &&\n (product || manufacturer || /\\b(?:Android|Symbian OS|Tablet OS|webOS)\\b/.test(os))) {\n name = /[a-z]+(?: Hat)?/i.exec(/\\bAndroid\\b/.test(os) ? os : data) + ' Browser';\n }\n }\n // Add Chrome version to description for Electron.\n else if (name == 'Electron' && (data = (/\\bChrome\\/([\\d.]+)\\b/.exec(ua) || 0)[1])) {\n description.push('Chromium ' + data);\n }\n // Detect non-Opera (Presto-based) versions (order is important).\n if (!version) {\n version = getVersion([\n '(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\\\d.]+$))',\n 'Version',\n qualify(name),\n '(?:Firefox|Minefield|NetFront)'\n ]);\n }\n // Detect stubborn layout engines.\n if ((data =\n layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' ||\n /\\bOpera\\b/.test(name) && (/\\bOPR\\b/.test(ua) ? 'Blink' : 'Presto') ||\n /\\b(?:Midori|Nook|Safari)\\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' ||\n !layout && /\\bMSIE\\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') ||\n layout == 'WebKit' && /\\bPlayStation\\b(?! Vita\\b)/i.test(name) && 'NetFront'\n )) {\n layout = [data];\n }\n // Detect Windows Phone 7 desktop mode.\n if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(ua) || 0)[1])) {\n name += ' Mobile';\n os = 'Windows Phone ' + (/\\+$/.test(data) ? data : data + '.x');\n description.unshift('desktop mode');\n }\n // Detect Windows Phone 8.x desktop mode.\n else if (/\\bWPDesktop\\b/i.test(ua)) {\n name = 'IE Mobile';\n os = 'Windows Phone 8.x';\n description.unshift('desktop mode');\n version || (version = (/\\brv:([\\d.]+)/.exec(ua) || 0)[1]);\n }\n // Detect IE 11 identifying as other browsers.\n else if (name != 'IE' && layout == 'Trident' && (data = /\\brv:([\\d.]+)/.exec(ua))) {\n if (name) {\n description.push('identifying as ' + name + (version ? ' ' + version : ''));\n }\n name = 'IE';\n version = data[1];\n }\n // Leverage environment features.\n if (useFeatures) {\n // Detect server-side environments.\n // Rhino has a global function while others have a global object.\n if (isHostType(context, 'global')) {\n if (java) {\n data = java.lang.System;\n arch = data.getProperty('os.arch');\n os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version');\n }\n if (rhino) {\n try {\n version = context.require('ringo/engine').version.join('.');\n name = 'RingoJS';\n } catch(e) {\n if ((data = context.system) && data.global.system == context.system) {\n name = 'Narwhal';\n os || (os = data[0].os || null);\n }\n }\n if (!name) {\n name = 'Rhino';\n }\n }\n else if (\n typeof context.process == 'object' && !context.process.browser &&\n (data = context.process)\n ) {\n if (typeof data.versions == 'object') {\n if (typeof data.versions.electron == 'string') {\n description.push('Node ' + data.versions.node);\n name = 'Electron';\n version = data.versions.electron;\n } else if (typeof data.versions.nw == 'string') {\n description.push('Chromium ' + version, 'Node ' + data.versions.node);\n name = 'NW.js';\n version = data.versions.nw;\n }\n }\n if (!name) {\n name = 'Node.js';\n arch = data.arch;\n os = data.platform;\n version = /[\\d.]+/.exec(data.version);\n version = version ? version[0] : null;\n }\n }\n }\n // Detect Adobe AIR.\n else if (getClassOf((data = context.runtime)) == airRuntimeClass) {\n name = 'Adobe AIR';\n os = data.flash.system.Capabilities.os;\n }\n // Detect PhantomJS.\n else if (getClassOf((data = context.phantom)) == phantomClass) {\n name = 'PhantomJS';\n version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch);\n }\n // Detect IE compatibility modes.\n else if (typeof doc.documentMode == 'number' && (data = /\\bTrident\\/(\\d+)/i.exec(ua))) {\n // We're in compatibility mode when the Trident version + 4 doesn't\n // equal the document mode.\n version = [version, doc.documentMode];\n if ((data = +data[1] + 4) != version[1]) {\n description.push('IE ' + version[1] + ' mode');\n layout && (layout[1] = '');\n version[1] = data;\n }\n version = name == 'IE' ? String(version[1].toFixed(1)) : version[0];\n }\n // Detect IE 11 masking as other browsers.\n else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\\b/.test(name)) {\n description.push('masking as ' + name + ' ' + version);\n name = 'IE';\n version = '11.0';\n layout = ['Trident'];\n os = 'Windows';\n }\n os = os && format(os);\n }\n // Detect prerelease phases.\n if (version && (data =\n /(?:[ab]|dp|pre|[ab]\\d+pre)(?:\\d+\\+?)?$/i.exec(version) ||\n /(?:alpha|beta)(?: ?\\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) ||\n /\\bMinefield\\b/i.test(ua) && 'a'\n )) {\n prerelease = /b/i.test(data) ? 'beta' : 'alpha';\n version = version.replace(RegExp(data + '\\\\+?$'), '') +\n (prerelease == 'beta' ? beta : alpha) + (/\\d+\\+?/.exec(data) || '');\n }\n // Detect Firefox Mobile.\n if (name == 'Fennec' || name == 'Firefox' && /\\b(?:Android|Firefox OS)\\b/.test(os)) {\n name = 'Firefox Mobile';\n }\n // Obscure Maxthon's unreliable version.\n else if (name == 'Maxthon' && version) {\n version = version.replace(/\\.[\\d.]+/, '.x');\n }\n // Detect Xbox 360 and Xbox One.\n else if (/\\bXbox\\b/i.test(product)) {\n if (product == 'Xbox 360') {\n os = null;\n }\n if (product == 'Xbox 360' && /\\bIEMobile\\b/.test(ua)) {\n description.unshift('mobile mode');\n }\n }\n // Add mobile postfix.\n else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) &&\n (os == 'Windows CE' || /Mobi/i.test(ua))) {\n name += ' Mobile';\n }\n // Detect IE platform preview.\n else if (name == 'IE' && useFeatures) {\n try {\n if (context.external === null) {\n description.unshift('platform preview');\n }\n } catch(e) {\n description.unshift('embedded');\n }\n }\n // Detect BlackBerry OS version.\n // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp\n else if ((/\\bBlackBerry\\b/.test(product) || /\\bBB10\\b/.test(ua)) && (data =\n (RegExp(product.replace(/ +/g, ' *') + '/([.\\\\d]+)', 'i').exec(ua) || 0)[1] ||\n version\n )) {\n data = [data, /BB10/.test(ua)];\n os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0];\n version = null;\n }\n // Detect Opera identifying/masking itself as another browser.\n // http://www.opera.com/support/kb/view/843/\n else if (this != forOwn && product != 'Wii' && (\n (useFeatures && opera) ||\n (/Opera/.test(name) && /\\b(?:MSIE|Firefox)\\b/i.test(ua)) ||\n (name == 'Firefox' && /\\bOS X (?:\\d+\\.){2,}/.test(os)) ||\n (name == 'IE' && (\n (os && !/^Win/.test(os) && version > 5.5) ||\n /\\bWindows XP\\b/.test(os) && version > 8 ||\n version == 8 && !/\\bTrident\\b/.test(ua)\n ))\n ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) {\n // When \"identifying\", the UA contains both Opera and the other browser's name.\n data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');\n if (reOpera.test(name)) {\n if (/\\bIE\\b/.test(data) && os == 'Mac OS') {\n os = null;\n }\n data = 'identify' + data;\n }\n // When \"masking\", the UA contains only the other browser's name.\n else {\n data = 'mask' + data;\n if (operaClass) {\n name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2'));\n } else {\n name = 'Opera';\n }\n if (/\\bIE\\b/.test(data)) {\n os = null;\n }\n if (!useFeatures) {\n version = null;\n }\n }\n layout = ['Presto'];\n description.push(data);\n }\n // Detect WebKit Nightly and approximate Chrome/Safari versions.\n if ((data = (/\\bAppleWebKit\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n // Correct build number for numeric comparison.\n // (e.g. \"532.5\" becomes \"532.05\")\n data = [parseFloat(data.replace(/\\.(\\d)$/, '.0$1')), data];\n // Nightly builds are postfixed with a \"+\".\n if (name == 'Safari' && data[1].slice(-1) == '+') {\n name = 'WebKit Nightly';\n prerelease = 'alpha';\n version = data[1].slice(0, -1);\n }\n // Clear incorrect browser versions.\n else if (version == data[1] ||\n version == (data[2] = (/\\bSafari\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n version = null;\n }\n // Use the full Chrome version when available.\n data[1] = (/\\bChrome\\/([\\d.]+)/i.exec(ua) || 0)[1];\n // Detect Blink layout engine.\n if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {\n layout = ['Blink'];\n }\n // Detect JavaScriptCore.\n // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi\n if (!useFeatures || (!likeChrome && !data[1])) {\n layout && (layout[1] = 'like Safari');\n data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8');\n } else {\n layout && (layout[1] = 'like Chrome');\n data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');\n }\n // Add the postfix of \".x\" or \"+\" for approximate versions.\n layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+'));\n // Obscure version for some Safari 1-2 releases.\n if (name == 'Safari' && (!version || parseInt(version) > 45)) {\n version = data;\n }\n }\n // Detect Opera desktop modes.\n if (name == 'Opera' && (data = /\\bzbov|zvav$/.exec(os))) {\n name += ' ';\n description.unshift('desktop mode');\n if (data == 'zvav') {\n name += 'Mini';\n version = null;\n } else {\n name += 'Mobile';\n }\n os = os.replace(RegExp(' *' + data + '$'), '');\n }\n // Detect Chrome desktop mode.\n else if (name == 'Safari' && /\\bChrome\\b/.exec(layout && layout[1])) {\n description.unshift('desktop mode');\n name = 'Chrome Mobile';\n version = null;\n\n if (/\\bOS X\\b/.test(os)) {\n manufacturer = 'Apple';\n os = 'iOS 4.3+';\n } else {\n os = null;\n }\n }\n // Strip incorrect OS versions.\n if (version && version.indexOf((data = /[\\d.]+$/.exec(os))) == 0 &&\n ua.indexOf('/' + data + '-') > -1) {\n os = trim(os.replace(data, ''));\n }\n // Add layout engine.\n if (layout && !/\\b(?:Avant|Nook)\\b/.test(name) && (\n /Browser|Lunascape|Maxthon/.test(name) ||\n name != 'Safari' && /^iOS/.test(os) && /\\bSafari\\b/.test(layout[1]) ||\n /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name) && layout[1])) {\n // Don't add layout details to description if they are falsey.\n (data = layout[layout.length - 1]) && description.push(data);\n }\n // Combine contextual information.\n if (description.length) {\n description = ['(' + description.join('; ') + ')'];\n }\n // Append manufacturer to description.\n if (manufacturer && product && product.indexOf(manufacturer) < 0) {\n description.push('on ' + manufacturer);\n }\n // Append product to description.\n if (product) {\n description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product);\n }\n // Parse the OS into an object.\n if (os) {\n data = / ([\\d.+]+)$/.exec(os);\n isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/';\n os = {\n 'architecture': 32,\n 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os,\n 'version': data ? data[1] : null,\n 'toString': function() {\n var version = this.version;\n return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');\n }\n };\n }\n // Add browser/OS architecture.\n if ((data = /\\b(?:AMD|IA|Win|WOW|x86_|x)64\\b/i.exec(arch)) && !/\\bi686\\b/i.test(arch)) {\n if (os) {\n os.architecture = 64;\n os.family = os.family.replace(RegExp(' *' + data), '');\n }\n if (\n name && (/\\bWOW64\\b/i.test(ua) ||\n (useFeatures && /\\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\\bWin64; x64\\b/i.test(ua)))\n ) {\n description.unshift('32-bit');\n }\n }\n // Chrome 39 and above on OS X is always 64-bit.\n else if (\n os && /^OS X/.test(os.family) &&\n name == 'Chrome' && parseFloat(version) >= 39\n ) {\n os.architecture = 64;\n }\n\n ua || (ua = null);\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The platform object.\n *\n * @name platform\n * @type Object\n */\n var platform = {};\n\n /**\n * The platform description.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.description = ua;\n\n /**\n * The name of the browser's layout engine.\n *\n * The list of common layout engines include:\n * \"Blink\", \"EdgeHTML\", \"Gecko\", \"Trident\" and \"WebKit\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.layout = layout && layout[0];\n\n /**\n * The name of the product's manufacturer.\n *\n * The list of manufacturers include:\n * \"Apple\", \"Archos\", \"Amazon\", \"Asus\", \"Barnes & Noble\", \"BlackBerry\",\n * \"Google\", \"HP\", \"HTC\", \"LG\", \"Microsoft\", \"Motorola\", \"Nintendo\",\n * \"Nokia\", \"Samsung\" and \"Sony\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.manufacturer = manufacturer;\n\n /**\n * The name of the browser/environment.\n *\n * The list of common browser names include:\n * \"Chrome\", \"Electron\", \"Firefox\", \"Firefox for iOS\", \"IE\",\n * \"Microsoft Edge\", \"PhantomJS\", \"Safari\", \"SeaMonkey\", \"Silk\",\n * \"Opera Mini\" and \"Opera\"\n *\n * Mobile versions of some browsers have \"Mobile\" appended to their name:\n * eg. \"Chrome Mobile\", \"Firefox Mobile\", \"IE Mobile\" and \"Opera Mobile\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.name = name;\n\n /**\n * The alpha/beta release indicator.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.prerelease = prerelease;\n\n /**\n * The name of the product hosting the browser.\n *\n * The list of common products include:\n *\n * \"BlackBerry\", \"Galaxy S4\", \"Lumia\", \"iPad\", \"iPod\", \"iPhone\", \"Kindle\",\n * \"Kindle Fire\", \"Nexus\", \"Nook\", \"PlayBook\", \"TouchPad\" and \"Transformer\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.product = product;\n\n /**\n * The browser's user agent string.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.ua = ua;\n\n /**\n * The browser/environment version.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.version = name && version;\n\n /**\n * The name of the operating system.\n *\n * @memberOf platform\n * @type Object\n */\n platform.os = os || {\n\n /**\n * The CPU architecture the OS is built for.\n *\n * @memberOf platform.os\n * @type number|null\n */\n 'architecture': null,\n\n /**\n * The family of the OS.\n *\n * Common values include:\n * \"Windows\", \"Windows Server 2008 R2 / 7\", \"Windows Server 2008 / Vista\",\n * \"Windows XP\", \"OS X\", \"Ubuntu\", \"Debian\", \"Fedora\", \"Red Hat\", \"SuSE\",\n * \"Android\", \"iOS\" and \"Windows Phone\"\n *\n * @memberOf platform.os\n * @type string|null\n */\n 'family': null,\n\n /**\n * The version of the OS.\n *\n * @memberOf platform.os\n * @type string|null\n */\n 'version': null,\n\n /**\n * Returns the OS string.\n *\n * @memberOf platform.os\n * @returns {string} The OS string.\n */\n 'toString': function() { return 'null'; }\n };\n\n platform.parse = parse;\n platform.toString = toStringPlatform;\n\n if (platform.version) {\n description.unshift(version);\n }\n if (platform.name) {\n description.unshift(name);\n }\n if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) {\n description.push(product ? '(' + os + ')' : 'on ' + os);\n }\n if (description.length) {\n platform.description = description.join(' ');\n }\n return platform;\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Export platform.\n var platform = parse();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Expose platform on the global object to prevent errors when platform is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n root.platform = platform;\n\n // Define as an anonymous module so platform can be aliased through path mapping.\n define(function() {\n return platform;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n else if (freeExports && freeModule) {\n // Export for CommonJS support.\n forOwn(platform, function(value, key) {\n freeExports[key] = value;\n });\n }\n else {\n // Export to the global object.\n root.platform = platform;\n }\n}.call(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/platform/platform.js\n// module id = ../../../../openvidu-browser/node_modules/platform/platform.js\n// module chunks = main","var grammar = module.exports = {\n v: [{\n name: 'version',\n reg: /^(\\d*)$/\n }],\n o: [{ //o=- 20518 0 IN IP4 203.0.113.1\n // NB: sessionId will be a String in most cases because it is huge\n name: 'origin',\n reg: /^(\\S*) (\\d*) (\\d*) (\\S*) IP(\\d) (\\S*)/,\n names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],\n format: \"%s %s %d %s IP%d %s\"\n }],\n // default parsing of these only (though some of these feel outdated)\n s: [{ name: 'name' }],\n i: [{ name: 'description' }],\n u: [{ name: 'uri' }],\n e: [{ name: 'email' }],\n p: [{ name: 'phone' }],\n z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly..\n r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly\n //k: [{}], // outdated thing ignored\n t: [{ //t=0 0\n name: 'timing',\n reg: /^(\\d*) (\\d*)/,\n names: ['start', 'stop'],\n format: \"%d %d\"\n }],\n c: [{ //c=IN IP4 10.47.197.26\n name: 'connection',\n reg: /^IN IP(\\d) (\\S*)/,\n names: ['version', 'ip'],\n format: \"IN IP%d %s\"\n }],\n b: [{ //b=AS:4000\n push: 'bandwidth',\n reg: /^(TIAS|AS|CT|RR|RS):(\\d*)/,\n names: ['type', 'limit'],\n format: \"%s:%s\"\n }],\n m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31\n // NB: special - pushes to session\n // TODO: rtp/fmtp should be filtered by the payloads found here?\n reg: /^(\\w*) (\\d*) ([\\w\\/]*)(?: (.*))?/,\n names: ['type', 'port', 'protocol', 'payloads'],\n format: \"%s %d %s %s\"\n }],\n a: [\n { //a=rtpmap:110 opus/48000/2\n push: 'rtp',\n reg: /^rtpmap:(\\d*) ([\\w\\-]*)(?:\\s*\\/(\\d*)(?:\\s*\\/(\\S*))?)?/,\n names: ['payload', 'codec', 'rate', 'encoding'],\n format: function (o) {\n return (o.encoding) ?\n \"rtpmap:%d %s/%s/%s\":\n o.rate ?\n \"rtpmap:%d %s/%s\":\n \"rtpmap:%d %s\";\n }\n },\n {\n //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000\n //a=fmtp:111 minptime=10; useinbandfec=1\n push: 'fmtp',\n reg: /^fmtp:(\\d*) ([\\S| ]*)/,\n names: ['payload', 'config'],\n format: \"fmtp:%d %s\"\n },\n { //a=control:streamid=0\n name: 'control',\n reg: /^control:(.*)/,\n format: \"control:%s\"\n },\n { //a=rtcp:65179 IN IP4 193.84.77.194\n name: 'rtcp',\n reg: /^rtcp:(\\d*)(?: (\\S*) IP(\\d) (\\S*))?/,\n names: ['port', 'netType', 'ipVer', 'address'],\n format: function (o) {\n return (o.address != null) ?\n \"rtcp:%d %s IP%d %s\":\n \"rtcp:%d\";\n }\n },\n { //a=rtcp-fb:98 trr-int 100\n push: 'rtcpFbTrrInt',\n reg: /^rtcp-fb:(\\*|\\d*) trr-int (\\d*)/,\n names: ['payload', 'value'],\n format: \"rtcp-fb:%d trr-int %d\"\n },\n { //a=rtcp-fb:98 nack rpsi\n push: 'rtcpFb',\n reg: /^rtcp-fb:(\\*|\\d*) ([\\w-_]*)(?: ([\\w-_]*))?/,\n names: ['payload', 'type', 'subtype'],\n format: function (o) {\n return (o.subtype != null) ?\n \"rtcp-fb:%s %s %s\":\n \"rtcp-fb:%s %s\";\n }\n },\n { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n //a=extmap:1/recvonly URI-gps-string\n push: 'ext',\n reg: /^extmap:([\\w_\\/]*) (\\S*)(?: (\\S*))?/,\n names: ['value', 'uri', 'config'], // value may include \"/direction\" suffix\n format: function (o) {\n return (o.config != null) ?\n \"extmap:%s %s %s\":\n \"extmap:%s %s\";\n }\n },\n {\n //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32\n push: 'crypto',\n reg: /^crypto:(\\d*) ([\\w_]*) (\\S*)(?: (\\S*))?/,\n names: ['id', 'suite', 'config', 'sessionConfig'],\n format: function (o) {\n return (o.sessionConfig != null) ?\n \"crypto:%d %s %s %s\":\n \"crypto:%d %s %s\";\n }\n },\n { //a=setup:actpass\n name: 'setup',\n reg: /^setup:(\\w*)/,\n format: \"setup:%s\"\n },\n { //a=mid:1\n name: 'mid',\n reg: /^mid:([^\\s]*)/,\n format: \"mid:%s\"\n },\n { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a\n name: 'msid',\n reg: /^msid:(.*)/,\n format: \"msid:%s\"\n },\n { //a=ptime:20\n name: 'ptime',\n reg: /^ptime:(\\d*)/,\n format: \"ptime:%d\"\n },\n { //a=maxptime:60\n name: 'maxptime',\n reg: /^maxptime:(\\d*)/,\n format: \"maxptime:%d\"\n },\n { //a=sendrecv\n name: 'direction',\n reg: /^(sendrecv|recvonly|sendonly|inactive)/\n },\n { //a=ice-lite\n name: 'icelite',\n reg: /^(ice-lite)/\n },\n { //a=ice-ufrag:F7gI\n name: 'iceUfrag',\n reg: /^ice-ufrag:(\\S*)/,\n format: \"ice-ufrag:%s\"\n },\n { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g\n name: 'icePwd',\n reg: /^ice-pwd:(\\S*)/,\n format: \"ice-pwd:%s\"\n },\n { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33\n name: 'fingerprint',\n reg: /^fingerprint:(\\S*) (\\S*)/,\n names: ['type', 'hash'],\n format: \"fingerprint:%s %s\"\n },\n {\n //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host\n //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0\n //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0\n //a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0\n //a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0\n push:'candidates',\n reg: /^candidate:(\\S*) (\\d*) (\\S*) (\\d*) (\\S*) (\\d*) typ (\\S*)(?: raddr (\\S*) rport (\\d*))?(?: tcptype (\\S*))?(?: generation (\\d*))?/,\n names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation'],\n format: function (o) {\n var str = \"candidate:%s %d %s %d %s %d typ %s\";\n\n str += (o.raddr != null) ? \" raddr %s rport %d\" : \"%v%v\";\n\n // NB: candidate has three optional chunks, so %void middles one if it's missing\n str += (o.tcptype != null) ? \" tcptype %s\" : \"%v\";\n\n if (o.generation != null) {\n str += \" generation %d\";\n }\n return str;\n }\n },\n { //a=end-of-candidates (keep after the candidates line for readability)\n name: 'endOfCandidates',\n reg: /^(end-of-candidates)/\n },\n { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...\n name: 'remoteCandidates',\n reg: /^remote-candidates:(.*)/,\n format: \"remote-candidates:%s\"\n },\n { //a=ice-options:google-ice\n name: 'iceOptions',\n reg: /^ice-options:(\\S*)/,\n format: \"ice-options:%s\"\n },\n { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1\n push: \"ssrcs\",\n reg: /^ssrc:(\\d*) ([\\w_]*):(.*)/,\n names: ['id', 'attribute', 'value'],\n format: \"ssrc:%d %s:%s\"\n },\n { //a=ssrc-group:FEC 1 2\n push: \"ssrcGroups\",\n reg: /^ssrc-group:(\\w*) (.*)/,\n names: ['semantics', 'ssrcs'],\n format: \"ssrc-group:%s %s\"\n },\n { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV\n name: \"msidSemantic\",\n reg: /^msid-semantic:\\s?(\\w*) (\\S*)/,\n names: ['semantic', 'token'],\n format: \"msid-semantic: %s %s\" // space after \":\" is not accidental\n },\n { //a=group:BUNDLE audio video\n push: 'groups',\n reg: /^group:(\\w*) (.*)/,\n names: ['type', 'mids'],\n format: \"group:%s %s\"\n },\n { //a=rtcp-mux\n name: 'rtcpMux',\n reg: /^(rtcp-mux)/\n },\n { //a=rtcp-rsize\n name: 'rtcpRsize',\n reg: /^(rtcp-rsize)/\n },\n { // any a= that we don't understand is kepts verbatim on media.invalid\n push: 'invalid',\n names: [\"value\"]\n }\n ]\n};\n\n// set sensible defaults to avoid polluting the grammar with boring details\nObject.keys(grammar).forEach(function (key) {\n var objs = grammar[key];\n objs.forEach(function (obj) {\n if (!obj.reg) {\n obj.reg = /(.*)/;\n }\n if (!obj.format) {\n obj.format = \"%s\";\n }\n });\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module chunks = main","var parser = require('./parser');\nvar writer = require('./writer');\n\nexports.write = writer;\nexports.parse = parser.parse;\nexports.parseFmtpConfig = parser.parseFmtpConfig;\nexports.parsePayloads = parser.parsePayloads;\nexports.parseRemoteCandidates = parser.parseRemoteCandidates;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module chunks = main","var toIntIfInt = function (v) {\n return String(Number(v)) === v ? Number(v) : v;\n};\n\nvar attachProperties = function (match, location, names, rawName) {\n if (rawName && !names) {\n location[rawName] = toIntIfInt(match[1]);\n }\n else {\n for (var i = 0; i < names.length; i += 1) {\n if (match[i+1] != null) {\n location[names[i]] = toIntIfInt(match[i+1]);\n }\n }\n }\n};\n\nvar parseReg = function (obj, location, content) {\n var needsBlank = obj.name && obj.names;\n if (obj.push && !location[obj.push]) {\n location[obj.push] = [];\n }\n else if (needsBlank && !location[obj.name]) {\n location[obj.name] = {};\n }\n var keyLocation = obj.push ?\n {} : // blank object that will be pushed\n needsBlank ? location[obj.name] : location; // otherwise, named location or root\n\n attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name);\n\n if (obj.push) {\n location[obj.push].push(keyLocation);\n }\n};\n\nvar grammar = require('./grammar');\nvar validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);\n\nexports.parse = function (sdp) {\n var session = {}\n , media = []\n , location = session; // points at where properties go under (one of the above)\n\n // parse lines we understand\n sdp.split(/(\\r\\n|\\r|\\n)/).filter(validLine).forEach(function (l) {\n var type = l[0];\n var content = l.slice(2);\n if (type === 'm') {\n media.push({rtp: [], fmtp: []});\n location = media[media.length-1]; // point at latest media line\n }\n\n for (var j = 0; j < (grammar[type] || []).length; j += 1) {\n var obj = grammar[type][j];\n if (obj.reg.test(content)) {\n return parseReg(obj, location, content);\n }\n }\n });\n\n session.media = media; // link it up\n return session;\n};\n\nvar fmtpReducer = function (acc, expr) {\n var s = expr.split('=');\n if (s.length === 2) {\n acc[s[0]] = toIntIfInt(s[1]);\n }\n return acc;\n};\n\nexports.parseFmtpConfig = function (str) {\n return str.split(/\\;\\s?/).reduce(fmtpReducer, {});\n};\n\nexports.parsePayloads = function (str) {\n return str.split(' ').map(Number);\n};\n\nexports.parseRemoteCandidates = function (str) {\n var candidates = [];\n var parts = str.split(' ').map(toIntIfInt);\n for (var i = 0; i < parts.length; i += 3) {\n candidates.push({\n component: parts[i],\n ip: parts[i + 1],\n port: parts[i + 2]\n });\n }\n return candidates;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module chunks = main","var grammar = require('./grammar');\n\n// customized util.format - discards excess arguments and can void middle ones\nvar formatRegExp = /%[sdv%]/g;\nvar format = function (formatStr) {\n var i = 1;\n var args = arguments;\n var len = args.length;\n return formatStr.replace(formatRegExp, function (x) {\n if (i >= len) {\n return x; // missing argument\n }\n var arg = args[i];\n i += 1;\n switch (x) {\n case '%%':\n return '%';\n case '%s':\n return String(arg);\n case '%d':\n return Number(arg);\n case '%v':\n return '';\n }\n });\n // NB: we discard excess arguments - they are typically undefined from makeLine\n};\n\nvar makeLine = function (type, obj, location) {\n var str = obj.format instanceof Function ?\n (obj.format(obj.push ? location : location[obj.name])) :\n obj.format;\n\n var args = [type + '=' + str];\n if (obj.names) {\n for (var i = 0; i < obj.names.length; i += 1) {\n var n = obj.names[i];\n if (obj.name) {\n args.push(location[obj.name][n]);\n }\n else { // for mLine and push attributes\n args.push(location[obj.names[i]]);\n }\n }\n }\n else {\n args.push(location[obj.name]);\n }\n return format.apply(null, args);\n};\n\n// RFC specified order\n// TODO: extend this with all the rest\nvar defaultOuterOrder = [\n 'v', 'o', 's', 'i',\n 'u', 'e', 'p', 'c',\n 'b', 't', 'r', 'z', 'a'\n];\nvar defaultInnerOrder = ['i', 'c', 'b', 'a'];\n\n\nmodule.exports = function (session, opts) {\n opts = opts || {};\n // ensure certain properties exist\n if (session.version == null) {\n session.version = 0; // \"v=0\" must be there (only defined version atm)\n }\n if (session.name == null) {\n session.name = \" \"; // \"s= \" must be there if no meaningful name set\n }\n session.media.forEach(function (mLine) {\n if (mLine.payloads == null) {\n mLine.payloads = \"\";\n }\n });\n\n var outerOrder = opts.outerOrder || defaultOuterOrder;\n var innerOrder = opts.innerOrder || defaultInnerOrder;\n var sdp = [];\n\n // loop through outerOrder for matching properties on session\n outerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in session && session[obj.name] != null) {\n sdp.push(makeLine(type, obj, session));\n }\n else if (obj.push in session && session[obj.push] != null) {\n session[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n\n // then for each media line, follow the innerOrder\n session.media.forEach(function (mLine) {\n sdp.push(makeLine('m', grammar.m[0], mLine));\n\n innerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in mLine && mLine[obj.name] != null) {\n sdp.push(makeLine(type, obj, mLine));\n }\n else if (obj.push in mLine && mLine[obj.push] != null) {\n mLine[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n });\n\n return sdp.join('\\r\\n') + '\\r\\n';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l = this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!arrayEquals.apply(this[i], [array[i]]))\n return false;\n } else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal:\n // {x:20} != {x:20}\n return false;\n }\n }\n return true;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexports.Interop = require('./interop');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* global RTCSessionDescription */\n/* global RTCIceCandidate */\n/* jshint -W097 */\n\"use strict\";\n\nvar transform = require('./transform');\nvar arrayEquals = require('./array-equals');\n\nfunction Interop() {\n\n /**\n * This map holds the most recent Unified Plan offer/answer SDP that was\n * converted to Plan B, with the SDP type ('offer' or 'answer') as keys and\n * the SDP string as values.\n *\n * @type {{}}\n */\n this.cache = {\n mlB2UMap : {},\n mlU2BMap : {}\n };\n}\n\nmodule.exports = Interop;\n\n/**\n * Changes the candidate args to match with the related Unified Plan\n */\nInterop.prototype.candidateToUnifiedPlan = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n cand.sdpMLineIndex = this.cache.mlB2UMap[cand.sdpMLineIndex];\n /* TODO: change sdpMid to (audio|video)-SSRC */\n\n return cand;\n};\n\n/**\n * Changes the candidate args to match with the related Plan B\n */\nInterop.prototype.candidateToPlanB = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n if (cand.sdpMid.indexOf('audio') === 0) {\n cand.sdpMid = 'audio';\n } else if (cand.sdpMid.indexOf('video') === 0) {\n cand.sdpMid = 'video';\n } else {\n throw new Error('candidate with ' + cand.sdpMid + ' not allowed');\n }\n\n cand.sdpMLineIndex = this.cache.mlU2BMap[cand.sdpMLineIndex];\n\n return cand;\n};\n\n/**\n * Returns the index of the first m-line with the given media type and with a\n * direction which allows sending, in the last Unified Plan description with\n * type \"answer\" converted to Plan B. Returns {null} if there is no saved\n * answer, or if none of its m-lines with the given type allow sending.\n * @param type the media type (\"audio\" or \"video\").\n * @returns {*}\n */\nInterop.prototype.getFirstSendingIndexFromAnswer = function(type) {\n if (!this.cache.answer) {\n return null;\n }\n\n var session = transform.parse(this.cache.answer);\n if (session && session.media && Array.isArray(session.media)){\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type == type &&\n (!session.media[i].direction /* default to sendrecv */ ||\n session.media[i].direction === 'sendrecv' ||\n session.media[i].direction === 'sendonly')){\n return i;\n }\n }\n }\n\n return null;\n};\n\n/**\n * This method transforms a Unified Plan SDP to an equivalent Plan B SDP. A\n * PeerConnection wrapper transforms the SDP to Plan B before passing it to the\n * application.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toPlanB = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n // Objectify the SDP for easier manipulation.\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Unified Plan SDP. Plan B\n // SDP has a video, an audio and a data \"channel\" at most.\n if (session.media.length <= 3 && session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Unified Plan.');\n return desc;\n }\n\n //#endregion\n\n // HACK https://bugzilla.mozilla.org/show_bug.cgi?id=1113443\n var sdp = desc.sdp;\n var rewrite = false;\n for (var i = 0; i < session.media.length; i++) {\n var uLine = session.media[i];\n uLine.rtp.forEach(function(rtp) {\n if (rtp.codec === 'NULL')\n {\n rewrite = true;\n var offer = transform.parse(self.cache.offer);\n rtp.codec = offer.media[i].rtp[0].codec;\n }\n });\n }\n if (rewrite) {\n sdp = transform.write(session);\n }\n\n // Unified Plan SDP is our \"precious\". Cache it for later use in the Plan B\n // -> Unified Plan transformation.\n this.cache[desc.type] = sdp;\n\n //#region Convert from Unified Plan to Plan B.\n\n // We rebuild the session.media array.\n var media = session.media;\n session.media = [];\n\n // Associative array that maps channel types to channel objects for fast\n // access to channel objects by their type, e.g. type2bl['audio']->channel\n // obj.\n var type2bl = {};\n\n // Used to build the group:BUNDLE value after the channels construction\n // loop.\n var types = [];\n\n media.forEach(function(uLine) {\n // rtcp-mux is required in the Plan B SDP.\n if ((typeof uLine.rtcpMux !== 'string' ||\n uLine.rtcpMux !== 'rtcp-mux') &&\n uLine.direction !== 'inactive') {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'without the rtcp-mux attribute were found.');\n }\n\n // If we don't have a channel for this uLine.type OR the selected is\n // inactive, then select this uLine as the channel basis.\n if (typeof type2bl[uLine.type] === 'undefined' ||\n type2bl[uLine.type].direction === 'inactive') {\n type2bl[uLine.type] = uLine;\n }\n\n if (uLine.protocol != type2bl[uLine.type].protocol) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different protocols and this library does not have ' +\n 'support for that');\n }\n\n if (uLine.payloads != type2bl[uLine.type].payloads) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different payloads and this library does not have ' +\n 'support for that');\n }\n\n });\n\n // Implode the Unified Plan m-lines/tracks into Plan B channels.\n media.forEach(function(uLine) {\n if (uLine.type === 'application') {\n session.media.push(uLine);\n types.push(uLine.mid);\n return;\n }\n\n // Add sources to the channel and handle a=msid.\n if (typeof uLine.sources === 'object') {\n Object.keys(uLine.sources).forEach(function(ssrc) {\n if (typeof type2bl[uLine.type].sources !== 'object')\n type2bl[uLine.type].sources = {};\n\n // Assign the sources to the channel.\n type2bl[uLine.type].sources[ssrc] =\n uLine.sources[ssrc];\n\n if (typeof uLine.msid !== 'undefined') {\n // In Plan B the msid is an SSRC attribute. Also, we don't\n // care about the obsolete label and mslabel attributes.\n //\n // Note that it is not guaranteed that the uLine will\n // have an msid. recvonly channels in particular don't have\n // one.\n type2bl[uLine.type].sources[ssrc].msid =\n uLine.msid;\n }\n // NOTE ssrcs in ssrc groups will share msids, as\n // draft-uberti-rtcweb-plan-00 mandates.\n });\n }\n\n // Add ssrc groups to the channel.\n if (typeof uLine.ssrcGroups !== 'undefined' &&\n Array.isArray(uLine.ssrcGroups)) {\n\n // Create the ssrcGroups array, if it's not defined.\n if (typeof type2bl[uLine.type].ssrcGroups === 'undefined' ||\n !Array.isArray(type2bl[uLine.type].ssrcGroups)) {\n type2bl[uLine.type].ssrcGroups = [];\n }\n\n type2bl[uLine.type].ssrcGroups =\n type2bl[uLine.type].ssrcGroups.concat(\n uLine.ssrcGroups);\n }\n\n if (type2bl[uLine.type] === uLine) {\n // Plan B mids are in ['audio', 'video', 'data']\n uLine.mid = uLine.type;\n\n // Plan B doesn't support/need the bundle-only attribute.\n delete uLine.bundleOnly;\n\n // In Plan B the msid is an SSRC attribute.\n delete uLine.msid;\n\n\t if (uLine.type == media[0].type) {\n\t types.unshift(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.unshift(uLine);\n\t } else {\n\t types.push(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.push(uLine);\n\t }\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group with the new mids.\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = types.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n/* follow rules defined in RFC4145 */\nfunction addSetupAttr(uLine) {\n if (typeof uLine.setup === 'undefined') {\n return;\n }\n\n if (uLine.setup === \"active\") {\n uLine.setup = \"passive\";\n } else if (uLine.setup === \"passive\") {\n uLine.setup = \"active\";\n }\n}\n\n/**\n * This method transforms a Plan B SDP to an equivalent Unified Plan SDP. A\n * PeerConnection wrapper transforms the SDP to Unified Plan before passing it\n * to FF.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toUnifiedPlan = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Plan B SDP. Plan B SDP has\n // a video, an audio and a data \"channel\" at most.\n if (session.media.length > 3 || !session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Plan B.');\n return desc;\n }\n\n // Make sure this Plan B SDP can be converted to a Unified Plan SDP.\n var mids = [];\n session.media.forEach(function(m) {\n mids.push(m.mid);\n });\n\n var hasBundle = false;\n if (typeof session.groups !== 'undefined' &&\n Array.isArray(session.groups)) {\n hasBundle = session.groups.every(function(g) {\n return g.type !== 'BUNDLE' ||\n arrayEquals.apply(g.mids.sort(), [mids.sort()]);\n });\n }\n\n if (!hasBundle) {\n var mustBeBundle = false;\n\n session.media.forEach(function(m) {\n if (m.direction !== 'inactive') {\n mustBeBundle = true;\n }\n });\n\n if (mustBeBundle) {\n throw new Error(\"Cannot convert to Unified Plan because m-lines that\" +\n \" are not bundled were found.\");\n }\n }\n\n //#endregion\n\n\n //#region Convert from Plan B to Unified Plan.\n\n // Unfortunately, a Plan B offer/answer doesn't have enough information to\n // rebuild an equivalent Unified Plan offer/answer.\n //\n // For example, if this is a local answer (in Unified Plan style) that we\n // convert to Plan B prior to handing it over to the application (the\n // PeerConnection wrapper called us, for instance, after a successful\n // createAnswer), we want to remember the m-line at which we've seen the\n // (local) SSRC. That's because when the application wants to do call the\n // SLD method, forcing us to do the inverse transformation (from Plan B to\n // Unified Plan), we need to know to which m-line to assign the (local)\n // SSRC. We also need to know all the other m-lines that the original\n // answer had and include them in the transformed answer as well.\n //\n // Another example is if this is a remote offer that we convert to Plan B\n // prior to giving it to the application, we want to remember the mid at\n // which we've seen the (remote) SSRC.\n //\n // In the iteration that follows, we use the cached Unified Plan (if it\n // exists) to assign mids to ssrcs.\n\n var type;\n if (desc.type === 'answer') {\n type = 'offer';\n } else if (desc.type === 'offer') {\n type = 'answer';\n } else {\n throw new Error(\"Type '\" + desc.type + \"' not supported.\");\n }\n\n var cached;\n if (typeof this.cache[type] !== 'undefined') {\n cached = transform.parse(this.cache[type]);\n }\n\n var recvonlySsrcs = {\n audio: {},\n video: {}\n };\n\n // A helper map that sends mids to m-line objects. We use it later to\n // rebuild the Unified Plan style session.media array.\n var mid2ul = {};\n var bIdx = 0;\n var uIdx = 0;\n\n var sources2ul = {};\n\n var candidates;\n var iceUfrag;\n var icePwd;\n var fingerprint;\n var payloads = {};\n var rtcpFb = {};\n var rtp = {};\n\n session.media.forEach(function(bLine) {\n if ((typeof bLine.rtcpMux !== 'string' ||\n bLine.rtcpMux !== 'rtcp-mux') &&\n bLine.direction !== 'inactive') {\n throw new Error(\"Cannot convert to Unified Plan because m-lines \" +\n \"without the rtcp-mux attribute were found.\");\n }\n\n if (bLine.type === 'application') {\n mid2ul[bLine.mid] = bLine;\n return;\n }\n\n // With rtcp-mux and bundle all the channels should have the same ICE\n // stuff.\n var sources = bLine.sources;\n var ssrcGroups = bLine.ssrcGroups;\n var port = bLine.port;\n\n /* Chrome adds different candidates even using bundle, so we concat the candidates list */\n if (typeof bLine.candidates != 'undefined') {\n if (typeof candidates != 'undefined') {\n candidates = candidates.concat(bLine.candidates);\n } else {\n candidates = bLine.candidates;\n }\n }\n\n if ((typeof iceUfrag != 'undefined') && (typeof bLine.iceUfrag != 'undefined') && (iceUfrag != bLine.iceUfrag)) {\n throw new Error(\"Only BUNDLE supported, iceUfrag must be the same for all m-lines.\\n\" +\n \"\\tLast iceUfrag: \" + iceUfrag + \"\\n\" +\n \"\\tNew iceUfrag: \" + bLine.iceUfrag\n );\n }\n\n if (typeof bLine.iceUfrag != 'undefined') {\n iceUfrag = bLine.iceUfrag;\n }\n\n if ((typeof icePwd != 'undefined') && (typeof bLine.icePwd != 'undefined') && (icePwd != bLine.icePwd)) {\n throw new Error(\"Only BUNDLE supported, icePwd must be the same for all m-lines.\\n\" +\n \"\\tLast icePwd: \" + icePwd + \"\\n\" +\n \"\\tNew icePwd: \" + bLine.icePwd\n );\n }\n\n if (typeof bLine.icePwd != 'undefined') {\n icePwd = bLine.icePwd;\n }\n\n if ((typeof fingerprint != 'undefined') && (typeof bLine.fingerprint != 'undefined') &&\n (fingerprint.type != bLine.fingerprint.type || fingerprint.hash != bLine.fingerprint.hash)) {\n throw new Error(\"Only BUNDLE supported, fingerprint must be the same for all m-lines.\\n\" +\n \"\\tLast fingerprint: \" + JSON.stringify(fingerprint) + \"\\n\" +\n \"\\tNew fingerprint: \" + JSON.stringify(bLine.fingerprint)\n );\n }\n\n if (typeof bLine.fingerprint != 'undefined') {\n fingerprint = bLine.fingerprint;\n }\n\n payloads[bLine.type] = bLine.payloads;\n rtcpFb[bLine.type] = bLine.rtcpFb;\n rtp[bLine.type] = bLine.rtp;\n\n // inverted ssrc group map\n var ssrc2group = {};\n if (typeof ssrcGroups !== 'undefined' && Array.isArray(ssrcGroups)) {\n ssrcGroups.forEach(function (ssrcGroup) {\n // XXX This might brake if an SSRC is in more than one group\n // for some reason.\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs.forEach(function (ssrc) {\n if (typeof ssrc2group[ssrc] === 'undefined') {\n ssrc2group[ssrc] = [];\n }\n\n ssrc2group[ssrc].push(ssrcGroup);\n });\n }\n });\n }\n\n // ssrc to m-line index.\n var ssrc2ml = {};\n\n if (typeof sources === 'object') {\n\n // We'll use the \"bLine\" object as a prototype for each new \"mLine\"\n // that we create, but first we need to clean it up a bit.\n delete bLine.sources;\n delete bLine.ssrcGroups;\n delete bLine.candidates;\n delete bLine.iceUfrag;\n delete bLine.icePwd;\n delete bLine.fingerprint;\n delete bLine.port;\n delete bLine.mid;\n\n // Explode the Plan B channel sources with one m-line per source.\n Object.keys(sources).forEach(function(ssrc) {\n\n // The (unified) m-line for this SSRC. We either create it from\n // scratch or, if it's a grouped SSRC, we re-use a related\n // mline. In other words, if the source is grouped with another\n // source, put the two together in the same m-line.\n var uLine;\n\n // We assume here that we are the answerer in the O/A, so any\n // offers which we translate come from the remote side, while\n // answers are local. So the check below is to make that we\n // handle receive-only SSRCs in a special way only if they come\n // from the remote side.\n if (desc.type==='offer') {\n // We want to detect SSRCs which are used by a remote peer\n // in an m-line with direction=recvonly (i.e. they are\n // being used for RTCP only).\n // This information would have gotten lost if the remote\n // peer used Unified Plan and their local description was\n // translated to Plan B. So we use the lack of an MSID\n // attribute to deduce a \"receive only\" SSRC.\n if (!sources[ssrc].msid) {\n recvonlySsrcs[bLine.type][ssrc] = sources[ssrc];\n // Receive-only SSRCs must not create new m-lines. We\n // will assign them to an existing m-line later.\n return;\n }\n }\n\n if (typeof ssrc2group[ssrc] !== 'undefined' &&\n Array.isArray(ssrc2group[ssrc])) {\n ssrc2group[ssrc].some(function (ssrcGroup) {\n // ssrcGroup.ssrcs *is* an Array, no need to check\n // again here.\n return ssrcGroup.ssrcs.some(function (related) {\n if (typeof ssrc2ml[related] === 'object') {\n uLine = ssrc2ml[related];\n return true;\n }\n });\n });\n }\n\n if (typeof uLine === 'object') {\n // the m-line already exists. Just add the source.\n uLine.sources[ssrc] = sources[ssrc];\n delete sources[ssrc].msid;\n } else {\n // Use the \"bLine\" as a prototype for the \"uLine\".\n uLine = Object.create(bLine);\n ssrc2ml[ssrc] = uLine;\n\n if (typeof sources[ssrc].msid !== 'undefined') {\n // Assign the msid of the source to the m-line. Note\n // that it is not guaranteed that the source will have\n // msid. In particular \"recvonly\" sources don't have an\n // msid. Note that \"recvonly\" is a term only defined\n // for m-lines.\n uLine.msid = sources[ssrc].msid;\n delete sources[ssrc].msid;\n }\n\n // We assign one SSRC per media line.\n uLine.sources = {};\n uLine.sources[ssrc] = sources[ssrc];\n uLine.ssrcGroups = ssrc2group[ssrc];\n\n // Use the cached Unified Plan SDP (if it exists) to assign\n // SSRCs to mids.\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n\n cached.media.forEach(function (m) {\n if (typeof m.sources === 'object') {\n Object.keys(m.sources).forEach(function (s) {\n if (s === ssrc) {\n uLine.mid = m.mid;\n }\n });\n }\n });\n }\n\n if (typeof uLine.mid === 'undefined') {\n\n // If this is an SSRC that we see for the first time\n // assign it a new mid. This is typically the case when\n // this method is called to transform a remote\n // description for the first time or when there is a\n // new SSRC in the remote description because a new\n // peer has joined the conference. Local SSRCs should\n // have already been added to the map in the toPlanB\n // method.\n //\n // Because FF generates answers in Unified Plan style,\n // we MUST already have a cached answer with all the\n // local SSRCs mapped to some m-line/mid.\n\n uLine.mid = [bLine.type, '-', ssrc].join('');\n }\n\n // Include the candidates in the 1st media line.\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n sources2ul[uIdx] = uLine.sources;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n uIdx++;\n }\n });\n } else {\n var uLine = bLine;\n\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n }\n\n bIdx++;\n });\n\n // Rebuild the media array in the right order and add the missing mLines\n // (missing from the Plan B SDP).\n session.media = [];\n mids = []; // reuse\n\n if (desc.type === 'answer') {\n\n // The media lines in the answer must match the media lines in the\n // offer. The order is important too. Here we assume that Firefox is\n // the answerer, so we merely have to use the reconstructed (unified)\n // answer to update the cached (unified) answer accordingly.\n //\n // In the general case, one would have to use the cached (unified)\n // offer to find the m-lines that are missing from the reconstructed\n // answer, potentially grabbing them from the cached (unified) answer.\n // One has to be careful with this approach because inactive m-lines do\n // not always have an mid, making it tricky (impossible?) to find where\n // exactly and which m-lines are missing from the reconstructed answer.\n\n for (var i = 0; i < cached.media.length; i++) {\n var uLine = cached.media[i];\n\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (typeof sources2ul[i] === 'undefined') {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'recvonly';\n else if (uLine.direction === 'sendonly')\n uLine.direction = 'inactive';\n } else {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'sendrecv';\n else if (uLine.direction === 'recvonly')\n uLine.direction = 'sendonly';\n }\n\n uLine.sources = sources2ul[i];\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n\n uLine.rtp = rtp[uLine.type];\n uLine.payloads = payloads[uLine.type];\n uLine.rtcpFb = rtcpFb[uLine.type];\n\n session.media.push(uLine);\n\n if (typeof uLine.mid === 'string') {\n // inactive lines don't/may not have an mid.\n mids.push(uLine.mid);\n }\n }\n } else {\n\n // SDP offer/answer (and the JSEP spec) forbids removing an m-section\n // under any circumstances. If we are no longer interested in sending a\n // track, we just remove the msid and ssrc attributes and set it to\n // either a=recvonly (as the reofferer, we must use recvonly if the\n // other side was previously sending on the m-section, but we can also\n // leave the possibility open if it wasn't previously in use), or\n // a=inactive.\n\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n cached.media.forEach(function(uLine) {\n mids.push(uLine.mid);\n if (typeof mid2ul[uLine.mid] !== 'undefined') {\n session.media.push(mid2ul[uLine.mid]);\n } else {\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (!uLine.direction\n || uLine.direction === 'sendrecv') {\n uLine.direction = 'sendonly';\n }\n if (!uLine.direction\n || uLine.direction === 'recvonly') {\n uLine.direction = 'inactive';\n }\n\n addSetupAttr (uLine);\n session.media.push(uLine);\n }\n });\n }\n\n // Add all the remaining (new) m-lines of the transformed SDP.\n Object.keys(mid2ul).forEach(function(mid) {\n if (mids.indexOf(mid) === -1) {\n mids.push(mid);\n if (mid2ul[mid].direction === 'recvonly') {\n // This is a remote recvonly channel. Add its SSRC to the\n // appropriate sendrecv or sendonly channel.\n // TODO(gp) what if we don't have sendrecv/sendonly\n // channel?\n\n var done = false;\n\n session.media.some(function (uLine) {\n if ((uLine.direction === 'sendrecv' ||\n uLine.direction === 'sendonly') &&\n uLine.type === mid2ul[mid].type) {\n // mid2ul[mid] shouldn't have any ssrc-groups\n Object.keys(mid2ul[mid].sources).forEach(\n function (ssrc) {\n uLine.sources[ssrc] =\n mid2ul[mid].sources[ssrc];\n });\n\n done = true;\n return true;\n }\n });\n\n if (!done) {\n session.media.push(mid2ul[mid]);\n }\n } else {\n session.media.push(mid2ul[mid]);\n }\n }\n });\n }\n\n // After we have constructed the Plan Unified m-lines we can figure out\n // where (in which m-line) to place the 'recvonly SSRCs'.\n // Note: we assume here that we are the answerer in the O/A, so any offers\n // which we translate come from the remote side, while answers are local\n // (and so our last local description is cached as an 'answer').\n [\"audio\", \"video\"].forEach(function (type) {\n if (!session || !session.media || !Array.isArray(session.media))\n return;\n\n var idx = null;\n if (Object.keys(recvonlySsrcs[type]).length > 0) {\n idx = self.getFirstSendingIndexFromAnswer(type);\n if (idx === null){\n // If this is the first offer we receive, we don't have a\n // cached answer. Assume that we will be sending media using\n // the first m-line for each media type.\n\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type === type) {\n idx = i;\n break;\n }\n }\n }\n }\n\n if (idx && session.media.length > idx) {\n var mLine = session.media[idx];\n Object.keys(recvonlySsrcs[type]).forEach(function(ssrc) {\n if (mLine.sources && mLine.sources[ssrc]) {\n console.warn(\"Replacing an existing SSRC.\");\n }\n if (!mLine.sources) {\n mLine.sources = {};\n }\n\n mLine.sources[ssrc] = recvonlySsrcs[type][ssrc];\n });\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group (since we regenerated the mids)\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = mids.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n // Cache the transformed SDP (Unified Plan) for later re-use in this\n // function.\n this.cache[desc.type] = resStr;\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar transform = require('sdp-transform');\n\nexports.write = function(session, opts) {\n\n if (typeof session !== 'undefined' &&\n typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // expand sources to ssrcs\n if (typeof mLine.sources !== 'undefined' &&\n Object.keys(mLine.sources).length !== 0) {\n mLine.ssrcs = [];\n Object.keys(mLine.sources).forEach(function (ssrc) {\n var source = mLine.sources[ssrc];\n Object.keys(source).forEach(function (attribute) {\n mLine.ssrcs.push({\n id: ssrc,\n attribute: attribute,\n value: source[attribute]\n });\n });\n });\n delete mLine.sources;\n }\n\n // join ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.join(' ');\n }\n });\n }\n });\n }\n\n // join group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids !== 'undefined' && Array.isArray(g.mids)) {\n g.mids = g.mids.join(' ');\n }\n });\n }\n\n return transform.write(session, opts);\n};\n\nexports.parse = function(sdp) {\n var session = transform.parse(sdp);\n\n if (typeof session !== 'undefined' && typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // group sources attributes by ssrc\n if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) {\n mLine.sources = {};\n mLine.ssrcs.forEach(function (ssrc) {\n if (!mLine.sources[ssrc.id])\n mLine.sources[ssrc.id] = {};\n mLine.sources[ssrc.id][ssrc.attribute] = ssrc.value;\n });\n\n delete mLine.ssrcs;\n }\n\n // split ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs === 'string') {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.split(' ');\n }\n });\n }\n });\n }\n // split group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids === 'string') {\n g.mids = g.mids.split(' ');\n }\n });\n }\n\n return session;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module chunks = main","/**\n * UAParser.js v0.7.17\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 & MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.17',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]+)*/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]+)*/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [NAME, VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\\/([\\w\\.-]+)/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]+)*/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/[\\w\\.]+.*silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/[\\w\\.]+.*silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]+)*/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w+)*/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]+)*/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?(:?\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w+)*/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)*/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w+)*/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]+)*/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w+)*/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i // OnePlus\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Venue[\\d\\s]*)\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(zte)?.+(k\\d{2})\\s+build/i // ZTE K Series Tablet\n ], [[VENDOR, 'ZTE'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2}x?.*)\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(.+)\\s+build/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?.+)\\s+build/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?.+)\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-?)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(.*\\b)\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q.+)\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android.+)[;\\/].+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]+).*(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s]+\\w)*/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]+)*/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]+)*/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]+)*/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w+)*/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]+)*/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]+)*/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]+)*/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.]+\\d)*/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]+(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]+\\w)*/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]+)*/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.]*)*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]+)*/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module id = ../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module chunks = main","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/index.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/index.js\n// module chunks = main","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module chunks = main","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v1.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v1.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/uuid/v4.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v4.js\n// module chunks = main","/*\r\nWildEmitter.js is a slim little event emitter by @henrikjoreteg largely based\r\non @visionmedia's Emitter from UI Kit.\r\n\r\nWhy? I wanted it standalone.\r\n\r\nI also wanted support for wildcard emitters like this:\r\n\r\nemitter.on('*', function (eventName, other, event, payloads) {\r\n\r\n});\r\n\r\nemitter.on('somenamespace*', function (eventName, payloads) {\r\n\r\n});\r\n\r\nPlease note that callbacks triggered by wildcard registered events also get\r\nthe event name as the first argument.\r\n*/\r\n\r\nmodule.exports = WildEmitter;\r\n\r\nfunction WildEmitter() { }\r\n\r\nWildEmitter.mixin = function (constructor) {\r\n var prototype = constructor.prototype || constructor;\r\n\r\n prototype.isWildEmitter= true;\r\n\r\n // Listen on the given `event` with `fn`. Store a group name if present.\r\n prototype.on = function (event, groupName, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n func._groupName = group;\r\n (this.callbacks[event] = this.callbacks[event] || []).push(func);\r\n return this;\r\n };\r\n\r\n // Adds an `event` listener that will be invoked a single\r\n // time then automatically removed.\r\n prototype.once = function (event, groupName, fn) {\r\n var self = this,\r\n hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n function on() {\r\n self.off(event, on);\r\n func.apply(this, arguments);\r\n }\r\n this.on(event, group, on);\r\n return this;\r\n };\r\n\r\n // Unbinds an entire group\r\n prototype.releaseGroup = function (groupName) {\r\n this.callbacks = this.callbacks || {};\r\n var item, i, len, handlers;\r\n for (item in this.callbacks) {\r\n handlers = this.callbacks[item];\r\n for (i = 0, len = handlers.length; i < len; i++) {\r\n if (handlers[i]._groupName === groupName) {\r\n //console.log('removing');\r\n // remove it and shorten the array we're looping through\r\n handlers.splice(i, 1);\r\n i--;\r\n len--;\r\n }\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n // Remove the given callback for `event` or all\r\n // registered callbacks.\r\n prototype.off = function (event, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var callbacks = this.callbacks[event],\r\n i;\r\n\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (arguments.length === 1) {\r\n delete this.callbacks[event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n i = callbacks.indexOf(fn);\r\n callbacks.splice(i, 1);\r\n if (callbacks.length === 0) {\r\n delete this.callbacks[event];\r\n }\r\n return this;\r\n };\r\n\r\n /// Emit `event` with the given args.\r\n // also calls any `*` handlers\r\n prototype.emit = function (event) {\r\n this.callbacks = this.callbacks || {};\r\n var args = [].slice.call(arguments, 1),\r\n callbacks = this.callbacks[event],\r\n specialCallbacks = this.getWildcardCallbacks(event),\r\n i,\r\n len,\r\n item,\r\n listeners;\r\n\r\n if (callbacks) {\r\n listeners = callbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, args);\r\n }\r\n }\r\n\r\n if (specialCallbacks) {\r\n len = specialCallbacks.length;\r\n listeners = specialCallbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, [event].concat(args));\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // Helper for for finding special wildcard event handlers that match the event\r\n prototype.getWildcardCallbacks = function (eventName) {\r\n this.callbacks = this.callbacks || {};\r\n var item,\r\n split,\r\n result = [];\r\n\r\n for (item in this.callbacks) {\r\n split = item.split('*');\r\n if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {\r\n result = result.concat(this.callbacks[item]);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n};\r\n\r\nWildEmitter.mixin(WildEmitter);\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module id = ../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module chunks = main","/*!\n * EventEmitter v5.2.4 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/pablo/Documents/Git/openvidu/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module id = ../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module chunks = main","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/$$_lazy_route_resource lazy\n// module id = ./src/$$_lazy_route_resource lazy recursive\n// module chunks = main","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.css\n// module id = ./src/app/app.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.html\n// module id = ./src/app/app.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { InfoService } from 'app/services/info.service';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n} from '@angular/material';\n\n@NgModule({\n imports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n exports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n})\nexport class AppMaterialModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.material.module.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpModule } from '@angular/http';\nimport { RouterModule } from '@angular/router';\nimport 'hammerjs';\n\nimport { routing } from './app.routing';\nimport { AppMaterialModule } from 'app/app.material.module';\n\nimport { InfoService } from './services/info.service';\nimport { RestService } from './services/rest.service';\n\nimport { AppComponent } from './app.component';\nimport { DashboardComponent } from './components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from './components/session-details/session-details.component';\nimport { CredentialsDialogComponent } from './components/dashboard/credentials-dialog.component';\nimport { LayoutBestFitComponent } from './components/layouts/layout-best-fit/layout-best-fit.component';\n\n\n@NgModule({\n declarations: [\n AppComponent,\n DashboardComponent,\n SessionDetailsComponent,\n CredentialsDialogComponent,\n LayoutBestFitComponent,\n ],\n imports: [\n BrowserModule,\n FormsModule,\n HttpModule,\n routing,\n AppMaterialModule,\n FlexLayoutModule\n ],\n entryComponents: [\n CredentialsDialogComponent,\n ],\n providers: [InfoService, RestService],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { DashboardComponent } from 'app/components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from 'app/components/session-details/session-details.component';\nimport { LayoutBestFitComponent } from 'app/components/layouts/layout-best-fit/layout-best-fit.component';\n\nconst appRoutes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n pathMatch: 'full'\n },\n {\n path: 'session/:sessionId',\n component: SessionDetailsComponent,\n pathMatch: 'full'\n },\n {\n path: 'layout-best-fit/:sessionId/:secret',\n component: LayoutBestFitComponent,\n pathMatch: 'full'\n }\n];\n\nexport const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.routing.ts","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n@Component({\n selector: 'app-credentials-dialog',\n template: `\n
\n

\n Insert your secret\n

\n
\n \n \n \n \n \n \n \n \n \n
\n
\n `,\n styles: [`\n #quality-div {\n margin-top: 20px;\n }\n #join-div {\n margin-top: 25px;\n margin-bottom: 20px;\n }\n #quality-tag {\n display: block;\n }\n h5 {\n margin-bottom: 10px;\n text-align: left;\n }\n #joinWithVideo {\n margin-right: 50px;\n }\n mat-dialog-actions {\n display: block;\n }\n #join-btn {\n float: right;\n }\n `],\n})\nexport class CredentialsDialogComponent {\n\n public myReference: MatDialogRef;\n secret: string;\n\n constructor() { }\n\n testVideo() {\n this.myReference.close(this.secret);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/credentials-dialog.component.ts","module.exports = \"#dashboard-div {\\n padding: 20px;\\n}\\n\\n#log {\\n height: 90%;\\n}\\n\\n#log-content {\\n height: 90%;\\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\\n overflow-y: auto;\\n overflow-x: hidden\\n}\\n\\nul {\\n margin: 0;\\n}\\n\\n#test-btn {\\n text-transform: uppercase;\\n float: right;\\n}\\n\\nmat-card-title button.blue {\\n color: #ffffff;\\n background-color: #0088aa;\\n}\\n\\nmat-card-title button.yellow {\\n color: rgba(0, 0, 0, 0.87);\\n background-color: #ffcc00;\\n}\\n\\nmat-spinner {\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tick-div {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tooltip-tick {\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n z-index: 2;\\n}\\n\\n.circ {\\n opacity: 0;\\n stroke-dasharray: 130;\\n stroke-dashoffset: 130;\\n -webkit-transition: all 1s;\\n transition: all 1s;\\n}\\n\\n.tick {\\n stroke-dasharray: 50;\\n stroke-dashoffset: 50;\\n -webkit-transition: stroke-dashoffset 1s 0.5s ease-out;\\n transition: stroke-dashoffset 1s 0.5s ease-out;\\n}\\n\\n.drawn+svg .path {\\n opacity: 1;\\n stroke-dashoffset: 0;\\n}\\n\\n#mirrored-video {\\n position: relative;\\n}\\n\\n/* Pure CSS loader */\\n\\n#loader {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#loader * {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::after {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::before {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n.loader-1 {\\n height: 100px;\\n width: 100px;\\n -webkit-animation: loader-1-1 4.8s linear infinite;\\n animation: loader-1-1 4.8s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.loader-1 span {\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n -webkit-animation: loader-1-2 1.2s linear infinite;\\n animation: loader-1-2 1.2s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n }\\n}\\n\\n@keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n transform: rotate(220deg);\\n }\\n}\\n\\n.loader-1 span::after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n border: 8px solid #4d4d4d;\\n border-radius: 50%;\\n -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n}\\n\\n@-webkit-keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n }\\n}\\n\\n@keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n transform: rotate(140deg);\\n }\\n}\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.css\n// module id = ./src/app/components/dashboard/dashboard.component.css\n// module chunks = main","module.exports = \"
\\n\\n
\\n \\n Server events\\n \\n lock_outline\\n \\n \\n \\n \\n
    \\n
  • \\n

    {{i}}

    \\n
  • \\n
\\n
\\n
\\n
\\n\\n
\\n \\n Test the connection\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \\n \\n \\n
\\n
\\n

{{msg}}

\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.html\n// module id = ./src/app/components/dashboard/dashboard.component.html\n// module chunks = main","import { Component, OnInit, ViewChild, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material';\nimport { Subscription } from 'rxjs/Subscription';\n\nimport { InfoService } from '../../services/info.service';\nimport { RestService } from '../../services/rest.service';\n\nimport { OpenVidu, Session } from 'openvidu-browser';\nimport { CredentialsDialogComponent } from './credentials-dialog.component';\n\ndeclare const $;\n\n@Component({\n selector: 'app-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css'],\n})\nexport class DashboardComponent implements OnInit, OnDestroy {\n\n websocket: WebSocket;\n\n @ViewChild('scrollMe') private myScrollContainer: ElementRef;\n lockScroll = false;\n\n infoSubscription: Subscription;\n info = [];\n\n session: Session;\n\n testStatus = 'DISCONNECTED';\n testButton = 'Test';\n tickClass = 'trigger';\n showSpinner = false;\n msgChain = [];\n\n openviduPublicUrl: string;\n\n constructor(private infoService: InfoService, private restService: RestService, public dialog: MatDialog) {\n // Subscription to info updated event raised by InfoService\n this.infoSubscription = this.infoService.newInfo$.subscribe(\n info => {\n this.info.push(info);\n this.scrollToBottom();\n });\n }\n\n ngOnInit() {\n\n const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';\n const port = (location.port) ? (':' + location.port) : '';\n\n this.websocket = new WebSocket(protocol + location.hostname + port + '/info');\n\n this.websocket.onopen = (event) => {\n console.log('Info websocket connected');\n };\n this.websocket.onclose = (event) => {\n console.log('Info websocket closed');\n };\n this.websocket.onerror = (event) => {\n console.log('Info websocket error');\n };\n this.websocket.onmessage = (event) => {\n console.log('Info websocket message');\n console.log(event.data);\n this.infoService.updateInfo(event.data);\n };\n\n this.restService.getOpenViduPublicUrl()\n .then(url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n })\n .catch(error => {\n console.error(error);\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n // On window closed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n ngOnDestroy() {\n // On component destroyed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n toggleTestVideo() {\n if (!this.session) {\n this.testVideo();\n } else {\n this.endTestVideo();\n }\n }\n\n testVideo() {\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n if (!this.openviduPublicUrl) {\n this.restService.getOpenViduPublicUrl()\n .then((url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }))\n .catch(error => {\n console.error(error);\n });\n } else {\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }\n }\n });\n }\n\n connectToSession(token: string) {\n this.msgChain = [];\n\n const OV = new OpenVidu();\n this.session = OV.initSession();\n\n this.testStatus = 'CONNECTING';\n this.testButton = 'Testing...';\n\n this.session.connect(token)\n .then(() => {\n\n this.testStatus = 'CONNECTED';\n\n const publisherRemote = OV.initPublisher('mirrored-video', {\n publishAudio: true,\n publishVideo: true,\n resolution: '640x480'\n },\n e => {\n if (!!e) {\n console.error(e);\n }\n }\n );\n\n publisherRemote.on('accessAllowed', () => {\n this.msgChain.push('Camera access allowed');\n });\n\n publisherRemote.on('accessDenied', () => {\n this.endTestVideo();\n this.msgChain.push('Camera access denied');\n });\n\n publisherRemote.on('videoElementCreated', (video) => {\n this.showSpinner = true;\n this.msgChain.push('Video element created');\n });\n\n publisherRemote.on('remoteVideoPlaying', (video) => {\n this.msgChain.push('Remote video playing');\n this.testButton = 'End test';\n this.testStatus = 'PLAYING';\n this.showSpinner = false;\n });\n\n publisherRemote.subscribeToRemote();\n this.session.publish(publisherRemote);\n\n })\n .catch(error => {\n if (error.code === 401) { // User unauthorized error. OpenVidu security is active\n this.endTestVideo();\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }\n });\n } else {\n console.error(error);\n }\n });\n }\n\n endTestVideo() {\n this.session.disconnect();\n this.session = null;\n this.testStatus = 'DISCONNECTED';\n this.testButton = 'Test';\n this.showSpinner = false;\n this.info = [];\n this.msgChain = [];\n }\n\n scrollToBottom(): void {\n try {\n if (!this.lockScroll) {\n this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;\n }\n } catch (err) {\n console.error('[Error]:' + err.toString());\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/dashboard.component.ts","module.exports = \".bounds {\\n background-color: black;\\n overflow: hidden;\\n cursor: none !important;\\n position: absolute;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n}\\n\\nvideo {\\n -o-object-fit: cover;\\n object-fit: cover;\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n}\\n\\n/*!\\n * Copyright (c) 2017 TokBox, Inc.\\n * Released under the MIT license\\n * http://opensource.org/licenses/MIT\\n */\\n\\n.custom-class {\\n min-height: 0px !important;\\n}\\n\\n/**\\n * OT Base styles\\n */\\n\\n/* Root OT object, this is where our CSS reset happens */\\n\\n.OT_root,\\n.OT_root * {\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n vertical-align: baseline;\\n}\\n\\n.OT_dialog-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_dialog-centering-child {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_dialog {\\n position: relative;\\n\\n -webkit-box-sizing: border-box;\\n\\n box-sizing: border-box;\\n max-width: 576px;\\n margin-right: auto;\\n margin-left: auto;\\n padding: 36px;\\n text-align: center; /* centers all the inline content */\\n\\n background-color: #363636;\\n color: #fff;\\n -webkit-box-shadow: 2px 4px 6px #999;\\n box-shadow: 2px 4px 6px #999;\\n font-family: 'Didact Gothic', sans-serif;\\n font-size: 13px;\\n line-height: 1.4;\\n}\\n\\n.OT_dialog * {\\n font-family: inherit;\\n -webkit-box-sizing: inherit;\\n box-sizing: inherit;\\n}\\n\\n.OT_closeButton {\\n color: #999999;\\n cursor: pointer;\\n font-size: 32px;\\n line-height: 36px;\\n position: absolute;\\n right: 18px;\\n top: 0;\\n}\\n\\n.OT_dialog-messages {\\n text-align: center;\\n}\\n\\n.OT_dialog-messages-main {\\n margin-bottom: 36px;\\n line-height: 36px;\\n\\n font-weight: 300;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-messages-minor {\\n margin-bottom: 18px;\\n\\n font-size: 13px;\\n line-height: 18px;\\n color: #A4A4A4;\\n}\\n\\n.OT_dialog-messages-minor strong {\\n color: #ffffff;\\n}\\n\\n.OT_dialog-actions-card {\\n display: inline-block;\\n}\\n\\n.OT_dialog-button-title {\\n margin-bottom: 18px;\\n line-height: 18px;\\n\\n font-weight: 300;\\n text-align: center;\\n font-size: 14px;\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title label {\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title a,\\n.OT_dialog-button-title a:link,\\n.OT_dialog-button-title a:active {\\n color: #02A1DE;\\n}\\n\\n.OT_dialog-button-title strong {\\n color: #ffffff;\\n font-weight: 100;\\n display: block;\\n}\\n\\n.OT_dialog-button {\\n display: inline-block;\\n\\n margin-bottom: 18px;\\n padding: 0 1em;\\n\\n background-color: #1CA3DC;\\n text-align: center;\\n cursor: pointer;\\n}\\n\\n.OT_dialog-button:disabled {\\n cursor: not-allowed;\\n opacity: 0.5;\\n}\\n\\n.OT_dialog-button-large {\\n line-height: 36px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n font-weight: 100;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-button-small {\\n line-height: 18px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n background-color: #444444;\\n color: #999999;\\n font-size: 16px;\\n}\\n\\n.OT_dialog-progress-bar {\\n display: inline-block; /* prevents margin collapse */\\n width: 100%;\\n margin-top: 5px;\\n margin-bottom: 41px;\\n\\n border: 1px solid #4E4E4E;\\n height: 8px;\\n}\\n\\n.OT_dialog-progress-bar-fill {\\n height: 100%;\\n\\n background-color: #29A4DA;\\n}\\n\\n.OT_dialog-plugin-upgrading .OT_dialog-plugin-upgrade-percentage {\\n line-height: 54px;\\n\\n font-size: 48px;\\n font-weight: 100;\\n}\\n\\n/* Helpers */\\n\\n.OT_centered {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n margin: 0;\\n}\\n\\n.OT_dialog-hidden {\\n display: none;\\n}\\n\\n.OT_dialog-button-block {\\n display: block;\\n}\\n\\n.OT_dialog-no-natural-margin {\\n margin-bottom: 0;\\n}\\n\\n/* Publisher and Subscriber styles */\\n\\n.OT_publisher, .OT_subscriber {\\n position: relative;\\n min-width: 48px;\\n min-height: 48px;\\n}\\n\\n.OT_publisher .OT_video-element,\\n.OT_subscriber .OT_video-element {\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n\\n -webkit-transform-origin: 0 0;\\n\\n transform-origin: 0 0;\\n}\\n\\n/* Styles that are applied when the video element should be mirrored */\\n\\n.OT_publisher.OT_mirrored .OT_video-element {\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n -webkit-transform-origin: 50% 50%;\\n transform-origin: 50% 50%;\\n}\\n\\n.OT_subscriber_error {\\n background-color: #000;\\n color: #fff;\\n text-align: center;\\n}\\n\\n.OT_subscriber_error > p {\\n padding: 20px;\\n}\\n\\n/* The publisher/subscriber name/mute background */\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar,\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name,\\n.OT_publisher .OT_archiving,\\n.OT_subscriber .OT_archiving,\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status,\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n -webkit-box-sizing: border-box;\\n -ms-box-sizing: border-box;\\n box-sizing: border-box;\\n top: 0;\\n left: 0;\\n right: 0;\\n display: block;\\n height: 34px;\\n position: absolute;\\n}\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar {\\n background: rgba(0, 0, 0, 0.4);\\n}\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n z-index: 1; /* required to get audio level meter underneath */\\n}\\n\\n/* The publisher/subscriber name panel/archiving status bar */\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n background-color: transparent;\\n color: #ffffff;\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n padding: 0 4px 0 36px;\\n}\\n\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n left: 34px;\\n padding: 0 4px;\\n color: rgba(255, 255, 255, 0.8);\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n}\\n\\n.OT_micro .OT_archiving-status,\\n.OT_micro:hover .OT_archiving-status,\\n.OT_mini .OT_archiving-status,\\n.OT_mini:hover .OT_archiving-status {\\n display: none;\\n}\\n\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n right: auto;\\n width: 34px;\\n height: 34px;\\n}\\n\\n.OT_archiving-light {\\n width: 7px;\\n height: 7px;\\n border-radius: 30px;\\n position: absolute;\\n top: 14px;\\n left: 14px;\\n background-color: #575757;\\n -webkit-box-shadow: 0 0 5px 1px #575757;\\n box-shadow: 0 0 5px 1px #575757;\\n}\\n\\n.OT_archiving-light.OT_active {\\n background-color: #970d13;\\n animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n -moz-animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n -moz-animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n.OT_mini .OT_bar,\\n.OT_bar.OT_mode-mini,\\n.OT_bar.OT_mode-mini-auto {\\n bottom: 0;\\n height: auto;\\n}\\n\\n.OT_mini .OT_name.OT_mode-off,\\n.OT_mini .OT_name.OT_mode-on,\\n.OT_mini .OT_name.OT_mode-auto,\\n.OT_mini:hover .OT_name.OT_mode-auto {\\n display: none;\\n}\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n left: 10px;\\n right: 37px;\\n height: 34px;\\n padding-left: 0;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n border: none;\\n cursor: pointer;\\n display: block;\\n position: absolute;\\n text-align: center;\\n text-indent: -9999em;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n right: 0;\\n top: 0;\\n border-left: 1px solid rgba(255, 255, 255, 0.2);\\n height: 36px;\\n width: 37px;\\n}\\n\\n.OT_mini .OT_mute,\\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber.OT_mini .OT_mute.OT_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HHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg==);\\n background-position: 9px 4px;\\n}\\n\\n.OT_subscriber .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);\\n background-position: 8px 7px;\\n}\\n\\n.OT_subscriber .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);\\n background-position: 7px 7px;\\n}\\n\\n/**\\n * Styles for display modes\\n *\\n * Note: It's important that these completely control the display and opacity\\n * attributes, no other selectors should atempt to change them.\\n */\\n\\n/* Default display mode transitions for various chrome elements */\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n -webkit-transition-property: top, bottom, opacity;\\n transition-property: top, bottom, opacity;\\n -webkit-transition-duration: 0.5s;\\n transition-duration: 0.5s;\\n -webkit-transition-timing-function: ease-in;\\n transition-timing-function: ease-in;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\\n top: -25px;\\n opacity: 0;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-auto,\\n.OT_publisher .OT_mute.OT_mode-mini-auto,\\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\\n top: auto;\\n bottom: -25px;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\\n top: 0;\\n opacity: 1;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-on,\\n.OT_mini:hover .OT_mute.OT_mode-auto,\\n.OT_mute.OT_mode-mini,\\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\\n top: auto;\\n bottom: 0;\\n opacity: 1;\\n}\\n\\n/* Contains the video element, used to fix video letter-boxing */\\n\\n.OT_widget-container {\\n width: 100%;\\n height: 100%;\\n position: absolute;\\n background-color: #000000;\\n overflow: hidden;\\n}\\n\\n/* Load animation */\\n\\n.OT_root .OT_video-loading {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n background-color: rgba(0, 0, 0, .75);\\n}\\n\\n.OT_root .OT_video-loading .OT_video-loading-spinner {\\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgy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ZW50PjxtYXNrIGlkPSJnIj48ZyBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjQwIj48cGF0aCBzdHJva2U9InVybCgjYSkiIGQ9Ik04Ni42LTUwYTEwMCAxMDAgMCAwIDEgMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2IpIiBkPSJNODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;\\n position: absolute;\\n width: 32px;\\n height: 32px;\\n left: 50%;\\n top: 50%;\\n margin-left: -16px;\\n margin-top: -16px;\\n -webkit-animation: OT_spin 2s linear infinite;\\n animation: OT_spin 2s linear infinite;\\n}\\n\\n@-webkit-keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.OT_publisher.OT_loading .OT_video-loading,\\n.OT_subscriber.OT_loading .OT_video-loading {\\n display: block;\\n}\\n\\n.OT_video-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_video-container {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_video-poster {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n opacity: .25;\\n\\n background-repeat: no-repeat;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\\n background-size: auto 76%;\\n}\\n\\n.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: cover;\\n object-fit: cover;\\n}\\n\\n/* Workaround for iOS freezing issue when cropping videos */\\n\\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\\n\\n@media only screen\\n and (orientation: portrait) {\\n .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: contain !important;\\n object-fit: contain !important;\\n }\\n}\\n\\n.OT_fit-mode-contain .OT_video-element {\\n -o-object-fit: contain;\\n object-fit: contain;\\n}\\n\\n.OT_fit-mode-cover .OT_video-poster {\\n background-position: center bottom;\\n}\\n\\n.OT_fit-mode-contain .OT_video-poster {\\n background-position: center;\\n}\\n\\n.OT_audio-level-meter {\\n position: absolute;\\n width: 25%;\\n max-width: 224px;\\n min-width: 21px;\\n top: 0;\\n right: 0;\\n overflow: hidden;\\n}\\n\\n.OT_audio-level-meter:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__bar {\\n position: absolute;\\n width: 192%; /* meter value can overflow of 8% */\\n height: 192%;\\n top: -96% /* half of the size */;\\n right: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_audio-level-meter__audio-only-img {\\n position: absolute;\\n top: 22%;\\n right: 15%;\\n width: 40%;\\n\\n opacity: .7;\\n\\n background: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzIDMuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTE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xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) no-repeat center;\\n}\\n\\n.OT_audio-level-meter__audio-only-img:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__value {\\n position: absolute;\\n border-radius: 50%;\\n background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\\n}\\n\\n.OT_audio-level-meter.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_audio-level-meter.OT_mode-on,\\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\\n display: block;\\n}\\n\\n.OT_audio-only.OT_publisher .OT_video-element,\\n.OT_audio-only.OT_subscriber .OT_video-element {\\n display: none;\\n}\\n\\n.OT_video-disabled-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: bottom right;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 3px;\\n right: 3px;\\n}\\n\\n.OT_video-disabled {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3Bx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fLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/AAMzewgGR8uCeWn77xzBxPxgzPRCDDMZ14bQ/3jqGKGoHf2Hjgx3kw5LbaJDYWb52t9FMgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg==);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-warning {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAu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eo1y64ih+vuQfsoTOeRFSJXa+SvyB90TUmdw49EjLaKpMQ0mzEeTzkWsd/oI6fzfiKM8gWg6X6OjpXstu5ZHnmIb0GFiu29MIUfUewkmVrEN3RqVQ/bY8FzNcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_audio-blocked-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n}\\n\\n.OT_audio-blocked {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 90px auto;\\n}\\n\\n.OT_container-audio-blocked {\\n cursor: pointer;\\n}\\n\\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\\n display: none;\\n}\\n\\n.OT_container-audio-blocked .OT_mute {\\n display: none;\\n}\\n\\n.OT_audio-blocked-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_video-unsupported {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 58px auto;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin-top: -30px;\\n}\\n\\n.OT_video-unsupported-bar {\\n display: none;\\n position: absolute;\\n width: 192%; /* copy the size of the audio meter bar for symmetry */\\n height: 192%;\\n top: -96% /* half of the size */;\\n left: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_video-unsupported-img {\\n display: none;\\n position: absolute;\\n top: 11%;\\n left: 15%;\\n width: 70%;\\n opacity: .7;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: 100% auto;\\n}\\n\\n.OT_video-unsupported-img:before {\\n /* makes the height of the container 93% of its width (90/97 px) */\\n content: '';\\n display: block;\\n padding-top: 93%;\\n}\\n\\n.OT_video-unsupported-text {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n text-align: center;\\n height: 100%;\\n margin-top: 40px;\\n}\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module chunks = main","module.exports = \"
\\n
\\n
\\n \\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener, ViewEncapsulation, ApplicationRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { OpenVidu, Session, Stream, Subscriber, StreamEvent } from 'openvidu-browser';\n\nimport { OpenViduLayout } from '../openvidu-layout';\n\n@Component({\n selector: 'app-layout-best-fit',\n templateUrl: './layout-best-fit.component.html',\n styleUrls: ['./layout-best-fit.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LayoutBestFitComponent implements OnInit, OnDestroy {\n\n openviduLayout: OpenViduLayout;\n sessionId: string;\n secret: string;\n\n session: Session;\n streams: Stream[] = [];\n\n layout: any;\n resizeTimeout;\n\n constructor(private route: ActivatedRoute, private appRef: ApplicationRef) {\n this.route.params.subscribe(params => {\n this.sessionId = params.sessionId;\n this.secret = params.secret;\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n this.leaveSession();\n }\n\n @HostListener('window:resize', ['$event'])\n sizeChange(event) {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.openviduLayout.updateLayout();\n }, 20);\n }\n\n ngOnDestroy() {\n this.leaveSession();\n }\n\n ngOnInit() {\n const OV = new OpenVidu();\n this.session = OV.initSession();\n\n this.session.on('streamCreated', (event: StreamEvent) => {\n const subscriber: Subscriber = this.session.subscribe(event.stream, '');\n this.addRemoteStream(event.stream);\n });\n\n this.session.on('streamDestroyed', (event: StreamEvent) => {\n event.preventDefault();\n this.deleteRemoteStream(event.stream);\n this.openviduLayout.updateLayout();\n });\n\n const token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';\n this.session.connect(token)\n .catch(error => {\n console.error(error);\n })\n\n this.openviduLayout = new OpenViduLayout();\n this.openviduLayout.initLayoutContainer(document.getElementById('layout'), {\n maxRatio: 3 / 2, // The narrowest ratio that will be used (default 2x3)\n minRatio: 9 / 16, // The widest ratio that will be used (default 16x9)\n fixedRatio: false, /* If this is true then the aspect ratio of the video is maintained\n and minRatio and maxRatio are ignored (default false) */\n bigClass: 'OV_big', // The class to add to elements that should be sized bigger\n bigPercentage: 0.8, // The maximum percentage of space the big ones should take up\n bigFixedRatio: false, // fixedRatio for the big ones\n bigMaxRatio: 3 / 2, // The narrowest ratio to use for the big elements (default 2x3)\n bigMinRatio: 9 / 16, // The widest ratio to use for the big elements (default 16x9)\n bigFirst: true, // Whether to place the big one in the top left (true) or bottom right\n animate: true // Whether you want to animate the transitions\n });\n }\n\n private addRemoteStream(stream: Stream): void {\n this.streams.push(stream);\n this.appRef.tick();\n }\n\n private deleteRemoteStream(stream: Stream): void {\n let index = -1;\n for (let i = 0; i < this.streams.length; i++) {\n if (this.streams[i].streamId === stream.streamId) {\n index = i;\n break;\n }\n }\n\n if (index > -1) {\n this.streams.splice(index, 1);\n }\n this.appRef.tick();\n }\n\n leaveSession() {\n if (this.session) { this.session.disconnect(); };\n this.streams = [];\n this.session = null;\n }\n\n onVideoPlaying(event) {\n const video: HTMLVideoElement = event.target;\n video.parentElement.parentElement.classList.remove('custom-class');\n this.openviduLayout.updateLayout();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","declare var $: any;\n\nexport interface OpenViduLayoutOptions {\n maxRatio: number;\n minRatio: number;\n fixedRatio: boolean;\n animate: any;\n bigClass: string;\n bigPercentage: any;\n bigFixedRatio: any;\n bigMaxRatio: any;\n bigMinRatio: any;\n bigFirst: any;\n}\n\nexport class OpenViduLayout {\n\n private layoutContainer: HTMLElement;\n private opts: OpenViduLayoutOptions;\n\n private fixAspectRatio(elem: HTMLVideoElement, width: number) {\n const sub: HTMLVideoElement = elem.querySelector('.OT_root');\n if (sub) {\n // If this is the parent of a subscriber or publisher then we need\n // to force the mutation observer on the publisher or subscriber to\n // trigger to get it to fix it's layout\n const oldWidth = sub.style.width;\n sub.style.width = width + 'px';\n // sub.style.height = height + 'px';\n sub.style.width = oldWidth || '';\n }\n }\n\n private positionElement(elem: HTMLVideoElement, x: number, y: number, width: number, height: number, animate: any) {\n const targetPosition = {\n left: x + 'px',\n top: y + 'px',\n width: width + 'px',\n height: height + 'px'\n };\n\n this.fixAspectRatio(elem, width);\n\n if (animate && $) {\n $(elem).stop();\n $(elem).animate(targetPosition, animate.duration || 200, animate.easing || 'swing',\n () => {\n this.fixAspectRatio(elem, width);\n if (animate.complete) { animate.complete.call(this); }\n });\n } else {\n $(elem).css(targetPosition);\n }\n this.fixAspectRatio(elem, width);\n }\n\n private getVideoRatio(elem: HTMLVideoElement) {\n if (!elem) {\n return 3 / 4;\n }\n const video: HTMLVideoElement = elem.querySelector('video');\n if (video && video.videoHeight && video.videoWidth) {\n return video.videoHeight / video.videoWidth;\n } else if (elem.videoHeight && elem.videoWidth) {\n return elem.videoHeight / elem.videoWidth;\n }\n return 3 / 4;\n }\n\n private getCSSNumber(elem: HTMLElement, prop: string) {\n const cssStr = $(elem).css(prop);\n return cssStr ? parseInt(cssStr, 10) : 0;\n }\n\n // Really cheap UUID function\n private cheapUUID() {\n return (Math.random() * 100000000).toFixed(0);\n }\n\n private getHeight(elem: HTMLElement) {\n const heightStr = $(elem).css('height');\n return heightStr ? parseInt(heightStr, 10) : 0;\n }\n\n private getWidth(elem: HTMLElement) {\n const widthStr = $(elem).css('width');\n return widthStr ? parseInt(widthStr, 10) : 0;\n }\n\n private getBestDimensions(minR: number, maxR: number, count: number, WIDTH: number, HEIGHT: number, targetHeight: number) {\n let maxArea,\n targetCols,\n targetRows,\n targetWidth,\n tWidth,\n tHeight,\n tRatio;\n\n // Iterate through every possible combination of rows and columns\n // and see which one has the least amount of whitespace\n for (let i = 1; i <= count; i++) {\n const colsAux = i;\n const rowsAux = Math.ceil(count / colsAux);\n\n // Try taking up the whole height and width\n tHeight = Math.floor(HEIGHT / rowsAux);\n tWidth = Math.floor(WIDTH / colsAux);\n\n tRatio = tHeight / tWidth;\n if (tRatio > maxR) {\n // We went over decrease the height\n tRatio = maxR;\n tHeight = tWidth * tRatio;\n } else if (tRatio < minR) {\n // We went under decrease the width\n tRatio = minR;\n tWidth = tHeight / tRatio;\n }\n\n const area = (tWidth * tHeight) * count;\n\n // If this width and height takes up the most space then we're going with that\n if (maxArea === undefined || (area > maxArea)) {\n maxArea = area;\n targetHeight = tHeight;\n targetWidth = tWidth;\n targetCols = colsAux;\n targetRows = rowsAux;\n }\n }\n return {\n maxArea: maxArea,\n targetCols: targetCols,\n targetRows: targetRows,\n targetHeight: targetHeight,\n targetWidth: targetWidth,\n ratio: targetHeight / targetWidth\n };\n };\n\n private arrange(children: HTMLVideoElement[], WIDTH: number, HEIGHT: number, offsetLeft: number, offsetTop: number, fixedRatio: boolean,\n minRatio: number, maxRatio: number, animate: any) {\n\n let targetHeight;\n\n const count = children.length;\n let dimensions;\n\n if (!fixedRatio) {\n dimensions = this.getBestDimensions(minRatio, maxRatio, count, WIDTH, HEIGHT, targetHeight);\n } else {\n // Use the ratio of the first video element we find to approximate\n const ratio = this.getVideoRatio(children.length > 0 ? children[0] : null);\n dimensions = this.getBestDimensions(ratio, ratio, count, WIDTH, HEIGHT, targetHeight);\n }\n\n // Loop through each stream in the container and place it inside\n let x = 0,\n y = 0;\n const rows = [];\n let row;\n // Iterate through the children and create an array with a new item for each row\n // and calculate the width of each row so that we know if we go over the size and need\n // to adjust\n for (let i = 0; i < children.length; i++) {\n if (i % dimensions.targetCols === 0) {\n // This is a new row\n row = {\n children: [],\n width: 0,\n height: 0\n };\n rows.push(row);\n }\n const elem: HTMLVideoElement = children[i];\n row.children.push(elem);\n let targetWidth = dimensions.targetWidth;\n targetHeight = dimensions.targetHeight;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = targetHeight / this.getVideoRatio(elem);\n }\n row.width += targetWidth;\n row.height = targetHeight;\n }\n // Calculate total row height adjusting if we go too wide\n let totalRowHeight = 0;\n let remainingShortRows = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width > WIDTH) {\n // Went over on the width, need to adjust the height proportionally\n row.height = Math.floor(row.height * (WIDTH / row.width));\n row.width = WIDTH;\n } else if (row.width < WIDTH) {\n remainingShortRows += 1;\n }\n totalRowHeight += row.height;\n }\n if (totalRowHeight < HEIGHT && remainingShortRows > 0) {\n // We can grow some of the rows, we're not taking up the whole height\n let remainingHeightDiff = HEIGHT - totalRowHeight;\n totalRowHeight = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width < WIDTH) {\n // Evenly distribute the extra height between the short rows\n let extraHeight = remainingHeightDiff / remainingShortRows;\n if ((extraHeight / row.height) > ((WIDTH - row.width) / row.width)) {\n // We can't go that big or we'll go too wide\n extraHeight = Math.floor(((WIDTH - row.width) / row.width) * row.height);\n }\n row.width += Math.floor((extraHeight / row.height) * row.width);\n row.height += extraHeight;\n remainingHeightDiff -= extraHeight;\n remainingShortRows -= 1;\n }\n totalRowHeight += row.height;\n }\n }\n // vertical centering\n y = ((HEIGHT - (totalRowHeight)) / 2);\n // Iterate through each row and place each child\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n // center the row\n const rowMarginLeft = ((WIDTH - row.width) / 2);\n x = rowMarginLeft;\n for (let j = 0; j < row.children.length; j++) {\n const elem: HTMLVideoElement = row.children[j];\n\n let targetWidth = dimensions.targetWidth;\n targetHeight = row.height;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = Math.floor(targetHeight / this.getVideoRatio(elem));\n }\n elem.style.position = 'absolute';\n // $(elem).css('position', 'absolute');\n const actualWidth = targetWidth - this.getCSSNumber(elem, 'paddingLeft') -\n this.getCSSNumber(elem, 'paddingRight') -\n this.getCSSNumber(elem, 'marginLeft') -\n this.getCSSNumber(elem, 'marginRight') -\n this.getCSSNumber(elem, 'borderLeft') -\n this.getCSSNumber(elem, 'borderRight');\n\n const actualHeight = targetHeight - this.getCSSNumber(elem, 'paddingTop') -\n this.getCSSNumber(elem, 'paddingBottom') -\n this.getCSSNumber(elem, 'marginTop') -\n this.getCSSNumber(elem, 'marginBottom') -\n this.getCSSNumber(elem, 'borderTop') -\n this.getCSSNumber(elem, 'borderBottom');\n\n this.positionElement(elem, x + offsetLeft, y + offsetTop, actualWidth, actualHeight, animate);\n x += targetWidth;\n }\n y += targetHeight;\n }\n }\n\n private filterDisplayNone(element: HTMLElement) {\n return element.style.display !== 'none';\n }\n\n updateLayout() {\n if (this.layoutContainer.style.display === 'none') {\n return;\n }\n let id = this.layoutContainer.id;\n if (!id) {\n id = 'OT_' + this.cheapUUID();\n this.layoutContainer.id = id;\n }\n\n const HEIGHT = this.getHeight(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderTop') -\n this.getCSSNumber(this.layoutContainer, 'borderBottom');\n const WIDTH = this.getWidth(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderLeft') -\n this.getCSSNumber(this.layoutContainer, 'borderRight');\n\n const availableRatio = HEIGHT / WIDTH;\n\n let offsetLeft = 0;\n let offsetTop = 0;\n let bigOffsetTop = 0;\n let bigOffsetLeft = 0;\n\n const bigOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>.' + this.opts.bigClass),\n this.filterDisplayNone);\n const smallOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>*:not(.' + this.opts.bigClass + ')'),\n this.filterDisplayNone);\n\n if (bigOnes.length > 0 && smallOnes.length > 0) {\n let bigWidth, bigHeight;\n\n if (availableRatio > this.getVideoRatio(bigOnes[0])) {\n // We are tall, going to take up the whole width and arrange small\n // guys at the bottom\n bigWidth = WIDTH;\n bigHeight = Math.floor(HEIGHT * this.opts.bigPercentage);\n offsetTop = bigHeight;\n bigOffsetTop = HEIGHT - offsetTop;\n } else {\n // We are wide, going to take up the whole height and arrange the small\n // guys on the right\n bigHeight = HEIGHT;\n bigWidth = Math.floor(WIDTH * this.opts.bigPercentage);\n offsetLeft = bigWidth;\n bigOffsetLeft = WIDTH - offsetLeft;\n }\n if (this.opts.bigFirst) {\n this.arrange(bigOnes, bigWidth, bigHeight, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, 0, 0, this.opts.fixedRatio,\n this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n this.arrange(bigOnes, bigWidth, bigHeight, bigOffsetLeft, bigOffsetTop,\n this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate);\n }\n } else if (bigOnes.length > 0 && smallOnes.length === 0) {\n this.\n // We only have one bigOne just center it\n arrange(bigOnes, WIDTH, HEIGHT, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n }\n }\n\n initLayoutContainer(container, opts) {\n this.opts = {\n maxRatio: (opts.maxRatio != null) ? opts.maxRatio : 3 / 2,\n minRatio: (opts.minRatio != null) ? opts.minRatio : 9 / 16,\n fixedRatio: (opts.fixedRatio != null) ? opts.fixedRatio : false,\n animate: (opts.animate != null) ? opts.animate : false,\n bigClass: (opts.bigClass != null) ? opts.bigClass : 'OT_big',\n bigPercentage: (opts.bigPercentage != null) ? opts.bigPercentage : 0.8,\n bigFixedRatio: (opts.bigFixedRatio != null) ? opts.bigFixedRatio : false,\n bigMaxRatio: (opts.bigMaxRatio != null) ? opts.bigMaxRatio : 3 / 2,\n bigMinRatio: (opts.bigMinRatio != null) ? opts.bigMinRatio : 9 / 16,\n bigFirst: (opts.bigFirst != null) ? opts.bigFirst : true\n };\n this.layoutContainer = typeof (container) === 'string' ? $(container) : container;\n }\n\n setLayoutOptions(options: OpenViduLayoutOptions) {\n this.opts = options;\n }\n\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/openvidu-layout.ts","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.css\n// module id = ./src/app/components/session-details/session-details.component.css\n// module chunks = main","module.exports = \"

\\n session-details works!\\n

\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.html\n// module id = ./src/app/components/session-details/session-details.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-session-details',\n templateUrl: './session-details.component.html',\n styleUrls: ['./session-details.component.css']\n})\nexport class SessionDetailsComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/session-details/session-details.component.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class InfoService {\n\n info: string;\n newInfo$: Subject;\n\n constructor() {\n this.newInfo$ = new Subject();\n }\n\n getInfo() {\n return this.info;\n }\n\n updateInfo(info: string) {\n this.info = info;\n this.newInfo$.next(info);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/info.service.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class RestService {\n\n private openviduPublicUrl: string;\n\n getOpenViduPublicUrl(): Promise {\n return new Promise((resolve, reject) => {\n if (!!this.openviduPublicUrl) {\n resolve(this.openviduPublicUrl);\n } else {\n const url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') +\n '/config/openvidu-publicurl';\n const http = new XMLHttpRequest();\n\n http.onreadystatechange = () => {\n if (http.readyState === 4) {\n if (http.status === 200) {\n this.openviduPublicUrl = http.responseText;\n resolve(http.responseText);\n } else {\n reject('Error getting OpenVidu publicurl');\n }\n };\n }\n http.open('GET', url, true);\n http.send();\n }\n });\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/rest.service.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.ts"],"sourceRoot":"webpack:///"} \ No newline at end of file +{"version":3,"sources":["/opt/openvidu-browser/lib/OpenVidu/Connection.js","/opt/openvidu-browser/lib/OpenVidu/LocalRecorder.js","/opt/openvidu-browser/lib/OpenVidu/OpenVidu.js","/opt/openvidu-browser/lib/OpenVidu/Publisher.js","/opt/openvidu-browser/lib/OpenVidu/Session.js","/opt/openvidu-browser/lib/OpenVidu/Stream.js","/opt/openvidu-browser/lib/OpenVidu/Subscriber.js","/opt/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js","/opt/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js","/opt/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/Event.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js","/opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js","/opt/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js","/opt/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js","/opt/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js","/opt/openvidu-browser/lib/index.js","/opt/openvidu-browser/node_modules/freeice/index.js","/opt/openvidu-browser/node_modules/freeice/stun.json","/opt/openvidu-browser/node_modules/freeice/turn.json","/opt/openvidu-browser/node_modules/hark/hark.js","/opt/openvidu-browser/node_modules/inherits/inherits_browser.js","/opt/openvidu-browser/node_modules/merge/merge.js","/opt/openvidu-browser/node_modules/normalice/index.js","/opt/openvidu-browser/node_modules/platform/platform.js","/opt/openvidu-browser/node_modules/sdp-transform/lib/grammar.js","/opt/openvidu-browser/node_modules/sdp-transform/lib/index.js","/opt/openvidu-browser/node_modules/sdp-transform/lib/parser.js","/opt/openvidu-browser/node_modules/sdp-transform/lib/writer.js","/opt/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js","/opt/openvidu-browser/node_modules/sdp-translator/lib/index.js","/opt/openvidu-browser/node_modules/sdp-translator/lib/interop.js","/opt/openvidu-browser/node_modules/sdp-translator/lib/transform.js","/opt/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js","/opt/openvidu-browser/node_modules/uuid/index.js","/opt/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js","/opt/openvidu-browser/node_modules/uuid/lib/rng-browser.js","/opt/openvidu-browser/node_modules/uuid/v1.js","/opt/openvidu-browser/node_modules/uuid/v4.js","/opt/openvidu-browser/node_modules/wildemitter/wildemitter.js","/opt/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js","./src/$_lazy_route_resource lazy","./src/app/app.component.css","./src/app/app.component.html","./src/app/app.component.ts","./src/app/app.material.module.ts","./src/app/app.module.ts","./src/app/app.routing.ts","./src/app/components/dashboard/credentials-dialog.component.ts","./src/app/components/dashboard/dashboard.component.css","./src/app/components/dashboard/dashboard.component.html","./src/app/components/dashboard/dashboard.component.ts","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html","./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","./src/app/components/layouts/openvidu-layout.ts","./src/app/components/session-details/session-details.component.css","./src/app/components/session-details/session-details.component.html","./src/app/components/session-details/session-details.component.ts","./src/app/services/info.service.ts","./src/app/services/rest.service.ts","./src/environments/environment.ts","./src/main.ts"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE,mCAAmC,uBAAuB;AAC1D;AACA,uEAAuE;AACvE,mCAAmC,uBAAuB;AAC1D;AACA,uEAAuE;AACvE,mCAAmC,uBAAuB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,EAAE,wBAAwB,YAAY,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACtUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,qCAAqC;AACrC,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY,gCAAgC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gEAAgE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;;;ACzgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,sDAAsD,EAAE;AACjH;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;AC5dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;;AC5xBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;;ACliBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qFAAqF;AACtF,8C;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kFAAkF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E,2C;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,CAAC;AACD;AACA,2C;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA,CAAC;AACD;AACA,kD;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,CAAC;AACD;AACA,0C;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oD;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,QAAQ;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA,CAAC;AACD;AACA,6C;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;AC5CA;AACA;AACA,iC;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;;AChMA;AACA;AACA,iC;;;;;;;;8CCFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qD;;;;;;;;ACrKA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kCAAkC;AACjF,+CAA+C,kCAAkC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACleA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACVA;AACA;AACA;AACA;AACA,iC;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;AC1fA;AACA;AACA,iC;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iD;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4C;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yDAAyD,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,oBAAoB,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;ACtCA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;;AAEA,6BAA6B;AAC7B,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;ACxGA,6V;;;;;;;ACAA,mB;;;;;;;ACAA;;AAEA;AACA;AACA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD,mCAAmC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,m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;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;;;;;;;sDC3DA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,aAAa,OAAO;AACpB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,SAAS;AACtB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA,eAAe,OAAO;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO,yCAAyC;AAChD;AACA,OAAO,8CAA8C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,+CAA+C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,2DAA2D;AAClE;AACA,OAAO,4DAA4D;AACnE;AACA;AACA,OAAO,4CAA4C;AACnD;AACA;AACA;AACA;AACA;AACA,OAAO,4CAA4C;AACnD;AACA,OAAO,qCAAqC;AAC5C;AACA,OAAO,wDAAwD;AAC/D,OAAO,yDAAyD;AAChE,OAAO,iDAAiD;AACxD,OAAO,uCAAuC;AAC9C,OAAO,mCAAmC;AAC1C;AACA;;AAEA;AACA;AACA,OAAO,2CAA2C;AAClD;AACA,OAAO,6CAA6C;AACpD,OAAO,8CAA8C;AACrD,OAAO,8CAA8C;AACrD,OAAO,8CAA8C;AACrD,OAAO,6CAA6C;AACpD,OAAO,6CAA6C;AACpD,OAAO,kDAAkD;AACzD,OAAO,6CAA6C;AACpD,OAAO,kDAAkD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAmE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA;AACA,OAAO,yCAAyC;AAChD;AACA;;AAEA;AACA;AACA,gBAAgB,oCAAoC;AACpD,kBAAkB;AAClB,iBAAiB,gCAAgC;AACjD,eAAe,mBAAmB;AAClC,yBAAyB,YAAY;AACrC,qBAAqB,gBAAgB;AACrC,iBAAiB,6BAA6B;AAC9C,aAAa,gBAAgB;AAC7B,eAAe;AACf,cAAc;AACd,oBAAoB,2BAA2B;AAC/C,mBAAmB,YAAY;AAC/B,mBAAmB,wBAAwB;AAC3C,gBAAgB,aAAa;AAC7B,kBAAkB,gEAAgE;AAClF,eAAe;AACf,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO,0CAA0C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kCAAkC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA,8BAA8B,eAAe;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AAAA;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;AChsCD;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,UAAU;AACV,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC,UAAU;AACjD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;AChQD;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+CAA+C;;AAE/C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,uCAAuC;AACvC;;AAEA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,4BAA4B;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC5FA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gBAAgB,KAAK,KAAK;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;;AAEd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,yBAAyB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;;;;;;;ACl3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA,6BAA6B;AAC7B,kDAAkD;;AAElD;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;AACA;;AAEA;;AAEA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,8CAA8C,EAAE;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oDAAoD,IAAI;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+CAA+C,IAAI,kCAAkC,IAAI;AACzF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,sDAAsD;AACtD;;AAEA,sBAAsB;AACtB;;AAEA,+BAA+B;AAC/B;;AAEA;AACA,kCAAkC,MAAM;AACxC;;AAEA,+CAA+C;AAC/C;;AAEA,uBAAuB;AACvB;;AAEA,+BAA+B,8BAA8B,gDAAgD;AAC7G;AACA;AACA;;AAEA;;AAEA,+BAA+B,QAAQ;AACvC;;AAEA;AACA;;AAEA,sBAAsB,IAAI;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,wCAAwC,KAAK;AAC7C;;AAEA;AACA;AACA;AACA,iCAAiC,EAAE;AACnC;;AAEA;AACA;AACA;;AAEA,uBAAuB;AACvB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,oBAAoB;AACpB;AACA,6DAA6D;AAC7D;AACA;;AAEA;AACA;;AAEA,kCAAkC;AAClC;AACA;;AAEA,yBAAyB;AACzB;;AAEA,mBAAmB,uBAAuB;AAC1C;AACA,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C1B;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA,yCAAyC;AACzC;AACA,0BAA0B;AAC1B;AACA,+BAA+B;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,IAAI;AAChC;;AAEA;AACA;;AAEA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,wDAAwD;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AAAA;AACb,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;AC/iCD;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC/BA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5GA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5BA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;AAED;;AAEA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACxJA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,SAAS;AACxB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,MAAM;AACrB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,KAAK;AACpB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAE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AG,CAAC,CAAC,CAAC;4BACtB,KAAI,CAAC,iBAAiB,GAAG,MAAI,CAAC,YAAY,CAAC;4BAC3C,OAAO,CAAC,MAAI,CAAC,YAAY,CAAC,CAAC;wBAC/B,CAAC;wBAAC,IAAI,CAAC,CAAC;4BACJ,MAAM,CAAC,kCAAkC,CAAC,CAAC;wBAC/C,CAAC;oBACL,CAAC;oBAAA,CAAC;gBACN,CAAC;gBACD,MAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;gBAC5B,MAAI,CAAC,IAAI,EAAE,CAAC;YAChB,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IA3BQ,WAAW;QADvB,yEAAU,EAAE;OACA,WAAW,CA6BvB;IAAD,kBAAC;CAAA;AA7BuB;;;;;;;;;ACJxB;AAAA,mFAAmF;AACnF,8FAA8F;AAC9F,yEAAyE;AACzE,gFAAgF;AAEzE,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;CAClB,CAAC;;;;;;;;;;;;;;ACP6C;AAC4B;AAE9B;AACY;AAEzD,EAAE,CAAC,CAAC,8EAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,+EAAc,EAAE,CAAC;AACnB,CAAC;AAED,yGAAsB,EAAE,CAAC,eAAe,CAAC,kEAAS,CAAC,CAAC","file":"main.bundle.js","sourcesContent":["\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Stream_1 = require(\"./Stream\");\n/**\n * Represents each one of the user's connection to the session (the local one and other user's connections).\n * Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection\n */\nvar Connection = /** @class */ (function () {\n /**\n * @hidden\n */\n function Connection(session, opts) {\n this.session = session;\n /**\n * @hidden\n */\n this.disposed = false;\n var msg = \"'Connection' created \";\n if (!!opts) {\n msg += \"(remote) with 'connectionId' [\" + opts.id + ']';\n }\n else {\n msg += '(local)';\n }\n console.info(msg);\n this.options = opts;\n if (!!opts) {\n // Connection is remote\n this.connectionId = opts.id;\n if (opts.metadata) {\n this.data = opts.metadata;\n }\n if (opts.streams) {\n this.initRemoteStreams(opts.streams);\n }\n }\n this.creationTime = new Date().getTime();\n }\n /* Hidden methods */\n /**\n * @hidden\n */\n Connection.prototype.sendIceCandidate = function (candidate) {\n console.debug((!!this.stream.outboundStreamOpts ? 'Local' : 'Remote'), 'candidate for', this.connectionId, JSON.stringify(candidate));\n this.session.openvidu.sendRequest('onIceCandidate', {\n endpointName: this.connectionId,\n candidate: candidate.candidate,\n sdpMid: candidate.sdpMid,\n sdpMLineIndex: candidate.sdpMLineIndex\n }, function (error, response) {\n if (error) {\n console.error('Error sending ICE candidate: '\n + JSON.stringify(error));\n }\n });\n };\n /**\n * @hidden\n */\n Connection.prototype.initRemoteStreams = function (options) {\n var _this = this;\n // This is ready for supporting multiple streams per Connection object. Right now the loop will always run just once\n // this.stream should also be replaced by a collection of streams to support multiple streams per Connection\n options.forEach(function (opts) {\n var streamOptions = {\n id: opts.id,\n connection: _this,\n frameRate: opts.frameRate,\n recvAudio: opts.audioActive,\n recvVideo: opts.videoActive,\n typeOfVideo: opts.typeOfVideo\n };\n var stream = new Stream_1.Stream(_this.session, streamOptions);\n _this.addStream(stream);\n });\n console.info(\"Remote 'Connection' with 'connectionId' [\" + this.connectionId + '] is now configured for receiving Streams with options: ', this.stream.inboundStreamOpts);\n };\n /**\n * @hidden\n */\n Connection.prototype.addStream = function (stream) {\n stream.connection = this;\n this.stream = stream;\n };\n /**\n * @hidden\n */\n Connection.prototype.removeStream = function (streamId) {\n delete this.stream;\n };\n /**\n * @hidden\n */\n Connection.prototype.dispose = function () {\n if (!!this.stream) {\n delete this.stream;\n }\n this.disposed = true;\n };\n return Connection;\n}());\nexports.Connection = Connection;\n//# sourceMappingURL=Connection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/Connection.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Connection.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorderState_1 = require(\"../OpenViduInternal/Enums/LocalRecorderState\");\n/**\n * Easy recording of [[Stream]] objects straightaway from the browser.\n *\n * > WARNING: Performing browser local recording of **remote streams** may cause some troubles. A long waiting time may be required after calling _LocalRecorder.stop()_ in this case\n */\nvar LocalRecorder = /** @class */ (function () {\n /**\n * @hidden\n */\n function LocalRecorder(stream) {\n this.stream = stream;\n this.chunks = [];\n this.count = 0;\n this.connectionId = (!!this.stream.connection) ? this.stream.connection.connectionId : 'default-connection';\n this.id = this.stream.streamId + '_' + this.connectionId + '_localrecord';\n this.state = LocalRecorderState_1.LocalRecorderState.READY;\n }\n /**\n * Starts the recording of the Stream. [[state]] property must be `READY`. After method succeeds is set to `RECORDING`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully started and rejected with an Error object if not\n */\n LocalRecorder.prototype.record = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (typeof MediaRecorder === 'undefined') {\n console.error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder');\n throw (Error('MediaRecorder not supported on your browser. See compatibility in https://caniuse.com/#search=MediaRecorder'));\n }\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.READY) {\n throw (Error('\\'LocalRecord.record()\\' needs \\'LocalRecord.state\\' to be \\'READY\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.clean()\\' or init a new LocalRecorder before'));\n }\n console.log(\"Starting local recording of stream '\" + _this.stream.streamId + \"' of connection '\" + _this.connectionId + \"'\");\n if (typeof MediaRecorder.isTypeSupported === 'function') {\n var options = void 0;\n if (MediaRecorder.isTypeSupported('video/webm;codecs=vp9')) {\n options = { mimeType: 'video/webm;codecs=vp9' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=h264')) {\n options = { mimeType: 'video/webm;codecs=h264' };\n }\n else if (MediaRecorder.isTypeSupported('video/webm;codecs=vp8')) {\n options = { mimeType: 'video/webm;codecs=vp8' };\n }\n console.log('Using mimeType ' + options.mimeType);\n _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream(), options);\n }\n else {\n console.warn('isTypeSupported is not supported, using default codecs for browser');\n _this.mediaRecorder = new MediaRecorder(_this.stream.getMediaStream());\n }\n _this.mediaRecorder.start(10);\n }\n catch (err) {\n reject(err);\n }\n _this.mediaRecorder.ondataavailable = function (e) {\n _this.chunks.push(e.data);\n };\n _this.mediaRecorder.onerror = function (e) {\n console.error('MediaRecorder error: ', e);\n };\n _this.mediaRecorder.onstart = function () {\n console.log('MediaRecorder started (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n };\n _this.mediaRecorder.onpause = function () {\n console.log('MediaRecorder paused (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onresume = function () {\n console.log('MediaRecorder resumed (state=' + _this.mediaRecorder.state + ')');\n };\n _this.mediaRecorder.onwarning = function (e) {\n console.log('MediaRecorder warning: ' + e);\n };\n _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING;\n resolve();\n });\n };\n /**\n * Ends the recording of the Stream. [[state]] property must be `RECORDING` or `PAUSED`. After method succeeds is set to `FINISHED`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording successfully stopped and rejected with an Error object if not\n */\n LocalRecorder.prototype.stop = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state === LocalRecorderState_1.LocalRecorderState.READY || _this.state === LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.stop()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' or \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' before'));\n }\n _this.mediaRecorder.onstop = function () {\n _this.onStopDefault();\n resolve();\n };\n _this.mediaRecorder.stop();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Pauses the recording of the Stream. [[state]] property must be `RECORDING`. After method succeeds is set to `PAUSED`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully paused and rejected with an Error object if not\n */\n LocalRecorder.prototype.pause = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.RECORDING) {\n reject(Error('\\'LocalRecord.pause()\\' needs \\'LocalRecord.state\\' to be \\'RECORDING\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.start()\\' or \\'LocalRecorder.resume()\\' before'));\n }\n _this.mediaRecorder.pause();\n _this.state = LocalRecorderState_1.LocalRecorderState.PAUSED;\n }\n catch (error) {\n reject(error);\n }\n });\n };\n /**\n * Resumes the recording of the Stream. [[state]] property must be `PAUSED`. After method succeeds is set to `RECORDING`\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the recording was successfully resumed and rejected with an Error object if not\n */\n LocalRecorder.prototype.resume = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.PAUSED) {\n throw (Error('\\'LocalRecord.resume()\\' needs \\'LocalRecord.state\\' to be \\'PAUSED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.pause()\\' before'));\n }\n _this.mediaRecorder.resume();\n _this.state = LocalRecorderState_1.LocalRecorderState.RECORDING;\n }\n catch (error) {\n reject(error);\n }\n });\n };\n /**\n * Previews the recording, appending a new HTMLVideoElement to element with id `parentId`. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.preview = function (parentElement) {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.preview()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n this.videoPreview = document.createElement('video');\n this.videoPreview.id = this.id;\n this.videoPreview.autoplay = true;\n if (typeof parentElement === 'string') {\n this.htmlParentElementId = parentElement;\n var parentElementDom = document.getElementById(parentElement);\n if (parentElementDom) {\n this.videoPreview = parentElementDom.appendChild(this.videoPreview);\n }\n }\n else {\n this.htmlParentElementId = parentElement.id;\n this.videoPreview = parentElement.appendChild(this.videoPreview);\n }\n this.videoPreview.src = this.videoPreviewSrc;\n return this.videoPreview;\n };\n /**\n * Gracefully stops and cleans the current recording (WARNING: it is completely dismissed). Sets [[state]] to `READY` so the recording can start again\n */\n LocalRecorder.prototype.clean = function () {\n var _this = this;\n var f = function () {\n delete _this.blob;\n _this.chunks = [];\n _this.count = 0;\n delete _this.mediaRecorder;\n _this.state = LocalRecorderState_1.LocalRecorderState.READY;\n };\n if (this.state === LocalRecorderState_1.LocalRecorderState.RECORDING || this.state === LocalRecorderState_1.LocalRecorderState.PAUSED) {\n this.stop().then(function () { return f(); })[\"catch\"](function () { return f(); });\n }\n else {\n f();\n }\n };\n /**\n * Downloads the recorded video through the browser. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.download = function () {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('\\'LocalRecord.download()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var a = document.createElement('a');\n a.style.display = 'none';\n document.body.appendChild(a);\n var url = window.URL.createObjectURL(this.blob);\n a.href = url;\n a.download = this.id + '.webm';\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n }\n };\n /**\n * Gets the raw Blob file. Methods preview, download, uploadAsBinary and uploadAsMultipartfile use this same file to perform their specific actions. [[state]] property must be `FINISHED`\n */\n LocalRecorder.prototype.getBlob = function () {\n if (this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n throw (Error('Call \\'LocalRecord.stop()\\' before getting Blob file'));\n }\n else {\n return this.blob;\n }\n };\n /**\n * Uploads the recorded video as a binary file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:\n * ```\n * var headers = {\n * \"Cookie\": \"$Version=1; Skin=new;\",\n * \"Authorization\":\"Basic QWxhZGpbjpuIHNlctZQ==\"\n * }\n * ```\n * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not\n */\n LocalRecorder.prototype.uploadAsBinary = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n reject(Error('\\'LocalRecord.uploadAsBinary()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_1 = new XMLHttpRequest();\n http_1.open('POST', endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_1.setRequestHeader(key, headers[key]);\n }\n }\n http_1.onreadystatechange = function () {\n if (http_1.readyState === 4) {\n if (http_1.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_1.responseText);\n }\n else {\n reject(http_1.status);\n }\n }\n };\n http_1.send(_this.blob);\n }\n });\n };\n /**\n * Uploads the recorded video as a multipart file performing an HTTP/POST operation to URL `endpoint`. [[state]] property must be `FINISHED`. Optional HTTP headers can be passed as second parameter. For example:\n * ```\n * var headers = {\n * \"Cookie\": \"$Version=1; Skin=new;\",\n * \"Authorization\":\"Basic QWxhZGpbjpuIHNlctZQ==\"\n * }\n * ```\n * @returns A Promise (to which you can optionally subscribe to) that is resolved with the `http.responseText` from server if the operation was successful and rejected with the failed `http.status` if not:\n */\n LocalRecorder.prototype.uploadAsMultipartfile = function (endpoint, headers) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.state !== LocalRecorderState_1.LocalRecorderState.FINISHED) {\n reject(Error('\\'LocalRecord.uploadAsMultipartfile()\\' needs \\'LocalRecord.state\\' to be \\'FINISHED\\' (current value: \\'' + _this.state + '\\'). Call \\'LocalRecorder.stop()\\' before'));\n }\n else {\n var http_2 = new XMLHttpRequest();\n http_2.open('POST', endpoint, true);\n if (typeof headers === 'object') {\n for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {\n var key = _a[_i];\n http_2.setRequestHeader(key, headers[key]);\n }\n }\n var sendable = new FormData();\n sendable.append('file', _this.blob, _this.id + '.webm');\n http_2.onreadystatechange = function () {\n if (http_2.readyState === 4) {\n if (http_2.status.toString().charAt(0) === '2') {\n // Success response from server (HTTP status standard: 2XX is success)\n resolve(http_2.responseText);\n }\n else {\n reject(http_2.status);\n }\n }\n };\n http_2.send(sendable);\n }\n });\n };\n /* Private methods */\n LocalRecorder.prototype.onStopDefault = function () {\n console.log('MediaRecorder stopped (state=' + this.mediaRecorder.state + ')');\n this.blob = new Blob(this.chunks, { type: 'video/webm' });\n this.chunks = [];\n this.videoPreviewSrc = window.URL.createObjectURL(this.blob);\n this.state = LocalRecorderState_1.LocalRecorderState.FINISHED;\n };\n return LocalRecorder;\n}());\nexports.LocalRecorder = LocalRecorder;\n//# sourceMappingURL=LocalRecorder.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/LocalRecorder.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/LocalRecorder.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorder_1 = require(\"./LocalRecorder\");\nvar Publisher_1 = require(\"./Publisher\");\nvar Session_1 = require(\"./Session\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar RpcBuilder = require(\"../OpenViduInternal/KurentoUtils/kurento-jsonrpc\");\nvar screenSharingAuto = require(\"../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto\");\nvar screenSharing = require(\"../OpenViduInternal/ScreenSharing/Screen-Capturing\");\nvar platform = require(\"platform\");\n/**\n * Entrypoint of OpenVidu Browser library.\n * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]]\n */\nvar OpenVidu = /** @class */ (function () {\n function OpenVidu() {\n /**\n * @hidden\n */\n this.secret = '';\n /**\n * @hidden\n */\n this.recorder = false;\n /**\n * @hidden\n */\n this.advancedConfiguration = {};\n console.info(\"'OpenVidu' initialized\");\n }\n /**\n * Returns new session\n */\n OpenVidu.prototype.initSession = function () {\n this.session = new Session_1.Session(this);\n return this.session;\n };\n /**\n * Returns a new publisher\n *\n * #### Events dispatched\n *\n * The [[Publisher]] object will dispatch an `accessDialogOpened` event, only if the pop-up shown by the browser to request permissions for the camera is opened. You can use this event to alert the user about granting permissions\n * for your website. An `accessDialogClosed` event will also be dispatched after user clicks on \"Allow\" or \"Block\" in the pop-up.\n *\n * The [[Publisher]] object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not.\n *\n * The [[Publisher]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (if _targetElement_ not null or undefined)\n *\n * The [[Publisher]] object will dispatch a `videoPlaying` event once the local video starts playing (only if `videoElementCreated` event has been previously dispatched)\n *\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see [[PublisherProperties.insertMode]]). If null or undefined no default video will be created for this Publisher\n * (you can always access the native MediaStream object by calling _Publisher.stream.getMediaStream()_ and use it as _srcObject_ of any HTML video element)\n * @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails.\n * `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event\n */\n OpenVidu.prototype.initPublisher = function (targetElement, param2, param3) {\n var properties;\n if (!!param2 && (typeof param2 !== 'function')) {\n // Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)'\n properties = param2;\n properties = {\n audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined,\n frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined),\n insertMode: (typeof properties.insertMode !== 'undefined') ? ((typeof properties.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[properties.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true,\n publishAudio: (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true,\n publishVideo: (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true,\n resolution: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'),\n videoSource: (typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined\n };\n }\n else {\n // Matches 'initPublisher(targetElement)' or 'initPublisher(targetElement, completionHandler)'\n properties = {\n insertMode: VideoInsertMode_1.VideoInsertMode.APPEND,\n mirror: true,\n publishAudio: true,\n publishVideo: true,\n resolution: '640x480'\n };\n }\n var publisher = new Publisher_1.Publisher(targetElement, properties, this);\n var completionHandler;\n if (!!param2 && (typeof param2 === 'function')) {\n completionHandler = param2;\n }\n else if (!!param3) {\n completionHandler = param3;\n }\n publisher.initialize()\n .then(function () {\n if (completionHandler !== undefined) {\n completionHandler(undefined);\n }\n publisher.emitEvent('accessAllowed', []);\n })[\"catch\"](function (error) {\n if (!!completionHandler !== undefined) {\n completionHandler(error);\n }\n publisher.emitEvent('accessDenied', []);\n });\n return publisher;\n };\n OpenVidu.prototype.initPublisherAsync = function (targetElement, properties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var publisher;\n var callback = function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve(publisher);\n }\n };\n if (!!properties) {\n publisher = _this.initPublisher(targetElement, properties, callback);\n }\n else {\n publisher = _this.initPublisher(targetElement, callback);\n }\n });\n };\n /**\n * Returns a new local recorder for recording streams straight away from the browser\n * @param stream Stream to record\n */\n OpenVidu.prototype.initLocalRecorder = function (stream) {\n return new LocalRecorder_1.LocalRecorder(stream);\n };\n /**\n * Checks if the browser supports OpenVidu\n * @returns 1 if the browser supports OpenVidu, 0 otherwise\n */\n OpenVidu.prototype.checkSystemRequirements = function () {\n var browser = platform.name;\n var version = platform.version;\n if ((browser !== 'Chrome') && (browser !== 'Chrome Mobile') &&\n (browser !== 'Firefox') && (browser !== 'Firefox Mobile') && (browser !== 'Firefox for iOS') &&\n (browser !== 'Opera') && (browser !== 'Opera Mobile') &&\n (browser !== 'Safari')) {\n return 0;\n }\n else {\n return 1;\n }\n };\n /**\n * Collects information about the media input devices available on the system. You can pass property `deviceId` of a [[Device]] object as value of `audioSource` or `videoSource` properties in [[initPublisher]] method\n */\n OpenVidu.prototype.getDevices = function () {\n return new Promise(function (resolve, reject) {\n navigator.mediaDevices.enumerateDevices().then(function (deviceInfos) {\n var devices = [];\n deviceInfos.forEach(function (deviceInfo) {\n if (deviceInfo.kind === 'audioinput' || deviceInfo.kind === 'videoinput') {\n devices.push({\n kind: deviceInfo.kind,\n deviceId: deviceInfo.deviceId,\n label: deviceInfo.label\n });\n }\n });\n resolve(devices);\n })[\"catch\"](function (error) {\n console.error('Error getting devices', error);\n reject(error);\n });\n });\n };\n /**\n * Get a MediaStream object that you can customize before calling [[initPublisher]] (pass _MediaStreamTrack_ property of the _MediaStream_ value resolved by the Promise as `audioSource` or `videoSource` properties in [[initPublisher]])\n *\n * Parameter `options` is the same as in [[initPublisher]] second parameter (of type [[PublisherProperties]]), but only the following properties will be applied: `audioSource`, `videoSource`, `frameRate`, `resolution`\n *\n * To customize the Publisher's video, the API for HTMLCanvasElement is very useful. For example, to get a black-and-white video at 10 fps and HD resolution with no sound:\n * ```\n * var OV = new OpenVidu();\n * var FRAME_RATE = 10;\n *\n * OV.getUserMedia({\n * audioSource: false;\n * videoSource: undefined,\n * resolution: '1280x720',\n * frameRate: FRAME_RATE\n * })\n * .then(mediaStream => {\n *\n * var videoTrack = mediaStream.getVideoTracks()[0];\n * var video = document.createElement('video');\n * video.srcObject = new MediaStream([videoTrack]);\n *\n * var canvas = document.createElement('canvas');\n * var ctx = canvas.getContext('2d');\n * ctx.filter = 'grayscale(100%)';\n *\n * video.addEventListener('play', () => {\n * var loop = () => {\n * if (!video.paused && !video.ended) {\n * ctx.drawImage(video, 0, 0, 300, 170);\n * setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps\n * }\n * };\n * loop();\n * });\n * video.play();\n *\n * var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0];\n * var publisher = this.OV.initPublisher(\n * myHtmlTarget,\n * {\n * audioSource: false,\n * videoSource: grayVideoTrack\n * });\n * });\n * ```\n */\n OpenVidu.prototype.getUserMedia = function (options) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.generateMediaConstraints(options)\n .then(function (constraints) {\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (mediaStream) {\n resolve(mediaStream);\n })[\"catch\"](function (error) {\n var errorName;\n var errorMessage = error.toString();\n if (!(options.videoSource === 'screen')) {\n errorName = (options.videoSource === false || options.videoSource === null) ? OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED : OpenViduError_1.OpenViduErrorName.CAMERA_ACCESS_DENIED;\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED;\n }\n reject(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n /* tslint:disable:no-empty */\n /**\n * Disable all logging except error level\n */\n OpenVidu.prototype.enableProdMode = function () {\n console.log = function () { };\n console.debug = function () { };\n console.info = function () { };\n console.warn = function () { };\n };\n /* tslint:enable:no-empty */\n /**\n * Set OpenVidu advanced configuration options. Currently `configuration` is an object with the following optional properties (see [[OpenViduAdvancedConfiguration]] for more details):\n * - `iceServers`: set custom STUN/TURN servers to be used by OpenVidu Browser\n * - `screenShareChromeExtension`: url to a custom screen share extension for Chrome to be used instead of the default one, based on ours [https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)\n * - `publisherSpeakingEventsOptions`: custom configuration for the [[PublisherSpeakingEvent]] feature\n */\n OpenVidu.prototype.setAdvancedConfiguration = function (configuration) {\n this.advancedConfiguration = configuration;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n OpenVidu.prototype.generateMediaConstraints = function (publisherProperties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var audio, video;\n if (publisherProperties.audioSource === null || publisherProperties.audioSource === false) {\n audio = false;\n }\n else if (publisherProperties.audioSource === undefined) {\n audio = true;\n }\n else {\n audio = publisherProperties.audioSource;\n }\n if (publisherProperties.videoSource === null || publisherProperties.videoSource === false) {\n video = false;\n }\n else {\n video = {\n height: {\n ideal: 480\n },\n width: {\n ideal: 640\n }\n };\n }\n var mediaConstraints = {\n audio: audio,\n video: video\n };\n if (typeof mediaConstraints.audio === 'string') {\n mediaConstraints.audio = { deviceId: { exact: mediaConstraints.audio } };\n }\n if (mediaConstraints.video) {\n if (!!publisherProperties.resolution) {\n var widthAndHeight = publisherProperties.resolution.toLowerCase().split('x');\n var width = Number(widthAndHeight[0]);\n var height = Number(widthAndHeight[1]);\n mediaConstraints.video.width.ideal = width;\n mediaConstraints.video.height.ideal = height;\n }\n if (!!publisherProperties.frameRate) {\n mediaConstraints.video.frameRate = { ideal: publisherProperties.frameRate };\n }\n if (!!publisherProperties.videoSource && typeof publisherProperties.videoSource === 'string') {\n if (publisherProperties.videoSource === 'screen') {\n if (platform.name !== 'Chrome' && platform.name !== 'Firefox') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform.name);\n console.error(error);\n reject(error);\n }\n else {\n if (!!_this.advancedConfiguration.screenShareChromeExtension) {\n // Custom screen sharing extension for Chrome\n var extensionId = _this.advancedConfiguration.screenShareChromeExtension.split('/').pop().trim();\n screenSharing.getChromeExtensionStatus(extensionId, function (status) {\n if (status === 'installed-enabled') {\n screenSharing.getScreenConstraints(function (error, screenConstraints) {\n if (!!error && error === 'permission-denied') {\n var error_1 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');\n console.error(error_1);\n reject(error_1);\n }\n else {\n mediaConstraints.video = screenConstraints;\n resolve(mediaConstraints);\n }\n });\n }\n if (status === 'installed-disabled') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');\n console.error(error);\n reject(error);\n }\n if (status === 'not-installed') {\n var error = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, _this.advancedConfiguration.screenShareChromeExtension);\n console.error(error);\n reject(error);\n }\n });\n }\n else {\n // Default screen sharing extension for Chrome\n screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {\n if (!!error) {\n if (error === 'not-installed') {\n var error_2 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');\n console.error(error_2);\n reject(error_2);\n }\n else if (error === 'installed-disabled') {\n var error_3 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_EXTENSION_DISABLED, 'You must enable the screen extension');\n console.error(error_3);\n reject(error_3);\n }\n else if (error === 'permission-denied') {\n var error_4 = new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED, 'You must allow access to one window of your desktop');\n console.error(error_4);\n reject(error_4);\n }\n }\n else {\n mediaConstraints.video = screenConstraints.video;\n resolve(mediaConstraints);\n }\n });\n }\n publisherProperties.videoSource = 'screen';\n }\n }\n else {\n // tslint:disable-next-line:no-string-literal\n mediaConstraints.video['deviceId'] = { exact: publisherProperties.videoSource };\n resolve(mediaConstraints);\n }\n }\n else {\n resolve(mediaConstraints);\n }\n }\n else {\n resolve(mediaConstraints);\n }\n });\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.startWs = function (onConnectSucces) {\n var config = {\n heartbeat: 5000,\n sendCloseMessage: false,\n ws: {\n uri: this.wsUri,\n useSockJS: false,\n onconnected: onConnectSucces,\n ondisconnect: this.disconnectCallback.bind(this),\n onreconnecting: this.reconnectingCallback.bind(this),\n onreconnected: this.reconnectedCallback.bind(this)\n },\n rpc: {\n requestTimeout: 15000,\n participantJoined: this.session.onParticipantJoined.bind(this.session),\n participantPublished: this.session.onParticipantPublished.bind(this.session),\n participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),\n participantLeft: this.session.onParticipantLeft.bind(this.session),\n participantEvicted: this.session.onParticipantEvicted.bind(this.session),\n recordingStarted: this.session.onRecordingStarted.bind(this.session),\n recordingStopped: this.session.onRecordingStopped.bind(this.session),\n sendMessage: this.session.onNewMessage.bind(this.session),\n iceCandidate: this.session.recvIceCandidate.bind(this.session),\n mediaError: this.session.onMediaError.bind(this.session)\n }\n };\n this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config);\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.closeWs = function () {\n this.jsonRpcClient.close();\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.sendRequest = function (method, params, callback) {\n if (params && params instanceof Function) {\n callback = params;\n params = {};\n }\n console.debug('Sending request: {method:\"' + method + '\", params: ' + JSON.stringify(params) + '}');\n this.jsonRpcClient.send(method, params, callback);\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.isMediaStreamTrack = function (mediaSource) {\n var is = (!!mediaSource &&\n mediaSource.enabled !== undefined && typeof mediaSource.enabled === 'boolean' &&\n mediaSource.id !== undefined && typeof mediaSource.id === 'string' &&\n mediaSource.kind !== undefined && typeof mediaSource.kind === 'string' &&\n mediaSource.label !== undefined && typeof mediaSource.label === 'string' &&\n mediaSource.muted !== undefined && typeof mediaSource.muted === 'boolean' &&\n mediaSource.readyState !== undefined && typeof mediaSource.readyState === 'string');\n return is;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getWsUri = function () {\n return this.wsUri;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getSecret = function () {\n return this.secret;\n };\n /**\n * @hidden\n */\n OpenVidu.prototype.getRecorder = function () {\n return this.recorder;\n };\n /* Private methods */\n OpenVidu.prototype.disconnectCallback = function () {\n console.warn('Websocket connection lost');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenVidu.prototype.reconnectingCallback = function () {\n console.warn('Websocket connection lost (reconnecting)');\n if (this.isRoomAvailable()) {\n this.session.onLostConnection();\n }\n else {\n alert('Connection error. Please reload page.');\n }\n };\n OpenVidu.prototype.reconnectedCallback = function () {\n console.warn('Websocket reconnected');\n };\n OpenVidu.prototype.isRoomAvailable = function () {\n if (this.session !== undefined && this.session instanceof Session_1.Session) {\n return true;\n }\n else {\n console.warn('Session instance not found');\n return false;\n }\n };\n return OpenVidu;\n}());\nexports.OpenVidu = OpenVidu;\n//# sourceMappingURL=OpenVidu.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/OpenVidu.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Stream_1 = require(\"./Stream\");\nvar StreamEvent_1 = require(\"../OpenViduInternal/Events/StreamEvent\");\nvar VideoElementEvent_1 = require(\"../OpenViduInternal/Events/VideoElementEvent\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method\n */\nvar Publisher = /** @class */ (function () {\n /**\n * @hidden\n */\n function Publisher(targetElement, properties, openvidu) {\n var _this = this;\n this.openvidu = openvidu;\n /**\n * Whether the Publisher has been granted access to the requested input devices or not\n */\n this.accessAllowed = false;\n this.ee = new EventEmitter();\n this.properties = properties;\n this.stream = new Stream_1.Stream(this.session, { publisherProperties: properties, mediaConstraints: {} });\n this.stream.on('video-removed', function (element) {\n _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementDestroyed')]);\n });\n this.stream.on('stream-destroyed-by-disconnect', function (reason) {\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', _this.stream, reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n });\n if (typeof targetElement === 'string') {\n var e = document.getElementById(targetElement);\n if (!!e) {\n this.element = e;\n }\n }\n else if (targetElement instanceof HTMLElement) {\n this.element = targetElement;\n }\n if (!this.element) {\n console.warn(\"The provided 'targetElement' for the Publisher couldn't be resolved to any HTML element: \" + targetElement);\n }\n }\n /**\n * Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to publish the audio stream, `false` to unpublish it\n */\n Publisher.prototype.publishAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n console.info(\"'Publisher' has \" + (value ? 'published' : 'unpublished') + ' its audio stream');\n };\n /**\n * Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to publish the video stream, `false` to unpublish it\n */\n Publisher.prototype.publishVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n console.info(\"'Publisher' has \" + (value ? 'published' : 'unpublished') + ' its video stream');\n };\n /**\n * Call this method before [[Session.publish]] to subscribe to your Publisher's stream as any other user would do. The local video will be automatically replaced by the remote video\n */\n Publisher.prototype.subscribeToRemote = function () {\n this.stream.subscribeToMyRemote();\n };\n /**\n * See [[EventDispatcher.on]]\n */\n Publisher.prototype.on = function (type, handler) {\n var _this = this;\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\");\n }\n handler(event);\n });\n if (type === 'streamCreated') {\n if (!!this.stream && this.stream.isPublisherPublished) {\n this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);\n }\n else {\n this.stream.on('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);\n });\n }\n }\n if (type === 'videoElementCreated') {\n if (!!this.stream && this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.on('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.on('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n if (type === 'remoteVideoPlaying') {\n var video = this.stream.getVideoElement();\n if (this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'remoteVideoPlaying')]);\n }\n else {\n this.stream.on('remote-video-is-playing', function (element) {\n _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'remoteVideoPlaying')]);\n });\n }\n }\n if (type === 'accessAllowed') {\n if (this.stream.accessIsAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n }\n if (type === 'accessDenied') {\n if (this.stream.accessIsDenied) {\n this.ee.emitEvent('accessDenied');\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Publisher.prototype.once = function (type, handler) {\n var _this = this;\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Publisher'\");\n }\n handler(event);\n });\n if (type === 'streamCreated') {\n if (!!this.stream && this.stream.isPublisherPublished) {\n this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, this, 'streamCreated', this.stream, '')]);\n }\n else {\n this.stream.once('stream-created-by-publisher', function () {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', _this.stream, '')]);\n });\n }\n }\n if (type === 'videoElementCreated') {\n if (!!this.stream && this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.once('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.once('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n if (type === 'remoteVideoPlaying') {\n var video = this.stream.getVideoElement();\n if (this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'remoteVideoPlaying')]);\n }\n else {\n this.stream.once('remote-video-is-playing', function (element) {\n _this.ee.emitEvent('remoteVideoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'remoteVideoPlaying')]);\n });\n }\n }\n if (type === 'accessAllowed') {\n if (this.stream.accessIsAllowed) {\n this.ee.emitEvent('accessAllowed');\n }\n }\n if (type === 'accessDenied') {\n if (this.stream.accessIsDenied) {\n this.ee.emitEvent('accessDenied');\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Publisher.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n return this;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n Publisher.prototype.initialize = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var errorCallback = function (openViduError) {\n _this.stream.accessIsDenied = true;\n _this.stream.accessIsAllowed = false;\n reject(openViduError);\n };\n var successCallback = function (mediaStream) {\n _this.stream.accessIsAllowed = true;\n _this.stream.accessIsDenied = false;\n if (_this.openvidu.isMediaStreamTrack(_this.properties.audioSource)) {\n mediaStream.removeTrack(mediaStream.getAudioTracks()[0]);\n mediaStream.addTrack(_this.properties.audioSource);\n }\n if (_this.openvidu.isMediaStreamTrack(_this.properties.videoSource)) {\n mediaStream.removeTrack(mediaStream.getVideoTracks()[0]);\n mediaStream.addTrack(_this.properties.videoSource);\n }\n // Apply PublisherProperties.publishAudio and PublisherProperties.publishVideo\n if (!!mediaStream.getAudioTracks()[0]) {\n mediaStream.getAudioTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishAudio;\n }\n if (!!mediaStream.getVideoTracks()[0]) {\n mediaStream.getVideoTracks()[0].enabled = !!_this.stream.outboundStreamOpts.publisherProperties.publishVideo;\n }\n _this.stream.setMediaStream(mediaStream);\n _this.stream.insertVideo(_this.element, _this.properties.insertMode);\n resolve();\n };\n _this.openvidu.generateMediaConstraints(_this.properties)\n .then(function (constraints) {\n var outboundStreamOptions = {\n mediaConstraints: constraints,\n publisherProperties: _this.properties\n };\n _this.stream.setOutboundStreamOptions(outboundStreamOptions);\n // Ask independently for audio stream and video stream. If the user asks for both of them and one is blocked, the method still\n // success only with the allowed input. This is not the desierd behaviour: if any of them is blocked, access should be denied\n var constraintsAux = {};\n var timeForDialogEvent = 1250;\n if (_this.stream.isSendVideo()) {\n constraintsAux.audio = false;\n constraintsAux.video = constraints.video;\n var startTime_1 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraintsAux)\n .then(function (videoOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n if (_this.stream.isSendAudio()) {\n constraintsAux.audio = (constraints.audio === undefined) ? true : constraints.audio;\n constraintsAux.video = false;\n startTime_1 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraintsAux)\n .then(function (audioOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n videoOnlyStream.addTrack(audioOnlyStream.getAudioTracks()[0]);\n successCallback(videoOnlyStream);\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n videoOnlyStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n var errorName;\n var errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n break;\n case 'notallowederror':\n errorName = OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;\n errorMessage = error.toString();\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = \"Audio input device with deviceId '\" + constraints.audio.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Audio input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n }\n else {\n successCallback(videoOnlyStream);\n }\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_1, timeForDialogEvent);\n var errorName;\n var errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n break;\n case 'notallowederror':\n errorName = _this.stream.isSendScreen() ? OpenViduError_1.OpenViduErrorName.SCREEN_CAPTURE_DENIED : OpenViduError_1.OpenViduErrorName.CAMERA_ACCESS_DENIED;\n errorMessage = error.toString();\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_VIDEO_DEVICE_NOT_FOUND;\n errorMessage = \"Video input device with deviceId '\" + constraints.video.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Video input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n }\n else if (_this.stream.isSendAudio()) {\n constraintsAux.audio = (constraints.audio === undefined) ? true : constraints.audio;\n constraintsAux.video = false;\n var startTime_2 = Date.now();\n _this.setPermissionDialogTimer(timeForDialogEvent);\n navigator.mediaDevices.getUserMedia(constraints)\n .then(function (audioOnlyStream) {\n _this.clearPermissionDialogTimer(startTime_2, timeForDialogEvent);\n successCallback(audioOnlyStream);\n })[\"catch\"](function (error) {\n _this.clearPermissionDialogTimer(startTime_2, timeForDialogEvent);\n var errorName;\n var errorMessage;\n switch (error.name.toLowerCase()) {\n case 'notfounderror':\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = error.toString();\n break;\n case 'notallowederror':\n errorName = OpenViduError_1.OpenViduErrorName.MICROPHONE_ACCESS_DENIED;\n errorMessage = error.toString();\n break;\n case 'overconstrainederror':\n if (error.constraint.toLowerCase() === 'deviceid') {\n errorName = OpenViduError_1.OpenViduErrorName.INPUT_AUDIO_DEVICE_NOT_FOUND;\n errorMessage = \"Audio input device with deviceId '\" + constraints.audio.deviceId.exact + \"' not found\";\n }\n else {\n errorName = OpenViduError_1.OpenViduErrorName.PUBLISHER_PROPERTIES_ERROR;\n errorMessage = \"Audio input device doesn't support the value passed for constraint '\" + error.constraint + \"'\";\n }\n }\n errorCallback(new OpenViduError_1.OpenViduError(errorName, errorMessage));\n });\n }\n else {\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.NO_INPUT_SOURCE_SET, \"Properties 'audioSource' and 'videoSource' cannot be set to false or null at the same time when calling 'OpenVidu.initPublisher'\"));\n }\n })[\"catch\"](function (error) {\n errorCallback(error);\n });\n });\n };\n /**\n * @hidden\n */\n Publisher.prototype.updateSession = function (session) {\n this.session = session;\n this.stream.session = session;\n };\n /**\n * @hidden\n */\n Publisher.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /* Private methods */\n Publisher.prototype.setPermissionDialogTimer = function (waitTime) {\n var _this = this;\n this.permissionDialogTimeout = setTimeout(function () {\n _this.ee.emitEvent('accessDialogOpened', []);\n }, waitTime);\n };\n Publisher.prototype.clearPermissionDialogTimer = function (startTime, waitTime) {\n clearTimeout(this.permissionDialogTimeout);\n if ((Date.now() - startTime) > waitTime) {\n // Permission dialog was shown and now is closed\n this.ee.emitEvent('accessDialogClosed', []);\n }\n };\n /* Private methods */\n Publisher.prototype.userMediaHasVideo = function (callback) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // If the user is going to publish its screen there's a video source\n if ((typeof _this.properties.videoSource === 'string') && _this.properties.videoSource === 'screen') {\n resolve(true);\n }\n else {\n _this.openvidu.getDevices()\n .then(function (devices) {\n resolve(!!(devices.filter(function (device) {\n return device.kind === 'videoinput';\n })[0]));\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n Publisher.prototype.userMediaHasAudio = function (callback) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.openvidu.getDevices()\n .then(function (devices) {\n resolve(!!(devices.filter(function (device) {\n return device.kind === 'audioinput';\n })[0]));\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n return Publisher;\n}());\nexports.Publisher = Publisher;\n//# sourceMappingURL=Publisher.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/Publisher.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Publisher.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Connection_1 = require(\"./Connection\");\nvar Subscriber_1 = require(\"./Subscriber\");\nvar ConnectionEvent_1 = require(\"../OpenViduInternal/Events/ConnectionEvent\");\nvar RecordingEvent_1 = require(\"../OpenViduInternal/Events/RecordingEvent\");\nvar SessionDisconnectedEvent_1 = require(\"../OpenViduInternal/Events/SessionDisconnectedEvent\");\nvar SignalEvent_1 = require(\"../OpenViduInternal/Events/SignalEvent\");\nvar StreamEvent_1 = require(\"../OpenViduInternal/Events/StreamEvent\");\nvar OpenViduError_1 = require(\"../OpenViduInternal/Enums/OpenViduError\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\nvar platform = require(\"platform\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Represents a video call. It can also be seen as a videoconference room where multiple users can connect.\n * Participants who publish their videos to a session will be seen by the rest of users connected to that specific session.\n * Initialized with [[OpenVidu.initSession]] method\n */\nvar Session = /** @class */ (function () {\n /**\n * @hidden\n */\n function Session(openvidu) {\n // This map is only used to avoid race condition between 'joinRoom' response and 'onParticipantPublished' notification\n /**\n * @hidden\n */\n this.remoteStreamsCreated = {};\n /**\n * @hidden\n */\n this.remoteConnections = {};\n /**\n * @hidden\n */\n this.speakingEventsEnabled = false;\n this.ee = new EventEmitter();\n this.openvidu = openvidu;\n }\n /**\n * Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when\n * they receive `streamCreated` event. The structure of `metadata` string is up to you (maybe some standarized format\n * as JSON or XML is a good idea), the only restriction is a maximum length of 10000 chars.\n *\n * This metadata is not considered secure, as it is generated in the client side. To pass securized data, add it as a parameter in the\n * token generation operation (through the API REST, openvidu-java-client or openvidu-node-client).\n *\n * Only after the returned Promise is successfully resolved [[Session.connection]] object will be available and properly defined.\n *\n * #### Events dispatched\n *\n * The [[Session]] object of the local participant will first dispatch one or more `connectionCreated` events upon successful termination of this method:\n * - First one for your own local Connection object, so you can retrieve [[Session.connection]] property.\n * - Then one for each remote Connection previously connected to the Session, if any. Any other remote user connecting to the Session after you have\n * successfully connected will also dispatch a `connectionCreated` event when they do so.\n *\n * The [[Session]] object of the local participant will also dispatch a `streamCreated` event for each remote active [[Publisher]] after dispatching all remote\n * `connectionCreated` events.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `connectionCreated` event.\n *\n * See [[ConnectionEvent]] and [[StreamEvent]] to learn more.\n *\n * @returns A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not\n *\n */\n Session.prototype.connect = function (token, metadata) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.processToken(token);\n if (_this.openvidu.checkSystemRequirements()) {\n // Early configuration to deactivate automatic subscription to streams\n _this.options = {\n sessionId: _this.sessionId,\n participantId: token,\n metadata: !!metadata ? _this.stringClientMetadata(metadata) : ''\n };\n _this.connectAux(token).then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu'));\n }\n });\n };\n /**\n * Leaves the session, destroying all streams and deleting the user as a participant.\n *\n * #### Events dispatched\n *\n * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event.\n * This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also delete the HTML video element associated to it.\n * Call `event.preventDefault()` to avoid this beahviour and take care of disposing and cleaning all the Subscriber objects yourself. See [[SessionDisconnectedEvent]] to learn more.\n *\n * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session.\n * This event will automatically stop all media tracks and delete the HTML video element associated to it.\n * Call `event.preventDefault()` if you want clean the Publisher object yourself or re-publish it in a different Session (to do so it is a mandatory\n * requirement to call `Session.unpublish()` or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing.\n * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and delete the HTML video element associated to it.\n * Call `event.preventDefault()` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself. See [[StreamEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `connectionDestroyed` event in any case. See [[ConnectionEvent]] to learn more.\n */\n Session.prototype.disconnect = function () {\n this.leave(false, 'disconnect');\n };\n /**\n * Subscribes to a `stream`, adding a new HTML video element to DOM with `subscriberProperties` settings. This method is usually called in the callback of `streamCreated` event.\n *\n * #### Events dispatched\n *\n * The [[Subscriber]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (if _targetElement_ not null or undefined)\n *\n * The [[Subscriber]] object will dispatch a `videoPlaying` event once the remote video starts playing (only if `videoElementCreated` event has been previously dispatched)\n *\n * See [[VideoElementEvent]] to learn more.\n *\n * @param stream Stream object to subscribe to\n * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Subscriber will be inserted (see [[SubscriberProperties.insertMode]]). If null or undefined no default video will be created for this Subscriber\n * (you can always access the native MediaStream object by calling _Subscriber.stream.getMediaStream()_ and use it as _srcObject_ of any HTML video element)\n * @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails.\n */\n Session.prototype.subscribe = function (stream, targetElement, param3, param4) {\n var properties = {};\n if (!!param3 && typeof param3 !== 'function') {\n properties = {\n insertMode: (typeof param3.insertMode !== 'undefined') ? ((typeof param3.insertMode === 'string') ? VideoInsertMode_1.VideoInsertMode[param3.insertMode] : properties.insertMode) : VideoInsertMode_1.VideoInsertMode.APPEND,\n subscribeToAudio: (typeof param3.subscribeToAudio !== 'undefined') ? param3.subscribeToAudio : true,\n subscribeToVideo: (typeof param3.subscribeToVideo !== 'undefined') ? param3.subscribeToVideo : true\n };\n }\n else {\n properties = {\n insertMode: VideoInsertMode_1.VideoInsertMode.APPEND,\n subscribeToAudio: true,\n subscribeToVideo: true\n };\n }\n var completionHandler;\n if (!!param3 && (typeof param3 === 'function')) {\n completionHandler = param3;\n }\n else if (!!param4) {\n completionHandler = param4;\n }\n console.info('Subscribing to ' + stream.connection.connectionId);\n stream.subscribe()\n .then(function () {\n console.info('Subscribed correctly to ' + stream.connection.connectionId);\n if (completionHandler !== undefined) {\n completionHandler(undefined);\n }\n })[\"catch\"](function (error) {\n if (completionHandler !== undefined) {\n completionHandler(error);\n }\n });\n var subscriber = new Subscriber_1.Subscriber(stream, targetElement, properties);\n stream.insertVideo(subscriber.element, properties.insertMode);\n return subscriber;\n };\n Session.prototype.subscribeAsync = function (stream, targetElement, properties) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var subscriber;\n var callback = function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve(subscriber);\n }\n };\n if (!!properties) {\n subscriber = _this.subscribe(stream, targetElement, properties, callback);\n }\n else {\n subscriber = _this.subscribe(stream, targetElement, callback);\n }\n });\n };\n /**\n * Unsubscribes from `subscriber`, automatically removing its HTML video element.\n *\n * #### Events dispatched\n *\n * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event (only if it previously dispatched a `videoElementCreated` event). See [[VideoElementEvent]] to learn more\n */\n Session.prototype.unsubscribe = function (subscriber) {\n var connectionId = subscriber.stream.connection.connectionId;\n console.info('Unsubscribing from ' + connectionId);\n this.openvidu.sendRequest('unsubscribeFromVideo', {\n sender: subscriber.stream.connection.connectionId\n }, function (error, response) {\n if (error) {\n console.error('Error unsubscribing from ' + connectionId, error);\n }\n else {\n console.info('Unsubscribed correctly from ' + connectionId);\n }\n subscriber.stream.disposeWebRtcPeer();\n subscriber.stream.disposeMediaStream();\n });\n subscriber.stream.removeVideo();\n };\n /**\n * Publishes the participant's audio-video stream contained in `publisher` object to the session\n *\n * #### Events dispatched\n *\n * The local [[Publisher]] object will dispatch a `streamCreated` event upon successful termination of this method. See [[StreamEvent]] to learn more.\n *\n * The local [[Publisher]] object will dispatch a `remoteVideoPlaying` event only if [[Publisher.subscribeToRemote]] was called before this method, once the remote video starts playing.\n * See [[VideoElementEvent]] to learn more.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamCreated` event so they can subscribe to it. See [[StreamEvent]] to learn more.\n *\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the publisher was successfully published and rejected with an Error object if not\n */\n Session.prototype.publish = function (publisher) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n publisher.session = _this;\n publisher.stream.session = _this;\n if (!publisher.stream.isPublisherPublished) {\n // 'Session.unpublish(Publisher)' has NOT been called\n _this.connection.addStream(publisher.stream);\n publisher.stream.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n // 'Session.unpublish(Publisher)' has been called. Must initialize again Publisher\n publisher.initialize()\n .then(function () {\n _this.connection.addStream(publisher.stream);\n publisher.stream.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n /**\n * Unpublishes the participant's audio-video stream contained in `publisher` object.\n *\n * #### Events dispatched\n *\n * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event.\n * This event will automatically stop all media tracks and delete the HTML video element associated to it.\n * Call `event.preventDefault()` if you want clean the Publisher object yourself or re-publish it in a different Session.\n *\n * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event.\n * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and delete the HTML video element associated to it.\n * Call `event.preventDefault()` to avoid this default behaviour and take care of disposing and cleaning the Subscriber object yourself.\n *\n * See [[StreamEvent]] to learn more.\n */\n Session.prototype.unpublish = function (publisher) {\n var stream = publisher.stream;\n if (!stream.connection) {\n console.error('The associated Connection object of this Publisher is null', stream);\n return;\n }\n else if (stream.connection !== this.connection) {\n console.error('The associated Connection object of this Publisher is not your local Connection.' +\n \"Only moderators can force unpublish on remote Streams via 'forceUnpublish' method\", stream);\n return;\n }\n else {\n console.info('Unpublishing local media (' + stream.connection.connectionId + ')');\n this.openvidu.sendRequest('unpublishVideo', function (error, response) {\n if (error) {\n console.error(error);\n }\n else {\n console.info('Media unpublished correctly');\n }\n });\n stream.disposeWebRtcPeer();\n delete stream.connection.stream;\n var streamEvent = new StreamEvent_1.StreamEvent(true, publisher, 'streamDestroyed', publisher.stream, 'unpublish');\n publisher.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n }\n };\n /**\n * Sends one signal. `signal` object has the following optional properties:\n * ```json\n * {data:string, to:Connection[], type:string}\n * ```\n * All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local\n * Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more.\n *\n * @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't\n * mean that openvidu-server could resend the message to all the listed receivers._\n */\n /* tslint:disable:no-string-literal */\n Session.prototype.signal = function (signal) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var signalMessage = {};\n if (signal.to && signal.to.length > 0) {\n var connectionIds_1 = [];\n signal.to.forEach(function (connection) {\n connectionIds_1.push(connection.connectionId);\n });\n signalMessage['to'] = connectionIds_1;\n }\n else {\n signalMessage['to'] = [];\n }\n signalMessage['data'] = signal.data ? signal.data : '';\n signalMessage['type'] = signal.type ? signal.type : '';\n _this.openvidu.sendRequest('sendMessage', {\n message: JSON.stringify(signalMessage)\n }, function (error, response) {\n if (!!error) {\n reject(error);\n }\n else {\n resolve();\n }\n });\n });\n };\n /* tslint:enable:no-string-literal */\n /**\n * See [[EventDispatcher.on]]\n */\n Session.prototype.on = function (type, handler) {\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\");\n }\n handler(event);\n });\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = true;\n // If there are already available remote streams, enable hark 'speaking' event in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !str.speechEvent && str.hasAudio) {\n str.enableSpeakingEvents();\n }\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Session.prototype.once = function (type, handler) {\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Session'\");\n }\n handler(event);\n });\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = true;\n // If there are already available remote streams, enable hark in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !str.speechEvent && str.hasAudio) {\n str.enableOnceSpeakingEvents();\n }\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Session.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n if (type === 'publisherStartSpeaking' || type === 'publisherStopSpeaking') {\n this.speakingEventsEnabled = false;\n // If there are already available remote streams, disablae hark in all of them\n for (var connectionId in this.remoteConnections) {\n var str = this.remoteConnections[connectionId].stream;\n if (!!str && !!str.speechEvent) {\n str.disableSpeakingEvents();\n }\n }\n }\n return this;\n };\n /* Hidden methods */\n /**\n * @hidden\n */\n Session.prototype.onParticipantJoined = function (response) {\n var _this = this;\n // Connection shouldn't exist\n this.getConnection(response.id, '')\n .then(function (connection) {\n console.warn('Connection ' + response.id + ' already exists in connections list');\n })[\"catch\"](function (openViduError) {\n var connection = new Connection_1.Connection(_this, response);\n _this.remoteConnections[response.id] = connection;\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantLeft = function (msg) {\n var _this = this;\n this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + \" unknown when 'onParticipantLeft'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (connection) {\n if (!!connection.stream) {\n var stream = connection.stream;\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', stream, msg.reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n delete _this.remoteStreamsCreated[stream.streamId];\n }\n delete _this.remoteConnections[connection.connectionId];\n _this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionDestroyed', connection, msg.reason)]);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantPublished = function (response) {\n var _this = this;\n var afterConnectionFound = function (connection) {\n _this.remoteConnections[connection.connectionId] = connection;\n if (!_this.remoteStreamsCreated[connection.stream.streamId]) {\n // Avoid race condition between stream.subscribe() in \"onParticipantPublished\" and in \"joinRoom\" rpc callback\n // This condition is false if openvidu-server sends \"participantPublished\" event to a subscriber participant that has\n // already subscribed to certain stream in the callback of \"joinRoom\" method\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', connection.stream, '')]);\n }\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n };\n // Get the existing Connection created on 'onParticipantJoined' for\n // existing participants or create a new one for new participants\n var connection;\n this.getRemoteConnection(response.id, \"Remote connection '\" + response.id + \"' unknown when 'onParticipantPublished'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (con) {\n // Update existing Connection\n connection = con;\n response.metadata = con.data;\n connection.options = response;\n connection.initRemoteStreams(response.streams);\n afterConnectionFound(connection);\n })[\"catch\"](function (openViduError) {\n // Create new Connection\n connection = new Connection_1.Connection(_this, response);\n afterConnectionFound(connection);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantUnpublished = function (msg) {\n var _this = this;\n this.getRemoteConnection(msg.name, \"Remote connection '\" + msg.name + \"' unknown when 'onParticipantUnpublished'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n .then(function (connection) {\n var streamEvent = new StreamEvent_1.StreamEvent(true, _this, 'streamDestroyed', connection.stream, msg.reason);\n _this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n // Deleting the remote stream\n var streamId = connection.stream.streamId;\n delete _this.remoteStreamsCreated[streamId];\n connection.removeStream(streamId);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onParticipantEvicted = function (msg) {\n /*this.getRemoteConnection(msg.name, 'Remote connection ' + msg.name + \" unknown when 'onParticipantLeft'. \" +\n 'Existing remote connections: ' + JSON.stringify(Object.keys(this.remoteConnections)))\n\n .then(connection => {\n if (!!connection.stream) {\n const stream = connection.stream;\n\n const streamEvent = new StreamEvent(true, this, 'streamDestroyed', stream, 'forceDisconnect');\n this.ee.emitEvent('streamDestroyed', [streamEvent]);\n streamEvent.callDefaultBehaviour();\n\n delete this.remoteStreamsCreated[stream.streamId];\n }\n connection.dispose();\n delete this.remoteConnections[connection.connectionId];\n this.ee.emitEvent('connectionDestroyed', [new ConnectionEvent(false, this, 'connectionDestroyed', connection, 'forceDisconnect')]);\n })\n .catch(openViduError => {\n console.error(openViduError);\n });*/\n };\n /**\n * @hidden\n */\n Session.prototype.onNewMessage = function (msg) {\n var _this = this;\n console.info('New signal: ' + JSON.stringify(msg));\n this.getConnection(msg.from, \"Connection '\" + msg.from + \"' unknow when 'onNewMessage'. Existing remote connections: \"\n + JSON.stringify(Object.keys(this.remoteConnections)) + '. Existing local connection: ' + this.connection.connectionId)\n .then(function (connection) {\n _this.ee.emitEvent('signal', [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]);\n _this.ee.emitEvent('signal:' + msg.type, [new SignalEvent_1.SignalEvent(_this, msg.type, msg.data, connection)]);\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.recvIceCandidate = function (msg) {\n var candidate = {\n candidate: msg.candidate,\n sdpMid: msg.sdpMid,\n sdpMLineIndex: msg.sdpMLineIndex\n };\n this.getConnection(msg.endpointName, 'Connection not found for endpoint ' + msg.endpointName + '. Ice candidate will be ignored: ' + candidate)\n .then(function (connection) {\n var stream = connection.stream;\n stream.getWebRtcPeer().addIceCandidate(candidate, function (error) {\n if (error) {\n console.error('Error adding candidate for ' + stream.streamId\n + ' stream of endpoint ' + msg.endpointName + ': ' + error);\n }\n });\n })[\"catch\"](function (openViduError) {\n console.error(openViduError);\n });\n };\n /**\n * @hidden\n */\n Session.prototype.onSessionClosed = function (msg) {\n console.info('Session closed: ' + JSON.stringify(msg));\n var s = msg.room;\n if (s !== undefined) {\n this.ee.emitEvent('session-closed', [{\n session: s\n }]);\n }\n else {\n console.warn('Session undefined on session closed', msg);\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onLostConnection = function () {\n if (!this.connection) {\n console.warn('Not connected to session: if you are not debugging, this is probably a certificate error');\n var url = 'https://' + this.openvidu.getWsUri().split('wss://')[1].split('/openvidu')[0];\n if (window.confirm('If you are not debugging, this is probably a certificate error at \\\"' + url + '\\\"\\n\\nClick OK to navigate and accept it')) {\n location.assign(url + '/accept-certificate');\n }\n return;\n }\n console.warn('Lost connection in Session ' + this.sessionId);\n if (!!this.sessionId && !this.connection.disposed) {\n this.leave(true, 'networkDisconnect');\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onMediaError = function (params) {\n console.error('Media error: ' + JSON.stringify(params));\n var err = params.error;\n if (err) {\n this.ee.emitEvent('error-media', [{\n error: err\n }]);\n }\n else {\n console.warn('Received undefined media error. Params:', params);\n }\n };\n /**\n * @hidden\n */\n Session.prototype.onRecordingStarted = function (response) {\n this.ee.emitEvent('recordingStarted', [new RecordingEvent_1.RecordingEvent(this, 'recordingStarted', response.id, response.name)]);\n };\n /**\n * @hidden\n */\n Session.prototype.onRecordingStopped = function (response) {\n this.ee.emitEvent('recordingStopped', [new RecordingEvent_1.RecordingEvent(this, 'recordingStopped', response.id, response.name)]);\n };\n /**\n * @hidden\n */\n Session.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /**\n * @hidden\n */\n Session.prototype.leave = function (forced, reason) {\n var _this = this;\n forced = !!forced;\n console.info('Leaving Session (forced=' + forced + ')');\n if (!!this.connection) {\n if (!this.connection.disposed && !forced) {\n this.openvidu.sendRequest('leaveRoom', function (error, response) {\n if (error) {\n console.error(error);\n }\n _this.openvidu.closeWs();\n });\n }\n else {\n this.openvidu.closeWs();\n }\n if (!!this.connection.stream) {\n // Make Publisher object dispatch 'streamDestroyed' event (if there's a local stream)\n this.connection.stream.disposeWebRtcPeer();\n this.connection.stream.emitEvent('stream-destroyed-by-disconnect', [reason]);\n }\n if (!this.connection.disposed) {\n // Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed)\n var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason);\n this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]);\n sessionDisconnectEvent.callDefaultBehaviour();\n }\n }\n else {\n console.warn('You were not connected to the session ' + this.sessionId);\n }\n };\n /* Private methods */\n Session.prototype.connectAux = function (token) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.openvidu.startWs(function (error) {\n if (!!error) {\n reject(error);\n }\n else {\n var joinParams = {\n token: (!!token) ? token : '',\n session: _this.sessionId,\n metadata: !!_this.options.metadata ? _this.options.metadata : '',\n secret: _this.openvidu.getSecret(),\n recorder: _this.openvidu.getRecorder()\n };\n _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) {\n if (!!error) {\n reject(error);\n }\n else {\n // Initialize local Connection object with values returned by openvidu-server\n _this.connection = new Connection_1.Connection(_this);\n _this.connection.connectionId = response.id;\n _this.connection.data = response.metadata;\n // Initialize remote Connections with value returned by openvidu-server\n var events_1 = {\n connections: new Array(),\n streams: new Array()\n };\n var existingParticipants = response.value;\n existingParticipants.forEach(function (participant) {\n var connection = new Connection_1.Connection(_this, participant);\n _this.remoteConnections[connection.connectionId] = connection;\n events_1.connections.push(connection);\n if (!!connection.stream) {\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n events_1.streams.push(connection.stream);\n }\n });\n // Own 'connectionCreated' event\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]);\n // One 'connectionCreated' event for each existing connection in the session\n events_1.connections.forEach(function (connection) {\n _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]);\n });\n // One 'streamCreated' event for each active stream in the session\n events_1.streams.forEach(function (stream) {\n _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]);\n });\n resolve();\n }\n });\n }\n });\n });\n };\n Session.prototype.stringClientMetadata = function (metadata) {\n if (typeof metadata !== 'string') {\n return JSON.stringify(metadata);\n }\n else {\n return metadata;\n }\n };\n Session.prototype.getConnection = function (connectionId, errorMessage) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var connection = _this.remoteConnections[connectionId];\n if (!!connection) {\n // Resolve remote connection\n resolve(connection);\n }\n else {\n if (_this.connection.connectionId === connectionId) {\n // Resolve local connection\n resolve(_this.connection);\n }\n else {\n // Connection not found. Reject with OpenViduError\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage));\n }\n }\n });\n };\n Session.prototype.getRemoteConnection = function (connectionId, errorMessage) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var connection = _this.remoteConnections[connectionId];\n if (!!connection) {\n // Resolve remote connection\n resolve(connection);\n }\n else {\n // Remote connection not found. Reject with OpenViduError\n reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.GENERIC_ERROR, errorMessage));\n }\n });\n };\n Session.prototype.processToken = function (token) {\n var url = new URL(token);\n this.sessionId = url.searchParams.get('sessionId');\n var secret = url.searchParams.get('secret');\n var recorder = url.searchParams.get('recorder');\n if (!!secret) {\n this.openvidu.secret = secret;\n }\n if (!!recorder) {\n this.openvidu.recorder = true;\n }\n this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';\n };\n return Session;\n}());\nexports.Session = Session;\n//# sourceMappingURL=Session.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/Session.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Session.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar WebRtcStats_1 = require(\"../OpenViduInternal/WebRtcStats/WebRtcStats\");\nvar PublisherSpeakingEvent_1 = require(\"../OpenViduInternal/Events/PublisherSpeakingEvent\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\nvar kurentoUtils = require(\"../OpenViduInternal/KurentoUtils/kurento-utils-js\");\nvar VideoInsertMode_1 = require(\"../OpenViduInternal/Enums/VideoInsertMode\");\n/**\n * Represents each one of the videos send and receive by a user in a session.\n * Therefore each [[Publisher]] and [[Subscriber]] has an attribute of type Stream\n */\nvar Stream = /** @class */ (function () {\n /**\n * @hidden\n */\n function Stream(session, options) {\n var _this = this;\n this.ee = new EventEmitter();\n this.isSubscribeToRemote = false;\n /**\n * @hidden\n */\n this.isReadyToPublish = false;\n /**\n * @hidden\n */\n this.isPublisherPublished = false;\n /**\n * @hidden\n */\n this.isVideoELementCreated = false;\n /**\n * @hidden\n */\n this.accessIsAllowed = false;\n /**\n * @hidden\n */\n this.accessIsDenied = false;\n this.session = session;\n if (options.hasOwnProperty('id')) {\n // InboundStreamOptions: stream belongs to a Subscriber\n this.inboundStreamOpts = options;\n this.streamId = this.inboundStreamOpts.id;\n this.hasAudio = this.inboundStreamOpts.recvAudio;\n this.hasVideo = this.inboundStreamOpts.recvVideo;\n this.typeOfVideo = (!this.inboundStreamOpts.typeOfVideo) ? undefined : this.inboundStreamOpts.typeOfVideo;\n this.frameRate = (this.inboundStreamOpts.frameRate === -1) ? undefined : this.inboundStreamOpts.frameRate;\n }\n else {\n // OutboundStreamOptions: stream belongs to a Publisher\n this.outboundStreamOpts = options;\n if (this.isSendVideo()) {\n if (this.isSendScreen()) {\n this.streamId = 'SCREEN';\n this.typeOfVideo = 'SCREEN';\n }\n else {\n this.streamId = 'CAMERA';\n this.typeOfVideo = 'CAMERA';\n }\n this.frameRate = this.outboundStreamOpts.publisherProperties.frameRate;\n }\n else {\n this.streamId = 'MICRO';\n delete this.typeOfVideo;\n }\n this.hasAudio = this.isSendAudio();\n this.hasVideo = this.isSendVideo();\n }\n this.on('mediastream-updated', function () {\n if (_this.video)\n _this.video.srcObject = _this.mediaStream;\n console.debug('Video srcObject [' + _this.mediaStream + '] updated in stream [' + _this.streamId + ']');\n });\n }\n /* Hidden methods */\n /**\n * @hidden\n */\n Stream.prototype.getMediaStream = function () {\n return this.mediaStream;\n };\n /**\n * @hidden\n */\n Stream.prototype.setMediaStream = function (mediaStream) {\n this.mediaStream = mediaStream;\n this.ee.emitEvent('mediastream-updated');\n };\n /**\n * @hidden\n */\n Stream.prototype.getWebRtcPeer = function () {\n return this.webRtcPeer;\n };\n /**\n * @hidden\n */\n Stream.prototype.getRTCPeerConnection = function () {\n return this.webRtcPeer.peerConnection;\n };\n /**\n * @hidden\n */\n Stream.prototype.getVideoElement = function () {\n return this.video;\n };\n /**\n * @hidden\n */\n Stream.prototype.subscribeToMyRemote = function () {\n this.isSubscribeToRemote = true;\n };\n /**\n * @hidden\n */\n Stream.prototype.setOutboundStreamOptions = function (outboundStreamOpts) {\n this.outboundStreamOpts = outboundStreamOpts;\n };\n /**\n * @hidden\n */\n Stream.prototype.subscribe = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.initWebRtcPeerReceive()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.publish = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.isReadyToPublish) {\n _this.initWebRtcPeerSend()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n else {\n _this.ee.once('stream-ready-to-publish', function (streamEvent) {\n _this.publish()\n .then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n }\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.disposeWebRtcPeer = function () {\n if (this.webRtcPeer) {\n this.webRtcPeer.dispose();\n }\n if (this.speechEvent) {\n this.speechEvent.stop();\n }\n this.stopWebRtcStats();\n console.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + \"WebRTCPeer from 'Stream' with id [\" + this.streamId + '] is now closed');\n };\n /**\n * @hidden\n */\n Stream.prototype.disposeMediaStream = function () {\n if (this.mediaStream) {\n this.mediaStream.getAudioTracks().forEach(function (track) {\n track.stop();\n });\n this.mediaStream.getVideoTracks().forEach(function (track) {\n track.stop();\n });\n }\n console.info((!!this.outboundStreamOpts ? 'Local ' : 'Remote ') + \"MediaStream from 'Stream' with id [\" + this.streamId + '] is now disposed');\n };\n /**\n * @hidden\n */\n Stream.prototype.displayMyRemote = function () {\n return this.isSubscribeToRemote;\n };\n /**\n * @hidden\n */\n Stream.prototype.on = function (eventName, listener) {\n this.ee.on(eventName, listener);\n };\n /**\n * @hidden\n */\n Stream.prototype.once = function (eventName, listener) {\n this.ee.once(eventName, listener);\n };\n /**\n * @hidden\n */\n Stream.prototype.insertVideo = function (targetElement, insertMode) {\n var _this = this;\n if (!!targetElement) {\n this.video = document.createElement('video');\n this.video.id = (this.isLocal() ? 'local-' : 'remote-') + 'video-' + this.streamId;\n this.video.autoplay = true;\n this.video.controls = false;\n this.video.srcObject = this.mediaStream;\n if (this.isLocal() && !this.displayMyRemote()) {\n this.video.muted = true;\n if (this.outboundStreamOpts.publisherProperties.mirror) {\n this.mirrorVideo(this.video);\n }\n this.video.oncanplay = function () {\n console.info(\"Local 'Stream' with id [\" + _this.streamId + '] video is now playing');\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n };\n }\n else {\n this.video.title = this.streamId;\n }\n this.targetElement = targetElement;\n this.parentId = targetElement.id;\n var insMode = !!insertMode ? insertMode : VideoInsertMode_1.VideoInsertMode.APPEND;\n this.insertElementWithMode(this.video, insMode);\n this.ee.emitEvent('video-element-created-by-stream', [{\n element: this.video\n }]);\n this.isVideoELementCreated = true;\n }\n this.isReadyToPublish = true;\n this.ee.emitEvent('stream-ready-to-publish');\n return this.video;\n };\n /**\n * @hidden\n */\n Stream.prototype.removeVideo = function () {\n if (this.video) {\n if (document.getElementById(this.parentId)) {\n document.getElementById(this.parentId).removeChild(this.video);\n this.ee.emitEvent('video-removed', [this.video]);\n }\n delete this.video;\n }\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendAudio = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.audioSource !== null &&\n this.outboundStreamOpts.publisherProperties.audioSource !== false);\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendVideo = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.videoSource !== null &&\n this.outboundStreamOpts.publisherProperties.videoSource !== false);\n };\n /**\n * @hidden\n */\n Stream.prototype.isSendScreen = function () {\n return (!!this.outboundStreamOpts &&\n this.outboundStreamOpts.publisherProperties.videoSource === 'screen');\n };\n /**\n * @hidden\n */\n Stream.prototype.emitEvent = function (type, eventArray) {\n this.ee.emitEvent(type, eventArray);\n };\n /**\n * @hidden\n */\n Stream.prototype.setSpeechEventIfNotExists = function () {\n if (!this.speechEvent) {\n var harkOptions = this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {};\n harkOptions.interval = (typeof harkOptions.interval === 'number') ? harkOptions.interval : 50;\n harkOptions.threshold = (typeof harkOptions.threshold === 'number') ? harkOptions.threshold : -50;\n this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.mediaStream, harkOptions);\n }\n };\n /**\n * @hidden\n */\n Stream.prototype.enableSpeakingEvents = function () {\n var _this = this;\n this.setSpeechEventIfNotExists();\n this.speechEvent.on('speaking', function () {\n _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]);\n });\n this.speechEvent.on('stopped_speaking', function () {\n _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]);\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.enableOnceSpeakingEvents = function () {\n var _this = this;\n this.setSpeechEventIfNotExists();\n this.speechEvent.on('speaking', function () {\n _this.session.emitEvent('publisherStartSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStartSpeaking', _this.connection, _this.streamId)]);\n _this.disableSpeakingEvents();\n });\n this.speechEvent.on('stopped_speaking', function () {\n _this.session.emitEvent('publisherStopSpeaking', [new PublisherSpeakingEvent_1.PublisherSpeakingEvent(_this.session, 'publisherStopSpeaking', _this.connection, _this.streamId)]);\n _this.disableSpeakingEvents();\n });\n };\n /**\n * @hidden\n */\n Stream.prototype.disableSpeakingEvents = function () {\n this.speechEvent.stop();\n this.speechEvent = undefined;\n };\n /* Private methods */\n Stream.prototype.initWebRtcPeerSend = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var userMediaConstraints = {\n audio: _this.isSendAudio(),\n video: _this.isSendVideo()\n };\n var options = {\n videoStream: _this.mediaStream,\n mediaConstraints: userMediaConstraints,\n onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),\n iceServers: _this.session.openvidu.advancedConfiguration.iceServers\n };\n var successCallback = function (error, sdpOfferParam, wp) {\n if (error) {\n reject(new Error('(publish) SDP offer error: ' + JSON.stringify(error)));\n }\n console.debug('Sending SDP offer to publish as '\n + _this.streamId, sdpOfferParam);\n _this.session.openvidu.sendRequest('publishVideo', {\n sdpOffer: sdpOfferParam,\n doLoopback: _this.displayMyRemote() || false,\n audioActive: _this.isSendAudio(),\n videoActive: _this.isSendVideo(),\n typeOfVideo: ((_this.isSendVideo()) ? (_this.isSendScreen() ? 'SCREEN' : 'CAMERA') : ''),\n frameRate: !!_this.frameRate ? _this.frameRate : -1\n }, function (error, response) {\n if (error) {\n reject('Error on publishVideo: ' + JSON.stringify(error));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer)\n .then(function () {\n _this.ee.emitEvent('stream-created-by-publisher');\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n console.info(\"'Publisher' successfully published to session\");\n }\n });\n };\n if (_this.displayMyRemote()) {\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (err) {\n if (err) {\n reject(err);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n }\n else {\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {\n if (error) {\n reject(error);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n }\n _this.isPublisherPublished = true;\n });\n };\n Stream.prototype.initWebRtcPeerReceive = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var offerConstraints = {\n audio: _this.inboundStreamOpts.recvAudio,\n video: _this.inboundStreamOpts.recvVideo\n };\n console.debug(\"'Session.subscribe(Stream)' called. Constraints of generate SDP offer\", offerConstraints);\n var options = {\n onicecandidate: _this.connection.sendIceCandidate.bind(_this.connection),\n mediaConstraints: offerConstraints\n };\n var successCallback = function (error, sdpOfferParam, wp) {\n if (error) {\n reject(new Error('(subscribe) SDP offer error: ' + JSON.stringify(error)));\n }\n console.debug('Sending SDP offer to subscribe to '\n + _this.streamId, sdpOfferParam);\n _this.session.openvidu.sendRequest('receiveVideoFrom', {\n sender: _this.streamId,\n sdpOffer: sdpOfferParam\n }, function (error, response) {\n if (error) {\n reject(new Error('Error on recvVideoFrom: ' + JSON.stringify(error)));\n }\n else {\n _this.processSdpAnswer(response.sdpAnswer).then(function () {\n resolve();\n })[\"catch\"](function (error) {\n reject(error);\n });\n }\n });\n };\n _this.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {\n if (error) {\n reject(error);\n }\n _this.webRtcPeer.generateOffer(successCallback);\n });\n });\n };\n Stream.prototype.processSdpAnswer = function (sdpAnswer) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n console.debug(_this.streamId + ': set peer connection with recvd SDP answer', sdpAnswer);\n var streamId = _this.streamId;\n var peerConnection = _this.webRtcPeer.peerConnection;\n peerConnection.setRemoteDescription(answer, function () {\n // Avoids to subscribe to your own stream remotely\n // except when showMyRemote is true\n if (!_this.isLocal() || _this.displayMyRemote()) {\n _this.mediaStream = peerConnection.getRemoteStreams()[0];\n console.debug('Peer remote stream', _this.mediaStream);\n if (!!_this.mediaStream) {\n _this.ee.emitEvent('mediastream-updated');\n if (!!_this.mediaStream.getAudioTracks()[0] && _this.session.speakingEventsEnabled) {\n _this.enableSpeakingEvents();\n }\n }\n if (!!_this.video) {\n // let thumbnailId = this.video.thumb;\n _this.video.oncanplay = function () {\n if (_this.isLocal() && _this.displayMyRemote()) {\n console.info(\"Your own remote 'Stream' with id [\" + _this.streamId + '] video is now playing');\n _this.ee.emitEvent('remote-video-is-playing', [{\n element: _this.video\n }]);\n }\n else if (!_this.isLocal() && !_this.displayMyRemote()) {\n console.info(\"Remote 'Stream' with id [\" + _this.streamId + '] video is now playing');\n _this.ee.emitEvent('video-is-playing', [{\n element: _this.video\n }]);\n }\n // show(thumbnailId);\n // this.hideSpinner(this.streamId);\n };\n }\n _this.session.emitEvent('stream-subscribed', [{\n stream: _this\n }]);\n }\n _this.initWebRtcStats();\n resolve();\n }, function (error) {\n reject(new Error(_this.streamId + ': Error setting SDP to the peer connection: ' + JSON.stringify(error)));\n });\n });\n };\n Stream.prototype.initWebRtcStats = function () {\n this.webRtcStats = new WebRtcStats_1.WebRtcStats(this);\n this.webRtcStats.initWebRtcStats();\n };\n Stream.prototype.stopWebRtcStats = function () {\n if (!!this.webRtcStats && this.webRtcStats.isEnabled()) {\n this.webRtcStats.stopWebRtcStats();\n }\n };\n Stream.prototype.isLocal = function () {\n // inbound options undefined and outbound options defined\n return (!this.inboundStreamOpts && !!this.outboundStreamOpts);\n };\n Stream.prototype.insertElementWithMode = function (element, insertMode) {\n if (!!this.targetElement) {\n switch (insertMode) {\n case VideoInsertMode_1.VideoInsertMode.AFTER:\n this.targetElement.parentNode.insertBefore(element, this.targetElement.nextSibling);\n break;\n case VideoInsertMode_1.VideoInsertMode.APPEND:\n this.targetElement.appendChild(element);\n break;\n case VideoInsertMode_1.VideoInsertMode.BEFORE:\n this.targetElement.parentNode.insertBefore(element, this.targetElement);\n break;\n case VideoInsertMode_1.VideoInsertMode.PREPEND:\n this.targetElement.insertBefore(element, this.targetElement.childNodes[0]);\n break;\n case VideoInsertMode_1.VideoInsertMode.REPLACE:\n this.targetElement.parentNode.replaceChild(element, this.targetElement);\n break;\n default:\n this.insertElementWithMode(element, VideoInsertMode_1.VideoInsertMode.APPEND);\n }\n }\n };\n Stream.prototype.mirrorVideo = function (video) {\n video.style.transform = 'rotateY(180deg)';\n video.style.webkitTransform = 'rotateY(180deg)';\n };\n return Stream;\n}());\nexports.Stream = Stream;\n//# sourceMappingURL=Stream.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/Stream.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Stream.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar VideoElementEvent_1 = require(\"../OpenViduInternal/Events/VideoElementEvent\");\nvar EventEmitter = require(\"wolfy87-eventemitter\");\n/**\n * Packs remote media streams. Participants automatically receive them when others publish their streams. Initialized with [[Session.subscribe]] method\n */\nvar Subscriber = /** @class */ (function () {\n /**\n * @hidden\n */\n function Subscriber(stream, targetElement, properties) {\n var _this = this;\n this.ee = new EventEmitter();\n this.stream = stream;\n this.properties = properties;\n if (typeof targetElement === 'string') {\n var e = document.getElementById(targetElement);\n if (!!e) {\n this.element = e;\n }\n }\n else if (targetElement instanceof HTMLElement) {\n this.element = targetElement;\n }\n this.stream.once('video-removed', function (element) {\n _this.ee.emitEvent('videoElementDestroyed', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementDestroyed')]);\n });\n }\n /**\n * Subscribe or unsubscribe from the audio stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to subscribe to the audio stream, `false` to unsubscribe from it\n */\n Subscriber.prototype.subscribeToAudio = function (value) {\n this.stream.getWebRtcPeer().audioEnabled = value;\n console.info(\"'Subscriber' has \" + (value ? 'subscribed' : 'unsubscribed') + ' to its audio stream');\n return this;\n };\n /**\n * Subscribe or unsubscribe from the video stream (if available). Calling this method twice in a row passing same value will have no effect\n * @param value `true` to subscribe to the video stream, `false` to unsubscribe from it\n */\n Subscriber.prototype.subscribeToVideo = function (value) {\n this.stream.getWebRtcPeer().videoEnabled = value;\n console.info(\"'Subscriber' has \" + (value ? 'subscribed' : 'unsubscribed') + ' to its video stream');\n return this;\n };\n /**\n * See [[EventDispatcher.on]]\n */\n Subscriber.prototype.on = function (type, handler) {\n var _this = this;\n this.ee.on(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered by 'Subscriber'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered by 'Subscriber'\");\n }\n handler(event);\n });\n if (type === 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.once('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.once('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.once]]\n */\n Subscriber.prototype.once = function (type, handler) {\n var _this = this;\n this.ee.once(type, function (event) {\n if (event) {\n console.info(\"Event '\" + type + \"' triggered once by 'Subscriber'\", event);\n }\n else {\n console.info(\"Event '\" + type + \"' triggered once by 'Subscriber'\");\n }\n handler(event);\n });\n if (type === 'videoElementCreated') {\n if (this.stream.isVideoELementCreated) {\n this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoElementCreated')]);\n }\n else {\n this.stream.once('video-element-created-by-stream', function (element) {\n _this.id = element.id;\n _this.ee.emitEvent('videoElementCreated', [new VideoElementEvent_1.VideoElementEvent(element, _this, 'videoElementCreated')]);\n });\n }\n }\n if (type === 'videoPlaying') {\n var video = this.stream.getVideoElement();\n if (!this.stream.displayMyRemote() && video &&\n video.currentTime > 0 &&\n video.paused === false &&\n video.ended === false &&\n video.readyState === 4) {\n this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(this.stream.getVideoElement(), this, 'videoPlaying')]);\n }\n else {\n this.stream.once('video-is-playing', function (element) {\n _this.ee.emitEvent('videoPlaying', [new VideoElementEvent_1.VideoElementEvent(element.element, _this, 'videoPlaying')]);\n });\n }\n }\n return this;\n };\n /**\n * See [[EventDispatcher.off]]\n */\n Subscriber.prototype.off = function (type, handler) {\n if (!handler) {\n this.ee.removeAllListeners(type);\n }\n else {\n this.ee.off(type, handler);\n }\n return this;\n };\n return Subscriber;\n}());\nexports.Subscriber = Subscriber;\n//# sourceMappingURL=Subscriber.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenVidu/Subscriber.js\n// module id = ../../../../openvidu-browser/lib/OpenVidu/Subscriber.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar LocalRecorderState;\n(function (LocalRecorderState) {\n LocalRecorderState[\"READY\"] = \"READY\";\n LocalRecorderState[\"RECORDING\"] = \"RECORDING\";\n LocalRecorderState[\"PAUSED\"] = \"PAUSED\";\n LocalRecorderState[\"FINISHED\"] = \"FINISHED\";\n})(LocalRecorderState = exports.LocalRecorderState || (exports.LocalRecorderState = {}));\n//# sourceMappingURL=LocalRecorderState.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\n/**\n * Defines property [[OpenViduError.name]]\n */\nvar OpenViduErrorName;\n(function (OpenViduErrorName) {\n OpenViduErrorName[\"BROWSER_NOT_SUPPORTED\"] = \"BROWSER_NOT_SUPPORTED\";\n OpenViduErrorName[\"CAMERA_ACCESS_DENIED\"] = \"CAMERA_ACCESS_DENIED\";\n OpenViduErrorName[\"MICROPHONE_ACCESS_DENIED\"] = \"MICROPHONE_ACCESS_DENIED\";\n OpenViduErrorName[\"SCREEN_CAPTURE_DENIED\"] = \"SCREEN_CAPTURE_DENIED\";\n OpenViduErrorName[\"SCREEN_SHARING_NOT_SUPPORTED\"] = \"SCREEN_SHARING_NOT_SUPPORTED\";\n OpenViduErrorName[\"SCREEN_EXTENSION_NOT_INSTALLED\"] = \"SCREEN_EXTENSION_NOT_INSTALLED\";\n OpenViduErrorName[\"SCREEN_EXTENSION_DISABLED\"] = \"SCREEN_EXTENSION_DISABLED\";\n OpenViduErrorName[\"INPUT_VIDEO_DEVICE_NOT_FOUND\"] = \"INPUT_VIDEO_DEVICE_NOT_FOUND\";\n OpenViduErrorName[\"INPUT_AUDIO_DEVICE_NOT_FOUND\"] = \"INPUT_AUDIO_DEVICE_NOT_FOUND\";\n OpenViduErrorName[\"NO_INPUT_SOURCE_SET\"] = \"NO_INPUT_SOURCE_SET\";\n OpenViduErrorName[\"PUBLISHER_PROPERTIES_ERROR\"] = \"PUBLISHER_PROPERTIES_ERROR\";\n OpenViduErrorName[\"OPENVIDU_PERMISSION_DENIED\"] = \"OPENVIDU_PERMISSION_DENIED\";\n OpenViduErrorName[\"OPENVIDU_NOT_CONNECTED\"] = \"OPENVIDU_NOT_CONNECTED\";\n OpenViduErrorName[\"GENERIC_ERROR\"] = \"GENERIC_ERROR\";\n})(OpenViduErrorName = exports.OpenViduErrorName || (exports.OpenViduErrorName = {}));\n/**\n * Simple object to identify runtime errors on the client side\n */\nvar OpenViduError = /** @class */ (function () {\n /**\n * @hidden\n */\n function OpenViduError(name, message) {\n this.name = name;\n this.message = message;\n }\n return OpenViduError;\n}());\nexports.OpenViduError = OpenViduError;\n//# sourceMappingURL=OpenViduError.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/OpenViduError.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\n/**\n * How the video will be inserted in the DOM for Publishers and Subscribers. See [[PublisherProperties.insertMode]] and [[SubscriberProperties.insertMode]]\n */\nvar VideoInsertMode;\n(function (VideoInsertMode) {\n /**\n * Video inserted after the target element (as next sibling)\n */\n VideoInsertMode[\"AFTER\"] = \"AFTER\";\n /**\n * Video inserted as last child of the target element\n */\n VideoInsertMode[\"APPEND\"] = \"APPEND\";\n /**\n * Video inserted before the target element (as previous sibling)\n */\n VideoInsertMode[\"BEFORE\"] = \"BEFORE\";\n /**\n * Video inserted as first child of the target element\n */\n VideoInsertMode[\"PREPEND\"] = \"PREPEND\";\n /**\n * Video replaces target element\n */\n VideoInsertMode[\"REPLACE\"] = \"REPLACE\";\n})(VideoInsertMode = exports.VideoInsertMode || (exports.VideoInsertMode = {}));\n//# sourceMappingURL=VideoInsertMode.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Enums/VideoInsertMode.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `connectionCreated`: dispatched by [[Session]]\n * - `connectionDestroyed`: dispatched by [[Session]]\n */\nvar ConnectionEvent = /** @class */ (function (_super) {\n __extends(ConnectionEvent, _super);\n /**\n * @hidden\n */\n function ConnectionEvent(cancelable, target, type, connection, reason) {\n var _this = _super.call(this, cancelable, target, type) || this;\n _this.connection = connection;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n ConnectionEvent.prototype.callDefaultBehaviour = function () { };\n return ConnectionEvent;\n}(Event_1.Event));\nexports.ConnectionEvent = ConnectionEvent;\n//# sourceMappingURL=ConnectionEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/ConnectionEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar Event = /** @class */ (function () {\n /**\n * @hidden\n */\n function Event(cancelable, target, type) {\n this.hasBeenPrevented = false;\n this.cancelable = cancelable;\n this.target = target;\n this.type = type;\n }\n /**\n * Whether the default beahivour of the event has been prevented or not. Call [[Event.preventDefault]] to prevent it\n */\n Event.prototype.isDefaultPrevented = function () {\n return this.hasBeenPrevented;\n };\n /**\n * Prevents the default behaviour of the event. The following events have a default behaviour:\n * - `sessionDisconnected`: automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks)\n * and also deletes the HTML video element associated to it.\n * - `streamDestroyed`: if dispatched by a [[Publisher]] (_you_ have unpublished), automatically stops all media tracks and deletes the HTML video element associated to the stream. If dispatched by [[Session]],\n * (_other user_ has unpublished), automatically unsubscribes the proper Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and deletes the HTML video element associated to it.\n */\n Event.prototype.preventDefault = function () {\n // tslint:disable-next-line:no-empty\n this.callDefaultBehaviour = function () { };\n this.hasBeenPrevented = true;\n };\n return Event;\n}());\nexports.Event = Event;\n//# sourceMappingURL=Event.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/Event.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/Event.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `publisherStartSpeaking`: dispatched by [[Session]]\n * - `publisherStopSpeaking`: dispatched by [[Session]]\n *\n * More information:\n * - This events will only be triggered for **remote streams that have audio tracks**\n * - Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call `Session.off('publisherStopSpeaking')`,\n * keep in mind that this will also internally remove any 'publisherStartSpeaking' event\n * - You can further configure how the events are dispatched by setting property `publisherSpeakingEventsOptions` in the call of [[OpenVidu.setAdvancedConfiguration]]\n */\nvar PublisherSpeakingEvent = /** @class */ (function (_super) {\n __extends(PublisherSpeakingEvent, _super);\n /**\n * @hidden\n */\n function PublisherSpeakingEvent(target, type, connection, streamId) {\n var _this = _super.call(this, false, target, type) || this;\n _this.type = type;\n _this.connection = connection;\n _this.streamId = streamId;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n PublisherSpeakingEvent.prototype.callDefaultBehaviour = function () { };\n return PublisherSpeakingEvent;\n}(Event_1.Event));\nexports.PublisherSpeakingEvent = PublisherSpeakingEvent;\n//# sourceMappingURL=PublisherSpeakingEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/PublisherSpeakingEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `recordingStarted`: dispatched by [[Session]]\n * - `recordingStopped`: dispatched by [[Session]]\n */\nvar RecordingEvent = /** @class */ (function (_super) {\n __extends(RecordingEvent, _super);\n /**\n * @hidden\n */\n function RecordingEvent(target, type, id, name) {\n var _this = _super.call(this, false, target, type) || this;\n _this.id = id;\n if (name !== id) {\n _this.name = name;\n }\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n RecordingEvent.prototype.callDefaultBehaviour = function () { };\n return RecordingEvent;\n}(Event_1.Event));\nexports.RecordingEvent = RecordingEvent;\n//# sourceMappingURL=RecordingEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/RecordingEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines event `sessionDisconnected` dispatched by [[Session]]\n */\nvar SessionDisconnectedEvent = /** @class */ (function (_super) {\n __extends(SessionDisconnectedEvent, _super);\n /**\n * @hidden\n */\n function SessionDisconnectedEvent(target, reason) {\n var _this = _super.call(this, true, target, 'sessionDisconnected') || this;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n SessionDisconnectedEvent.prototype.callDefaultBehaviour = function () {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Session'\");\n var session = this.target;\n // Dispose and delete all remote Connections\n for (var connectionId in session.remoteConnections) {\n if (!!session.remoteConnections[connectionId].stream) {\n session.remoteConnections[connectionId].stream.disposeWebRtcPeer();\n session.remoteConnections[connectionId].stream.disposeMediaStream();\n session.remoteConnections[connectionId].stream.removeVideo();\n delete session.remoteStreamsCreated[session.remoteConnections[connectionId].stream.streamId];\n session.remoteConnections[connectionId].dispose();\n }\n delete session.remoteConnections[connectionId];\n }\n };\n return SessionDisconnectedEvent;\n}(Event_1.Event));\nexports.SessionDisconnectedEvent = SessionDisconnectedEvent;\n//# sourceMappingURL=SessionDisconnectedEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/SessionDisconnectedEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `signal`: dispatched by [[Session]]\n * - `signal:TYPE`: dispatched by [[Session]]\n */\nvar SignalEvent = /** @class */ (function (_super) {\n __extends(SignalEvent, _super);\n /**\n * @hidden\n */\n function SignalEvent(target, type, data, from) {\n var _this = _super.call(this, false, target, type) || this;\n _this.type = type;\n _this.data = data;\n _this.from = from;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n SignalEvent.prototype.callDefaultBehaviour = function () { };\n return SignalEvent;\n}(Event_1.Event));\nexports.SignalEvent = SignalEvent;\n//# sourceMappingURL=SignalEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/SignalEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\nvar Publisher_1 = require(\"../../OpenVidu/Publisher\");\nvar Session_1 = require(\"../../OpenVidu/Session\");\n/**\n * Defines the following events:\n * - `streamCreated`: dispatched by [[Session]] and [[Publisher]]\n * - `streamDestroyed`: dispatched by [[Session]] and [[Publisher]]\n */\nvar StreamEvent = /** @class */ (function (_super) {\n __extends(StreamEvent, _super);\n /**\n * @hidden\n */\n function StreamEvent(cancelable, target, type, stream, reason) {\n var _this = _super.call(this, cancelable, target, type) || this;\n _this.stream = stream;\n _this.reason = reason;\n return _this;\n }\n /**\n * @hidden\n */\n StreamEvent.prototype.callDefaultBehaviour = function () {\n if (this.type === 'streamDestroyed') {\n if (this.target instanceof Session_1.Session) {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Session'\");\n // Remote Stream\n this.stream.disposeWebRtcPeer();\n this.stream.disposeMediaStream();\n this.stream.removeVideo();\n }\n else if (this.target instanceof Publisher_1.Publisher) {\n console.info(\"Calling default behaviour upon '\" + this.type + \"' event dispatched by 'Publisher'\");\n // Local Stream\n this.stream.disposeMediaStream();\n this.stream.removeVideo();\n this.stream.isReadyToPublish = false;\n }\n // Delete stream from Session.remoteStreamsCreated map\n delete this.stream.session.remoteStreamsCreated[this.stream.streamId];\n // Delete StreamOptionsServer from remote Connection\n var remoteConnection = this.stream.session.remoteConnections[this.stream.connection.connectionId];\n if (!!remoteConnection && !!remoteConnection.options) {\n var streamOptionsServer = remoteConnection.options.streams;\n for (var i = streamOptionsServer.length - 1; i >= 0; --i) {\n if (streamOptionsServer[i].id === this.stream.streamId) {\n streamOptionsServer.splice(i, 1);\n }\n }\n }\n }\n };\n return StreamEvent;\n}(Event_1.Event));\nexports.StreamEvent = StreamEvent;\n//# sourceMappingURL=StreamEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/StreamEvent.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar Event_1 = require(\"./Event\");\n/**\n * Defines the following events:\n * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]]\n * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]]\n * - `videoPlaying`: dispatched by [[Publisher]] and [[Subscriber]]\n * - `remoteVideoPlaying`: dispatched by [[Publisher]] if `Publisher.subscribeToRemote()` was called before `Session.publish(Publisher)`\n */\nvar VideoElementEvent = /** @class */ (function (_super) {\n __extends(VideoElementEvent, _super);\n /**\n * @hidden\n */\n function VideoElementEvent(element, target, type) {\n var _this = _super.call(this, false, target, type) || this;\n _this.element = element;\n return _this;\n }\n /**\n * @hidden\n */\n // tslint:disable-next-line:no-empty\n VideoElementEvent.prototype.callDefaultBehaviour = function () { };\n return VideoElementEvent;\n}(Event_1.Event));\nexports.VideoElementEvent = VideoElementEvent;\n//# sourceMappingURL=VideoElementEvent.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/Events/VideoElementEvent.js\n// module chunks = main","function Mapper() {\n var sources = {};\n this.forEach = function (callback) {\n for (var key in sources) {\n var source = sources[key];\n for (var key2 in source)\n callback(source[key2]);\n }\n ;\n };\n this.get = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return undefined;\n return ids[id];\n };\n this.remove = function (id, source) {\n var ids = sources[source];\n if (ids == undefined)\n return;\n delete ids[id];\n for (var i in ids) {\n return false;\n }\n delete sources[source];\n };\n this.set = function (value, id, source) {\n if (value == undefined)\n return this.remove(id, source);\n var ids = sources[source];\n if (ids == undefined)\n sources[source] = ids = {};\n ids[id] = value;\n };\n}\n;\nMapper.prototype.pop = function (id, source) {\n var value = this.get(id, source);\n if (value == undefined)\n return undefined;\n this.remove(id, source);\n return value;\n};\nmodule.exports = Mapper;\n//# sourceMappingURL=Mapper.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/Mapper.js\n// module chunks = main","var JsonRpcClient = require('./jsonrpcclient');\nexports.JsonRpcClient = JsonRpcClient;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/index.js\n// module chunks = main","var RpcBuilder = require('../');\nvar WebSocketWithReconnection = require('./transports/webSocketWithReconnection');\nDate.now = Date.now || function () {\n return +new Date;\n};\nvar PING_INTERVAL = 5000;\nvar RECONNECTING = 'RECONNECTING';\nvar CONNECTED = 'CONNECTED';\nvar DISCONNECTED = 'DISCONNECTED';\nvar Logger = console;\nfunction JsonRpcClient(configuration) {\n var self = this;\n var wsConfig = configuration.ws;\n var notReconnectIfNumLessThan = -1;\n var pingNextNum = 0;\n var enabledPings = true;\n var pingPongStarted = false;\n var pingInterval;\n var status = DISCONNECTED;\n var onreconnecting = wsConfig.onreconnecting;\n var onreconnected = wsConfig.onreconnected;\n var onconnected = wsConfig.onconnected;\n var onerror = wsConfig.onerror;\n configuration.rpc.pull = function (params, request) {\n request.reply(null, \"push\");\n };\n wsConfig.onreconnecting = function () {\n Logger.debug(\"--------- ONRECONNECTING -----------\");\n if (status === RECONNECTING) {\n Logger.error(\"Websocket already in RECONNECTING state when receiving a new ONRECONNECTING message. Ignoring it\");\n return;\n }\n status = RECONNECTING;\n if (onreconnecting) {\n onreconnecting();\n }\n };\n wsConfig.onreconnected = function () {\n Logger.debug(\"--------- ONRECONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONRECONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n updateNotReconnectIfLessThan();\n usePing();\n if (onreconnected) {\n onreconnected();\n }\n };\n wsConfig.onconnected = function () {\n Logger.debug(\"--------- ONCONNECTED -----------\");\n if (status === CONNECTED) {\n Logger.error(\"Websocket already in CONNECTED state when receiving a new ONCONNECTED message. Ignoring it\");\n return;\n }\n status = CONNECTED;\n enabledPings = true;\n usePing();\n if (onconnected) {\n onconnected();\n }\n };\n wsConfig.onerror = function (error) {\n Logger.debug(\"--------- ONERROR -----------\");\n status = DISCONNECTED;\n if (onerror) {\n onerror(error);\n }\n };\n var ws = new WebSocketWithReconnection(wsConfig);\n Logger.debug('Connecting websocket to URI: ' + wsConfig.uri);\n var rpcBuilderOptions = {\n request_timeout: configuration.rpc.requestTimeout,\n ping_request_timeout: configuration.rpc.heartbeatRequestTimeout\n };\n var rpc = new RpcBuilder(RpcBuilder.packers.JsonRPC, rpcBuilderOptions, ws, function (request) {\n Logger.debug('Received request: ' + JSON.stringify(request));\n try {\n var func = configuration.rpc[request.method];\n if (func === undefined) {\n Logger.error(\"Method \" + request.method + \" not registered in client\");\n }\n else {\n func(request.params, request);\n }\n }\n catch (err) {\n Logger.error('Exception processing request: ' + JSON.stringify(request));\n Logger.error(err);\n }\n });\n this.send = function (method, params, callback) {\n if (method !== 'ping') {\n Logger.debug('Request: method:' + method + \" params:\" + JSON.stringify(params));\n }\n var requestTime = Date.now();\n rpc.encode(method, params, function (error, result) {\n if (error) {\n try {\n Logger.error(\"ERROR:\" + error.message + \" in Request: method:\" +\n method + \" params:\" + JSON.stringify(params) + \" request:\" +\n error.request);\n if (error.data) {\n Logger.error(\"ERROR DATA:\" + JSON.stringify(error.data));\n }\n }\n catch (e) { }\n error.requestTime = requestTime;\n }\n if (callback) {\n if (result != undefined && result.value !== 'pong') {\n Logger.debug('Response: ' + JSON.stringify(result));\n }\n callback(error, result);\n }\n });\n };\n function updateNotReconnectIfLessThan() {\n Logger.debug(\"notReconnectIfNumLessThan = \" + pingNextNum + ' (old=' +\n notReconnectIfNumLessThan + ')');\n notReconnectIfNumLessThan = pingNextNum;\n }\n function sendPing() {\n if (enabledPings) {\n var params = null;\n if (pingNextNum == 0 || pingNextNum == notReconnectIfNumLessThan) {\n params = {\n interval: configuration.heartbeat || PING_INTERVAL\n };\n }\n pingNextNum++;\n self.send('ping', params, (function (pingNum) {\n return function (error, result) {\n if (error) {\n Logger.debug(\"Error in ping request #\" + pingNum + \" (\" +\n error.message + \")\");\n if (pingNum > notReconnectIfNumLessThan) {\n enabledPings = false;\n updateNotReconnectIfLessThan();\n Logger.debug(\"Server did not respond to ping message #\" +\n pingNum + \". Reconnecting... \");\n ws.reconnectWs();\n }\n }\n };\n })(pingNextNum));\n }\n else {\n Logger.debug(\"Trying to send ping, but ping is not enabled\");\n }\n }\n function usePing() {\n if (!pingPongStarted) {\n Logger.debug(\"Starting ping (if configured)\");\n pingPongStarted = true;\n if (configuration.heartbeat != undefined) {\n pingInterval = setInterval(sendPing, configuration.heartbeat);\n sendPing();\n }\n }\n }\n this.close = function () {\n Logger.debug(\"Closing jsonRpcClient explicitly by client\");\n if (pingInterval != undefined) {\n Logger.debug(\"Clearing ping interval\");\n clearInterval(pingInterval);\n }\n pingPongStarted = false;\n enabledPings = false;\n if (configuration.sendCloseMessage) {\n Logger.debug(\"Sending close message\");\n this.send('closeSession', null, function (error, result) {\n if (error) {\n Logger.error(\"Error sending close message: \" + JSON.stringify(error));\n }\n ws.close();\n });\n }\n else {\n ws.close();\n }\n };\n this.forceClose = function (millis) {\n ws.forceClose(millis);\n };\n this.reconnect = function () {\n ws.reconnectWs();\n };\n}\nmodule.exports = JsonRpcClient;\n//# sourceMappingURL=jsonrpcclient.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js\n// module chunks = main","var WebSocketWithReconnection = require('./webSocketWithReconnection');\nexports.WebSocketWithReconnection = WebSocketWithReconnection;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/index.js\n// module chunks = main","\"use strict\";\nvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\nvar Logger = console;\nvar MAX_RETRIES = 2000;\nvar RETRY_TIME_MS = 3000;\nvar CONNECTING = 0;\nvar OPEN = 1;\nvar CLOSING = 2;\nvar CLOSED = 3;\nfunction WebSocketWithReconnection(config) {\n var closing = false;\n var registerMessageHandler;\n var wsUri = config.uri;\n var useSockJS = config.useSockJS;\n var reconnecting = false;\n var forcingDisconnection = false;\n var ws;\n if (useSockJS) {\n ws = new SockJS(wsUri);\n }\n else {\n ws = new WebSocket(wsUri);\n }\n ws.onopen = function () {\n logConnected(ws, wsUri);\n if (config.onconnected) {\n config.onconnected();\n }\n };\n ws.onerror = function (error) {\n Logger.error(\"Could not connect to \" + wsUri + \" (invoking onerror if defined)\", error);\n if (config.onerror) {\n config.onerror(error);\n }\n };\n function logConnected(ws, wsUri) {\n try {\n Logger.debug(\"WebSocket connected to \" + wsUri);\n }\n catch (e) {\n Logger.error(e);\n }\n }\n var reconnectionOnClose = function () {\n if (ws.readyState === CLOSED) {\n if (closing) {\n Logger.debug(\"Connection closed by user\");\n }\n else {\n Logger.debug(\"Connection closed unexpectecly. Reconnecting...\");\n reconnectToSameUri(MAX_RETRIES, 1);\n }\n }\n else {\n Logger.debug(\"Close callback from previous websocket. Ignoring it\");\n }\n };\n ws.onclose = reconnectionOnClose;\n function reconnectToSameUri(maxRetries, numRetries) {\n Logger.debug(\"reconnectToSameUri (attempt #\" + numRetries + \", max=\" + maxRetries + \")\");\n if (numRetries === 1) {\n if (reconnecting) {\n Logger.warn(\"Trying to reconnectToNewUri when reconnecting... Ignoring this reconnection.\");\n return;\n }\n else {\n reconnecting = true;\n }\n if (config.onreconnecting) {\n config.onreconnecting();\n }\n }\n if (forcingDisconnection) {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n else {\n if (config.newWsUriOnReconnection) {\n config.newWsUriOnReconnection(function (error, newWsUri) {\n if (error) {\n Logger.debug(error);\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, newWsUri);\n }\n });\n }\n else {\n reconnectToNewUri(maxRetries, numRetries, wsUri);\n }\n }\n }\n function reconnectToNewUri(maxRetries, numRetries, reconnectWsUri) {\n Logger.debug(\"Reconnection attempt #\" + numRetries);\n ws.close();\n wsUri = reconnectWsUri || wsUri;\n var newWs;\n if (useSockJS) {\n newWs = new SockJS(wsUri);\n }\n else {\n newWs = new WebSocket(wsUri);\n }\n newWs.onopen = function () {\n Logger.debug(\"Reconnected after \" + numRetries + \" attempts...\");\n logConnected(newWs, wsUri);\n reconnecting = false;\n registerMessageHandler();\n if (config.onreconnected()) {\n config.onreconnected();\n }\n newWs.onclose = reconnectionOnClose;\n };\n var onErrorOrClose = function (error) {\n Logger.warn(\"Reconnection error: \", error);\n if (numRetries === maxRetries) {\n if (config.ondisconnect) {\n config.ondisconnect();\n }\n }\n else {\n setTimeout(function () {\n reconnectToSameUri(maxRetries, numRetries + 1);\n }, RETRY_TIME_MS);\n }\n };\n newWs.onerror = onErrorOrClose;\n ws = newWs;\n }\n this.close = function () {\n closing = true;\n ws.close();\n };\n this.forceClose = function (millis) {\n Logger.debug(\"Testing: Force WebSocket close\");\n if (millis) {\n Logger.debug(\"Testing: Change wsUri for \" + millis + \" millis to simulate net failure\");\n var goodWsUri = wsUri;\n wsUri = \"wss://21.234.12.34.4:443/\";\n forcingDisconnection = true;\n setTimeout(function () {\n Logger.debug(\"Testing: Recover good wsUri \" + goodWsUri);\n wsUri = goodWsUri;\n forcingDisconnection = false;\n }, millis);\n }\n ws.close();\n };\n this.reconnectWs = function () {\n Logger.debug(\"reconnectWs\");\n reconnectToSameUri(MAX_RETRIES, 1, wsUri);\n };\n this.send = function (message) {\n ws.send(message);\n };\n this.addEventListener = function (type, callback) {\n registerMessageHandler = function () {\n ws.addEventListener(type, callback);\n };\n registerMessageHandler();\n };\n}\nmodule.exports = WebSocketWithReconnection;\n//# sourceMappingURL=webSocketWithReconnection.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js\n// module chunks = main","var defineProperty_IE8 = false;\nif (Object.defineProperty) {\n try {\n Object.defineProperty({}, \"x\", {});\n }\n catch (e) {\n defineProperty_IE8 = true;\n }\n}\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis) {\n if (typeof this !== 'function') {\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () { }, fBound = function () {\n return fToBind.apply(this instanceof fNOP && oThis\n ? this\n : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n fNOP.prototype = this.prototype;\n fBound.prototype = new fNOP();\n return fBound;\n };\n}\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\nvar packers = require('./packers');\nvar Mapper = require('./Mapper');\nvar BASE_TIMEOUT = 5000;\nfunction unifyResponseMethods(responseMethods) {\n if (!responseMethods)\n return {};\n for (var key in responseMethods) {\n var value = responseMethods[key];\n if (typeof value == 'string')\n responseMethods[key] =\n {\n response: value\n };\n }\n ;\n return responseMethods;\n}\n;\nfunction unifyTransport(transport) {\n if (!transport)\n return;\n if (transport instanceof Function)\n return { send: transport };\n if (transport.send instanceof Function)\n return transport;\n if (transport.postMessage instanceof Function) {\n transport.send = transport.postMessage;\n return transport;\n }\n if (transport.write instanceof Function) {\n transport.send = transport.write;\n return transport;\n }\n if (transport.onmessage !== undefined)\n return;\n if (transport.pause instanceof Function)\n return;\n throw new SyntaxError(\"Transport is not a function nor a valid object\");\n}\n;\nfunction RpcNotification(method, params) {\n if (defineProperty_IE8) {\n this.method = method;\n this.params = params;\n }\n else {\n Object.defineProperty(this, 'method', { value: method, enumerable: true });\n Object.defineProperty(this, 'params', { value: params, enumerable: true });\n }\n}\n;\nfunction RpcBuilder(packer, options, transport, onRequest) {\n var self = this;\n if (!packer)\n throw new SyntaxError('Packer is not defined');\n if (!packer.pack || !packer.unpack)\n throw new SyntaxError('Packer is invalid');\n var responseMethods = unifyResponseMethods(packer.responseMethods);\n if (options instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = options;\n transport = undefined;\n options = undefined;\n }\n ;\n if (options && options.send instanceof Function) {\n if (transport && !(transport instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n onRequest = transport;\n transport = options;\n options = undefined;\n }\n ;\n if (transport instanceof Function) {\n if (onRequest != undefined)\n throw new SyntaxError(\"There can't be parameters after onRequest\");\n onRequest = transport;\n transport = undefined;\n }\n ;\n if (transport && transport.send instanceof Function)\n if (onRequest && !(onRequest instanceof Function))\n throw new SyntaxError(\"Only a function can be after transport\");\n options = options || {};\n EventEmitter.call(this);\n if (onRequest)\n this.on('request', onRequest);\n if (defineProperty_IE8)\n this.peerID = options.peerID;\n else\n Object.defineProperty(this, 'peerID', { value: options.peerID });\n var max_retries = options.max_retries || 0;\n function transportMessage(event) {\n self.decode(event.data || event);\n }\n ;\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n if (transport) {\n if (transport.removeEventListener)\n transport.removeEventListener('message', transportMessage);\n else if (transport.removeListener)\n transport.removeListener('data', transportMessage);\n }\n ;\n if (value) {\n if (value.addEventListener)\n value.addEventListener('message', transportMessage);\n else if (value.addListener)\n value.addListener('data', transportMessage);\n }\n ;\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n this.setTransport(transport);\n var request_timeout = options.request_timeout || BASE_TIMEOUT;\n var ping_request_timeout = options.ping_request_timeout || request_timeout;\n var response_timeout = options.response_timeout || BASE_TIMEOUT;\n var duplicates_timeout = options.duplicates_timeout || BASE_TIMEOUT;\n var requestID = 0;\n var requests = new Mapper();\n var responses = new Mapper();\n var processedResponses = new Mapper();\n var message2Key = {};\n function storeResponse(message, id, dest) {\n var response = {\n message: message,\n timeout: setTimeout(function () {\n responses.remove(id, dest);\n }, response_timeout)\n };\n responses.set(response, id, dest);\n }\n ;\n function storeProcessedResponse(ack, from) {\n var timeout = setTimeout(function () {\n processedResponses.remove(ack, from);\n }, duplicates_timeout);\n processedResponses.set(timeout, ack, from);\n }\n ;\n function RpcRequest(method, params, id, from, transport) {\n RpcNotification.call(this, method, params);\n this.getTransport = function () {\n return transport;\n };\n this.setTransport = function (value) {\n transport = unifyTransport(value);\n };\n if (!defineProperty_IE8)\n Object.defineProperty(this, 'transport', {\n get: this.getTransport.bind(this),\n set: this.setTransport.bind(this)\n });\n var response = responses.get(id, from);\n if (!(transport || self.getTransport())) {\n if (defineProperty_IE8)\n this.duplicated = Boolean(response);\n else\n Object.defineProperty(this, 'duplicated', {\n value: Boolean(response)\n });\n }\n var responseMethod = responseMethods[method];\n this.pack = packer.pack.bind(packer, this, id);\n this.reply = function (error, result, transport) {\n if (error instanceof Function || error && error.send instanceof Function) {\n if (result != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = error;\n result = null;\n error = undefined;\n }\n else if (result instanceof Function\n || result && result.send instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n transport = result;\n result = null;\n }\n ;\n transport = unifyTransport(transport);\n if (response)\n clearTimeout(response.timeout);\n if (from != undefined) {\n if (error)\n error.dest = from;\n if (result)\n result.dest = from;\n }\n ;\n var message;\n if (error || result != undefined) {\n if (self.peerID != undefined) {\n if (error)\n error.from = self.peerID;\n else\n result.from = self.peerID;\n }\n if (responseMethod) {\n if (responseMethod.error == undefined && error)\n message =\n {\n error: error\n };\n else {\n var method = error\n ? responseMethod.error\n : responseMethod.response;\n message =\n {\n method: method,\n params: error || result\n };\n }\n }\n else\n message =\n {\n error: error,\n result: result\n };\n message = packer.pack(message, id);\n }\n else if (response)\n message = response.message;\n else\n message = packer.pack({ result: null }, id);\n storeResponse(message, id, from);\n transport = transport || this.getTransport() || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n }\n ;\n inherits(RpcRequest, RpcNotification);\n function cancel(message) {\n var key = message2Key[message];\n if (!key)\n return;\n delete message2Key[message];\n var request = requests.pop(key.id, key.dest);\n if (!request)\n return;\n clearTimeout(request.timeout);\n storeProcessedResponse(key.id, key.dest);\n }\n ;\n this.cancel = function (message) {\n if (message)\n return cancel(message);\n for (var message in message2Key)\n cancel(message);\n };\n this.close = function () {\n var transport = this.getTransport();\n if (transport && transport.close)\n transport.close();\n this.cancel();\n processedResponses.forEach(clearTimeout);\n responses.forEach(function (response) {\n clearTimeout(response.timeout);\n });\n };\n this.encode = function (method, params, dest, transport, callback) {\n if (params instanceof Function) {\n if (dest != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = params;\n transport = undefined;\n dest = undefined;\n params = undefined;\n }\n else if (dest instanceof Function) {\n if (transport != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = dest;\n transport = undefined;\n dest = undefined;\n }\n else if (transport instanceof Function) {\n if (callback != undefined)\n throw new SyntaxError(\"There can't be parameters after callback\");\n callback = transport;\n transport = undefined;\n }\n ;\n if (self.peerID != undefined) {\n params = params || {};\n params.from = self.peerID;\n }\n ;\n if (dest != undefined) {\n params = params || {};\n params.dest = dest;\n }\n ;\n var message = {\n method: method,\n params: params\n };\n if (callback) {\n var id = requestID++;\n var retried = 0;\n message = packer.pack(message, id);\n function dispatchCallback(error, result) {\n self.cancel(message);\n callback(error, result);\n }\n ;\n var request = {\n message: message,\n callback: dispatchCallback,\n responseMethods: responseMethods[method] || {}\n };\n var encode_transport = unifyTransport(transport);\n function sendRequest(transport) {\n var rt = (method === 'ping' ? ping_request_timeout : request_timeout);\n request.timeout = setTimeout(timeout, rt * Math.pow(2, retried++));\n message2Key[message] = { id: id, dest: dest };\n requests.set(request, id, dest);\n transport = transport || encode_transport || self.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n }\n ;\n function retry(transport) {\n transport = unifyTransport(transport);\n console.warn(retried + ' retry for request message:', message);\n var timeout = processedResponses.pop(id, dest);\n clearTimeout(timeout);\n return sendRequest(transport);\n }\n ;\n function timeout() {\n if (retried < max_retries)\n return retry(transport);\n var error = new Error('Request has timed out');\n error.request = message;\n error.retry = retry;\n dispatchCallback(error);\n }\n ;\n return sendRequest(transport);\n }\n ;\n message = packer.pack(message);\n transport = transport || this.getTransport();\n if (transport)\n return transport.send(message);\n return message;\n };\n this.decode = function (message, transport) {\n if (!message)\n throw new TypeError(\"Message is not defined\");\n try {\n message = packer.unpack(message);\n }\n catch (e) {\n return console.debug(e, message);\n }\n ;\n var id = message.id;\n var ack = message.ack;\n var method = message.method;\n var params = message.params || {};\n var from = params.from;\n var dest = params.dest;\n if (self.peerID != undefined && from == self.peerID)\n return;\n if (id == undefined && ack == undefined) {\n var notification = new RpcNotification(method, params);\n if (self.emit('request', notification))\n return;\n return notification;\n }\n ;\n function processRequest() {\n transport = unifyTransport(transport) || self.getTransport();\n if (transport) {\n var response = responses.get(id, from);\n if (response)\n return transport.send(response.message);\n }\n ;\n var idAck = (id != undefined) ? id : ack;\n var request = new RpcRequest(method, params, idAck, from, transport);\n if (self.emit('request', request))\n return;\n return request;\n }\n ;\n function processResponse(request, error, result) {\n request.callback(error, result);\n }\n ;\n function duplicatedResponse(timeout) {\n console.warn(\"Response already processed\", message);\n clearTimeout(timeout);\n storeProcessedResponse(ack, from);\n }\n ;\n if (method) {\n if (dest == undefined || dest == self.peerID) {\n var request = requests.get(ack, from);\n if (request) {\n var responseMethods = request.responseMethods;\n if (method == responseMethods.error)\n return processResponse(request, params);\n if (method == responseMethods.response)\n return processResponse(request, null, params);\n return processRequest();\n }\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n }\n return processRequest();\n }\n ;\n var error = message.error;\n var result = message.result;\n if (error && error.dest && error.dest != self.peerID)\n return;\n if (result && result.dest && result.dest != self.peerID)\n return;\n var request = requests.get(ack, from);\n if (!request) {\n var processed = processedResponses.get(ack, from);\n if (processed)\n return duplicatedResponse(processed);\n return console.warn(\"No callback was defined for this message\", message);\n }\n ;\n processResponse(request, error, result);\n };\n}\n;\ninherits(RpcBuilder, EventEmitter);\nRpcBuilder.RpcNotification = RpcNotification;\nmodule.exports = RpcBuilder;\nvar clients = require('./clients');\nvar transports = require('./clients/transports');\nRpcBuilder.clients = clients;\nRpcBuilder.clients.transports = transports;\nRpcBuilder.packers = packers;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/index.js\n// module chunks = main","function pack(message, id) {\n var result = {\n jsonrpc: \"2.0\"\n };\n if (message.method) {\n result.method = message.method;\n if (message.params)\n result.params = message.params;\n if (id != undefined)\n result.id = id;\n }\n else if (id != undefined) {\n if (message.error) {\n if (message.result !== undefined)\n throw new TypeError(\"Both result and error are defined\");\n result.error = message.error;\n }\n else if (message.result !== undefined)\n result.result = message.result;\n else\n throw new TypeError(\"No result or error is defined\");\n result.id = id;\n }\n ;\n return JSON.stringify(result);\n}\n;\nfunction unpack(message) {\n var result = message;\n if (typeof message === 'string' || message instanceof String) {\n result = JSON.parse(message);\n }\n var version = result.jsonrpc;\n if (version !== '2.0')\n throw new TypeError(\"Invalid JsonRPC version '\" + version + \"': \" + message);\n if (result.method == undefined) {\n if (result.id == undefined)\n throw new TypeError(\"Invalid message: \" + message);\n var result_defined = result.result !== undefined;\n var error_defined = result.error !== undefined;\n if (result_defined && error_defined)\n throw new TypeError(\"Both result and error are defined: \" + message);\n if (!result_defined && !error_defined)\n throw new TypeError(\"No result or error is defined: \" + message);\n result.ack = result.id;\n delete result.id;\n }\n return result;\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=JsonRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/JsonRPC.js\n// module chunks = main","function pack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nfunction unpack(message) {\n throw new TypeError(\"Not yet implemented\");\n}\n;\nexports.pack = pack;\nexports.unpack = unpack;\n//# sourceMappingURL=XmlRPC.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/XmlRPC.js\n// module chunks = main","var JsonRPC = require('./JsonRPC');\nvar XmlRPC = require('./XmlRPC');\nexports.JsonRPC = JsonRPC;\nexports.XmlRPC = XmlRPC;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-jsonrpc/packers/index.js\n// module chunks = main","var freeice = require('freeice');\nvar inherits = require('inherits');\nvar UAParser = require('ua-parser-js');\nvar uuid = require('uuid');\nvar hark = require('hark');\nvar EventEmitter = require('events').EventEmitter;\nvar recursive = require('merge').recursive.bind(undefined, true);\nvar sdpTranslator = require('sdp-translator');\nvar logger = window.Logger || console;\nvar MEDIA_CONSTRAINTS = {\n audio: true,\n video: {\n width: 640,\n framerate: 15\n }\n};\nvar ua = (window && window.navigator) ? window.navigator.userAgent : '';\nvar parser = new UAParser(ua);\nvar browser = parser.getBrowser();\nvar usePlanB = false;\nif (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug(browser.name + \": using SDP PlanB\");\n usePlanB = true;\n}\nfunction noop(error) {\n if (error)\n logger.error(error);\n}\nfunction trackStop(track) {\n track.stop && track.stop();\n}\nfunction streamStop(stream) {\n stream.getTracks().forEach(trackStop);\n}\nvar dumpSDP = function (description) {\n if (typeof description === 'undefined' || description === null) {\n return '';\n }\n return 'type: ' + description.type + '\\r\\n' + description.sdp;\n};\nfunction bufferizeCandidates(pc, onerror) {\n var candidatesQueue = [];\n pc.addEventListener('signalingstatechange', function () {\n if (this.signalingState === 'stable') {\n while (candidatesQueue.length) {\n var entry = candidatesQueue.shift();\n pc.addIceCandidate(entry.candidate, entry.callback, entry.callback);\n }\n }\n });\n return function (candidate, callback) {\n callback = callback || onerror;\n switch (pc.signalingState) {\n case 'closed':\n callback(new Error('PeerConnection object is closed'));\n break;\n case 'stable':\n if (pc.remoteDescription) {\n pc.addIceCandidate(candidate, callback, callback);\n }\n break;\n default:\n candidatesQueue.push({\n candidate: candidate,\n callback: callback\n });\n }\n };\n}\nfunction removeFIDFromOffer(sdp) {\n var n = sdp.indexOf(\"a=ssrc-group:FID\");\n if (n > 0) {\n return sdp.slice(0, n);\n }\n else {\n return sdp;\n }\n}\nfunction getSimulcastInfo(videoStream) {\n var videoTracks = videoStream.getVideoTracks();\n if (!videoTracks.length) {\n logger.warn('No video tracks available in the video stream');\n return '';\n }\n var lines = [\n 'a=x-google-flag:conference',\n 'a=ssrc-group:SIM 1 2 3',\n 'a=ssrc:1 cname:localVideo',\n 'a=ssrc:1 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:1 mslabel:' + videoStream.id,\n 'a=ssrc:1 label:' + videoTracks[0].id,\n 'a=ssrc:2 cname:localVideo',\n 'a=ssrc:2 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:2 mslabel:' + videoStream.id,\n 'a=ssrc:2 label:' + videoTracks[0].id,\n 'a=ssrc:3 cname:localVideo',\n 'a=ssrc:3 msid:' + videoStream.id + ' ' + videoTracks[0].id,\n 'a=ssrc:3 mslabel:' + videoStream.id,\n 'a=ssrc:3 label:' + videoTracks[0].id\n ];\n lines.push('');\n return lines.join('\\n');\n}\nfunction WebRtcPeer(mode, options, callback) {\n if (!(this instanceof WebRtcPeer)) {\n return new WebRtcPeer(mode, options, callback);\n }\n WebRtcPeer.super_.call(this);\n if (options instanceof Function) {\n callback = options;\n options = undefined;\n }\n options = options || {};\n callback = (callback || noop).bind(this);\n var self = this;\n var localVideo = options.localVideo;\n var remoteVideo = options.remoteVideo;\n var videoStream = options.videoStream;\n var audioStream = options.audioStream;\n var mediaConstraints = options.mediaConstraints;\n var connectionConstraints = options.connectionConstraints;\n var pc = options.peerConnection;\n var sendSource = options.sendSource || 'webcam';\n var guid = uuid.v4();\n var configuration = recursive({\n iceServers: (!!options.iceServers && options.iceServers.length > 0) ? options.iceServers : freeice()\n }, options.configuration);\n var onicecandidate = options.onicecandidate;\n if (onicecandidate)\n this.on('icecandidate', onicecandidate);\n var oncandidategatheringdone = options.oncandidategatheringdone;\n if (oncandidategatheringdone) {\n this.on('candidategatheringdone', oncandidategatheringdone);\n }\n var simulcast = options.simulcast;\n var multistream = options.multistream;\n var interop = new sdpTranslator.Interop();\n var candidatesQueueOut = [];\n var candidategatheringdone = false;\n Object.defineProperties(this, {\n 'peerConnection': {\n get: function () {\n return pc;\n }\n },\n 'id': {\n value: options.id || guid,\n writable: false\n },\n 'remoteVideo': {\n get: function () {\n return remoteVideo;\n }\n },\n 'localVideo': {\n get: function () {\n return localVideo;\n }\n },\n 'currentFrame': {\n get: function () {\n if (!remoteVideo)\n return;\n if (remoteVideo.readyState < remoteVideo.HAVE_CURRENT_DATA)\n throw new Error('No video stream data available');\n var canvas = document.createElement('canvas');\n canvas.width = remoteVideo.videoWidth;\n canvas.height = remoteVideo.videoHeight;\n canvas.getContext('2d').drawImage(remoteVideo, 0, 0);\n return canvas;\n }\n }\n });\n if (!pc) {\n pc = new RTCPeerConnection(configuration);\n }\n pc.addEventListener('icecandidate', function (event) {\n var candidate = event.candidate;\n if (EventEmitter.listenerCount(self, 'icecandidate') ||\n EventEmitter.listenerCount(self, 'candidategatheringdone')) {\n if (candidate) {\n var cand;\n if (multistream && usePlanB) {\n cand = interop.candidateToUnifiedPlan(candidate);\n }\n else {\n cand = candidate;\n }\n self.emit('icecandidate', cand);\n candidategatheringdone = false;\n }\n else if (!candidategatheringdone) {\n self.emit('candidategatheringdone');\n candidategatheringdone = true;\n }\n }\n else if (!candidategatheringdone) {\n candidatesQueueOut.push(candidate);\n if (!candidate)\n candidategatheringdone = true;\n }\n });\n pc.onaddstream = options.onaddstream;\n pc.onnegotiationneeded = options.onnegotiationneeded;\n this.on('newListener', function (event, listener) {\n if (event === 'icecandidate' || event === 'candidategatheringdone') {\n while (candidatesQueueOut.length) {\n var candidate = candidatesQueueOut.shift();\n if (!candidate === (event === 'candidategatheringdone')) {\n listener(candidate);\n }\n }\n }\n });\n var addIceCandidate = bufferizeCandidates(pc);\n this.addIceCandidate = function (iceCandidate, callback) {\n var candidate;\n if (multistream && usePlanB) {\n candidate = interop.candidateToPlanB(iceCandidate);\n }\n else {\n candidate = new RTCIceCandidate(iceCandidate);\n }\n logger.debug('Remote ICE candidate received', iceCandidate);\n callback = (callback || noop).bind(this);\n addIceCandidate(candidate, callback);\n };\n this.generateOffer = function (callback) {\n callback = callback.bind(this);\n var offerAudio = true;\n var offerVideo = true;\n if (mediaConstraints) {\n offerAudio = (typeof mediaConstraints.audio === 'boolean') ?\n mediaConstraints.audio : true;\n offerVideo = (typeof mediaConstraints.video === 'boolean') ?\n mediaConstraints.video : true;\n }\n var browserDependantConstraints = {\n offerToReceiveAudio: (mode !== 'sendonly' && offerAudio),\n offerToReceiveVideo: (mode !== 'sendonly' && offerVideo)\n };\n var constraints = browserDependantConstraints;\n logger.debug('constraints: ' + JSON.stringify(constraints));\n pc.createOffer(constraints).then(function (offer) {\n logger.debug('Created SDP offer');\n offer = mangleSdpToAddSimulcast(offer);\n return pc.setLocalDescription(offer);\n }).then(function () {\n var localDescription = pc.localDescription;\n logger.debug('Local description set', localDescription.sdp);\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('offer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n callback(null, localDescription.sdp, self.processAnswer.bind(self));\n }).catch(callback);\n };\n this.getLocalSessionDescriptor = function () {\n return pc.localDescription;\n };\n this.getRemoteSessionDescriptor = function () {\n return pc.remoteDescription;\n };\n function setRemoteVideo() {\n if (remoteVideo) {\n remoteVideo.pause();\n var stream = pc.getRemoteStreams()[0];\n remoteVideo.srcObject = stream;\n logger.debug('Remote stream:', stream);\n remoteVideo.load();\n }\n }\n this.showLocalVideo = function () {\n localVideo.srcObject = videoStream;\n localVideo.muted = true;\n };\n this.processAnswer = function (sdpAnswer, callback) {\n callback = (callback || noop).bind(this);\n var answer = new RTCSessionDescription({\n type: 'answer',\n sdp: sdpAnswer\n });\n if (multistream && usePlanB) {\n var planBAnswer = interop.toPlanB(answer);\n logger.debug('asnwer::planB', dumpSDP(planBAnswer));\n answer = planBAnswer;\n }\n logger.debug('SDP answer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(answer, function () {\n setRemoteVideo();\n callback();\n }, callback);\n };\n this.processOffer = function (sdpOffer, callback) {\n callback = callback.bind(this);\n var offer = new RTCSessionDescription({\n type: 'offer',\n sdp: sdpOffer\n });\n if (multistream && usePlanB) {\n var planBOffer = interop.toPlanB(offer);\n logger.debug('offer::planB', dumpSDP(planBOffer));\n offer = planBOffer;\n }\n logger.debug('SDP offer received, setting remote description');\n if (pc.signalingState === 'closed') {\n return callback('PeerConnection is closed');\n }\n pc.setRemoteDescription(offer).then(function () {\n return setRemoteVideo();\n }).then(function () {\n return pc.createAnswer();\n }).then(function (answer) {\n answer = mangleSdpToAddSimulcast(answer);\n logger.debug('Created SDP answer');\n return pc.setLocalDescription(answer);\n }).then(function () {\n var localDescription = pc.localDescription;\n if (multistream && usePlanB) {\n localDescription = interop.toUnifiedPlan(localDescription);\n logger.debug('answer::origPlanB->UnifiedPlan', dumpSDP(localDescription));\n }\n logger.debug('Local description set', localDescription.sdp);\n callback(null, localDescription.sdp);\n }).catch(callback);\n };\n function mangleSdpToAddSimulcast(answer) {\n if (simulcast) {\n if (browser.name === 'Chrome' || browser.name === 'Chromium') {\n logger.debug('Adding multicast info');\n answer = new RTCSessionDescription({\n 'type': answer.type,\n 'sdp': removeFIDFromOffer(answer.sdp) + getSimulcastInfo(videoStream)\n });\n }\n else {\n logger.warn('Simulcast is only available in Chrome browser.');\n }\n }\n return answer;\n }\n function start() {\n if (pc.signalingState === 'closed') {\n callback('The peer connection object is in \"closed\" state. This is most likely due to an invocation of the dispose method before accepting in the dialogue');\n }\n if (videoStream && localVideo) {\n self.showLocalVideo();\n }\n if (videoStream) {\n pc.addStream(videoStream);\n }\n if (audioStream) {\n pc.addStream(audioStream);\n }\n var browser = parser.getBrowser();\n if (mode === 'sendonly' &&\n (browser.name === 'Chrome' || browser.name === 'Chromium') &&\n browser.major === 39) {\n mode = 'sendrecv';\n }\n callback();\n }\n if (mode !== 'recvonly' && !videoStream && !audioStream) {\n function getMedia(constraints) {\n if (constraints === undefined) {\n constraints = MEDIA_CONSTRAINTS;\n }\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n videoStream = stream;\n start();\n }).catch(callback);\n }\n if (sendSource === 'webcam') {\n getMedia(mediaConstraints);\n }\n else {\n getScreenConstraints(sendSource, function (error, constraints_) {\n if (error)\n return callback(error);\n constraints = [mediaConstraints];\n constraints.unshift(constraints_);\n getMedia(recursive.apply(undefined, constraints));\n }, guid);\n }\n }\n else {\n setTimeout(start, 0);\n }\n this.on('_dispose', function () {\n if (localVideo) {\n localVideo.pause();\n localVideo.srcObject = null;\n localVideo.load();\n localVideo.muted = false;\n }\n if (remoteVideo) {\n remoteVideo.pause();\n remoteVideo.srcObject = null;\n remoteVideo.load();\n }\n self.removeAllListeners();\n if (window.cancelChooseDesktopMedia !== undefined) {\n window.cancelChooseDesktopMedia(guid);\n }\n });\n}\ninherits(WebRtcPeer, EventEmitter);\nfunction createEnableDescriptor(type) {\n var method = 'get' + type + 'Tracks';\n return {\n enumerable: true,\n get: function () {\n if (!this.peerConnection)\n return;\n var streams = this.peerConnection.getLocalStreams();\n if (!streams.length)\n return;\n for (var i = 0, stream; stream = streams[i]; i++) {\n var tracks = stream[method]();\n for (var j = 0, track; track = tracks[j]; j++)\n if (!track.enabled)\n return false;\n }\n return true;\n },\n set: function (value) {\n function trackSetEnable(track) {\n track.enabled = value;\n }\n this.peerConnection.getLocalStreams().forEach(function (stream) {\n stream[method]().forEach(trackSetEnable);\n });\n }\n };\n}\nObject.defineProperties(WebRtcPeer.prototype, {\n 'enabled': {\n enumerable: true,\n get: function () {\n return this.audioEnabled && this.videoEnabled;\n },\n set: function (value) {\n this.audioEnabled = this.videoEnabled = value;\n }\n },\n 'audioEnabled': createEnableDescriptor('Audio'),\n 'videoEnabled': createEnableDescriptor('Video')\n});\nWebRtcPeer.prototype.getLocalStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getLocalStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.getRemoteStream = function (index) {\n if (this.peerConnection) {\n return this.peerConnection.getRemoteStreams()[index || 0];\n }\n};\nWebRtcPeer.prototype.dispose = function () {\n logger.debug('Disposing WebRtcPeer');\n var pc = this.peerConnection;\n try {\n if (pc) {\n if (pc.signalingState === 'closed')\n return;\n pc.getLocalStreams().forEach(streamStop);\n pc.close();\n }\n }\n catch (err) {\n logger.warn('Exception disposing webrtc peer ' + err);\n }\n this.emit('_dispose');\n};\nfunction WebRtcPeerRecvonly(options, callback) {\n if (!(this instanceof WebRtcPeerRecvonly)) {\n return new WebRtcPeerRecvonly(options, callback);\n }\n WebRtcPeerRecvonly.super_.call(this, 'recvonly', options, callback);\n}\ninherits(WebRtcPeerRecvonly, WebRtcPeer);\nfunction WebRtcPeerSendonly(options, callback) {\n if (!(this instanceof WebRtcPeerSendonly)) {\n return new WebRtcPeerSendonly(options, callback);\n }\n WebRtcPeerSendonly.super_.call(this, 'sendonly', options, callback);\n}\ninherits(WebRtcPeerSendonly, WebRtcPeer);\nfunction WebRtcPeerSendrecv(options, callback) {\n if (!(this instanceof WebRtcPeerSendrecv)) {\n return new WebRtcPeerSendrecv(options, callback);\n }\n WebRtcPeerSendrecv.super_.call(this, 'sendrecv', options, callback);\n}\ninherits(WebRtcPeerSendrecv, WebRtcPeer);\nfunction harkUtils(stream, options) {\n return hark(stream, options);\n}\nexports.bufferizeCandidates = bufferizeCandidates;\nexports.WebRtcPeerRecvonly = WebRtcPeerRecvonly;\nexports.WebRtcPeerSendonly = WebRtcPeerSendonly;\nexports.WebRtcPeerSendrecv = WebRtcPeerSendrecv;\nexports.hark = harkUtils;\n//# sourceMappingURL=WebRtcPeer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/WebRtcPeer.js\n// module chunks = main","var WebRtcPeer = require('./WebRtcPeer');\nexports.WebRtcPeer = WebRtcPeer;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/KurentoUtils/kurento-utils-js/index.js\n// module chunks = main","window.getScreenId = function (callback) {\n if (!!navigator.mozGetUserMedia) {\n callback(null, 'firefox', {\n video: {\n mozMediaSource: 'window',\n mediaSource: 'window'\n }\n });\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeMediaSourceId) {\n if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {\n callback('permission-denied');\n }\n else {\n callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));\n }\n window.removeEventListener('message', onIFrameCallback);\n }\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));\n window.removeEventListener('message', onIFrameCallback);\n }\n }\n setTimeout(postGetSourceIdMessage, 100);\n};\nfunction getScreenConstraints(error, sourceId) {\n var screen_constraints = {\n audio: false,\n video: {\n mandatory: {\n chromeMediaSource: error ? 'screen' : 'desktop',\n maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,\n maxHeight: window.screen.height > 1080 ? window.screen.height : 1080\n },\n optional: []\n }\n };\n if (sourceId) {\n screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;\n }\n return screen_constraints;\n}\nvar iframe;\nfunction postGetSourceIdMessage() {\n if (!iframe) {\n loadIFrame(postGetSourceIdMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetSourceIdMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n captureSourceId: true\n }, '*');\n}\nfunction loadIFrame(loadCallback) {\n if (iframe) {\n loadCallback();\n return;\n }\n iframe = document.createElement('iframe');\n iframe.onload = function () {\n iframe.isLoaded = true;\n loadCallback();\n };\n iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';\n iframe.style.display = 'none';\n (document.body || document.documentElement).appendChild(iframe);\n}\nwindow.getChromeExtensionStatus = function (callback) {\n if (!!navigator.mozGetUserMedia) {\n callback('installed-enabled');\n return;\n }\n window.addEventListener('message', onIFrameCallback);\n function onIFrameCallback(event) {\n if (!event.data)\n return;\n if (event.data.chromeExtensionStatus) {\n callback(event.data.chromeExtensionStatus);\n }\n window.removeEventListener('message', onIFrameCallback);\n }\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n};\nfunction postGetChromeExtensionStatusMessage() {\n if (!iframe) {\n loadIFrame(postGetChromeExtensionStatusMessage);\n return;\n }\n if (!iframe.isLoaded) {\n setTimeout(postGetChromeExtensionStatusMessage, 100);\n return;\n }\n iframe.contentWindow.postMessage({\n getChromeExtensionStatus: true\n }, '*');\n}\nexports.getScreenId = getScreenId;\n//# sourceMappingURL=Screen-Capturing-Auto.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing-Auto.js\n// module chunks = main","var chromeMediaSource = 'screen';\nvar screenCallback;\nvar isFirefox = typeof window.InstallTrigger !== 'undefined';\nvar isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;\nvar isChrome = !!window.chrome && !isOpera;\nwindow.addEventListener('message', function (event) {\n if (event.origin != window.location.origin) {\n return;\n }\n onMessageCallback(event.data);\n});\nfunction onMessageCallback(data) {\n if (data == 'PermissionDeniedError') {\n chromeMediaSource = 'PermissionDeniedError';\n if (screenCallback)\n return screenCallback('PermissionDeniedError');\n else\n throw new Error('PermissionDeniedError');\n }\n if (data == 'rtcmulticonnection-extension-loaded') {\n chromeMediaSource = 'desktop';\n }\n if (data.sourceId && screenCallback) {\n screenCallback(sourceId = data.sourceId);\n }\n}\nfunction isChromeExtensionAvailable(callback) {\n if (isFirefox)\n return callback(false);\n if (chromeMediaSource == 'desktop')\n return callback('isFirefox');\n window.postMessage('are-you-there', '*');\n setTimeout(function () {\n if (chromeMediaSource == 'screen') {\n callback('unavailable');\n }\n else\n callback('available');\n }, 2000);\n}\nfunction getSourceId(callback) {\n if (!callback)\n throw '\"callback\" parameter is mandatory.';\n if (sourceId)\n return callback(sourceId);\n screenCallback = callback;\n window.postMessage('get-sourceId', '*');\n}\nfunction getChromeExtensionStatus(extensionid, callback) {\n if (isFirefox)\n return callback('not-chrome');\n if (arguments.length != 2) {\n callback = extensionid;\n extensionid = 'ajhifddimkapgcifgcodmmfdlknahffk';\n }\n var image = document.createElement('img');\n image.src = 'chrome-extension://' + extensionid + '/icon.png';\n image.onload = function () {\n chromeMediaSource = 'screen';\n window.postMessage('are-you-there', '*');\n setTimeout(function () {\n if (chromeMediaSource == 'screen') {\n callback(extensionid == extensionid ? 'installed-enabled' : 'installed-disabled');\n }\n else\n callback('installed-enabled');\n }, 2000);\n };\n image.onerror = function () {\n callback('not-installed');\n };\n}\nfunction getScreenConstraints(callback) {\n sourceId = '';\n var firefoxScreenConstraints = {\n mozMediaSource: 'window',\n mediaSource: 'window'\n };\n if (isFirefox)\n return callback(null, firefoxScreenConstraints);\n var screen_constraints = {\n mandatory: {\n chromeMediaSource: chromeMediaSource,\n maxWidth: screen.width > 1920 ? screen.width : 1920,\n maxHeight: screen.height > 1080 ? screen.height : 1080\n },\n optional: []\n };\n if (chromeMediaSource == 'desktop' && !sourceId) {\n getSourceId(function () {\n screen_constraints.mandatory.chromeMediaSourceId = sourceId;\n callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);\n });\n return;\n }\n if (chromeMediaSource == 'desktop') {\n screen_constraints.mandatory.chromeMediaSourceId = sourceId;\n }\n callback(null, screen_constraints);\n}\nexports.getScreenConstraints = getScreenConstraints;\nexports.isChromeExtensionAvailable = isChromeExtensionAvailable;\nexports.getChromeExtensionStatus = getChromeExtensionStatus;\nexports.getSourceId = getSourceId;\n//# sourceMappingURL=Screen-Capturing.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/ScreenSharing/Screen-Capturing.js\n// module chunks = main","\"use strict\";\n/*\n * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nexports.__esModule = true;\nvar platform = require(\"platform\");\nvar WebRtcStats = /** @class */ (function () {\n function WebRtcStats(stream) {\n this.stream = stream;\n this.webRtcStatsEnabled = false;\n this.statsInterval = 1;\n this.stats = {\n inbound: {\n audio: {\n bytesReceived: 0,\n packetsReceived: 0,\n packetsLost: 0\n },\n video: {\n bytesReceived: 0,\n packetsReceived: 0,\n packetsLost: 0,\n framesDecoded: 0,\n nackCount: 0\n }\n },\n outbound: {\n audio: {\n bytesSent: 0,\n packetsSent: 0\n },\n video: {\n bytesSent: 0,\n packetsSent: 0,\n framesEncoded: 0,\n nackCount: 0\n }\n }\n };\n }\n WebRtcStats.prototype.isEnabled = function () {\n return this.webRtcStatsEnabled;\n };\n WebRtcStats.prototype.initWebRtcStats = function () {\n var _this = this;\n var elastestInstrumentation = localStorage.getItem('elastest-instrumentation');\n if (elastestInstrumentation) {\n // ElasTest instrumentation object found in local storage\n console.warn('WebRtc stats enabled for stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);\n this.webRtcStatsEnabled = true;\n var instrumentation_1 = JSON.parse(elastestInstrumentation);\n this.statsInterval = instrumentation_1.webrtc.interval; // Interval in seconds\n console.warn('localStorage item: ' + JSON.stringify(instrumentation_1));\n this.webRtcStatsIntervalId = setInterval(function () {\n _this.sendStatsToHttpEndpoint(instrumentation_1);\n }, this.statsInterval * 1000);\n return;\n }\n console.debug('WebRtc stats not enabled');\n };\n WebRtcStats.prototype.stopWebRtcStats = function () {\n if (this.webRtcStatsEnabled) {\n clearInterval(this.webRtcStatsIntervalId);\n console.warn('WebRtc stats stopped for disposed stream ' + this.stream.streamId + ' of connection ' + this.stream.connection.connectionId);\n }\n };\n WebRtcStats.prototype.sendStatsToHttpEndpoint = function (instrumentation) {\n var _this = this;\n var sendPost = function (json) {\n var http = new XMLHttpRequest();\n var url = instrumentation.webrtc.httpEndpoint;\n http.open('POST', url, true);\n http.setRequestHeader('Content-type', 'application/json');\n http.onreadystatechange = function () {\n if (http.readyState === 4 && http.status === 200) {\n console.log('WebRtc stats successfully sent to ' + url + ' for stream ' + _this.stream.streamId + ' of connection ' + _this.stream.connection.connectionId);\n }\n };\n http.send(json);\n };\n var f = function (stats) {\n if (platform.name.indexOf('Firefox') !== -1) {\n stats.forEach(function (stat) {\n var json = {};\n if ((stat.type === 'inbound-rtp') &&\n (\n // Avoid firefox empty outbound-rtp statistics\n stat.nackCount !== null &&\n stat.isRemote === false &&\n stat.id.startsWith('inbound') &&\n stat.remoteId.startsWith('inbound'))) {\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var jit = stat.jitter * 1000;\n var metrics = {\n bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n jitter: jit,\n packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n bytesReceived: 'bytes',\n jitter: 'ms',\n packetsReceived: 'packets',\n packetsLost: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.nackCount - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = 'frames';\n units['nackCount'] = 'packets';\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.nackCount;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ((stat.type === 'outbound-rtp') &&\n (\n // Avoid firefox empty inbound-rtp statistics\n stat.isRemote === false &&\n stat.id.toLowerCase().includes('outbound'))) {\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n bytesSent: 'bytes',\n packetsSent: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = 'frames';\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n });\n }\n else if (platform.name.indexOf('Chrome') !== -1) {\n for (var _i = 0, _a = Object.keys(stats); _i < _a.length; _i++) {\n var key = _a[_i];\n var stat = stats[key];\n if (stat.type === 'ssrc') {\n var json = {};\n if ('bytesReceived' in stat && ((stat.mediaType === 'audio' && 'audioOutputLevel' in stat) ||\n (stat.mediaType === 'video' && 'qpSum' in stat))) {\n // inbound-rtp\n var metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesReceived: (stat.bytesReceived - _this.stats.inbound[stat.mediaType].bytesReceived) / _this.statsInterval,\n jitter: stat.googJitterBufferMs,\n packetsReceived: (stat.packetsReceived - _this.stats.inbound[stat.mediaType].packetsReceived) / _this.statsInterval,\n packetsLost: (stat.packetsLost - _this.stats.inbound[stat.mediaType].packetsLost) / _this.statsInterval\n };\n var units = {\n bytesReceived: 'bytes',\n jitter: 'ms',\n packetsReceived: 'packets',\n packetsLost: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesDecoded'] = (stat.framesDecoded - _this.stats.inbound.video.framesDecoded) / _this.statsInterval;\n metrics['nackCount'] = (stat.googNacksSent - _this.stats.inbound.video.nackCount) / _this.statsInterval;\n units['framesDecoded'] = 'frames';\n units['nackCount'] = 'packets';\n _this.stats.inbound.video.framesDecoded = stat.framesDecoded;\n _this.stats.inbound.video.nackCount = stat.googNacksSent;\n }\n _this.stats.inbound[stat.mediaType].bytesReceived = stat.bytesReceived;\n _this.stats.inbound[stat.mediaType].packetsReceived = stat.packetsReceived;\n _this.stats.inbound[stat.mediaType].packetsLost = stat.packetsLost;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n else if ('bytesSent' in stat) {\n // outbound-rtp\n var metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;\n var metrics = {\n bytesSent: (stat.bytesSent - _this.stats.outbound[stat.mediaType].bytesSent) / _this.statsInterval,\n packetsSent: (stat.packetsSent - _this.stats.outbound[stat.mediaType].packetsSent) / _this.statsInterval\n };\n var units = {\n bytesSent: 'bytes',\n packetsSent: 'packets'\n };\n if (stat.mediaType === 'video') {\n metrics['framesEncoded'] = (stat.framesEncoded - _this.stats.outbound.video.framesEncoded) / _this.statsInterval;\n units['framesEncoded'] = 'frames';\n _this.stats.outbound.video.framesEncoded = stat.framesEncoded;\n }\n _this.stats.outbound[stat.mediaType].bytesSent = stat.bytesSent;\n _this.stats.outbound[stat.mediaType].packetsSent = stat.packetsSent;\n json = {\n '@timestamp': new Date(stat.timestamp).toISOString(),\n 'exec': instrumentation.exec,\n 'component': instrumentation.component,\n 'stream': 'webRtc',\n 'type': metricId,\n 'stream_type': 'composed_metrics',\n 'units': units\n };\n json[metricId] = metrics;\n sendPost(JSON.stringify(json));\n }\n }\n }\n }\n };\n this.getStatsAgnostic(this.stream.getRTCPeerConnection(), f, function (error) { console.log(error); });\n };\n WebRtcStats.prototype.standardizeReport = function (response) {\n if (platform.name.indexOf('Firefox') !== -1) {\n return response;\n }\n var standardReport = {};\n response.result().forEach(function (report) {\n var standardStats = {\n id: report.id,\n timestamp: report.timestamp,\n type: report.type\n };\n report.names().forEach(function (name) {\n standardStats[name] = report.stat(name);\n });\n standardReport[standardStats.id] = standardStats;\n });\n return standardReport;\n };\n WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) {\n var _this = this;\n if (platform.name.indexOf('Firefox') !== -1) {\n // getStats takes args in different order in Chrome and Firefox\n return pc.getStats(null, function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, failureCb);\n }\n else if (platform.name.indexOf('Chrome') !== -1) {\n // In Chrome, the first two arguments are reversed\n return pc.getStats(function (response) {\n var report = _this.standardizeReport(response);\n successCb(report);\n }, null, failureCb);\n }\n };\n return WebRtcStats;\n}());\nexports.WebRtcStats = WebRtcStats;\n//# sourceMappingURL=WebRtcStats.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js\n// module id = ../../../../openvidu-browser/lib/OpenViduInternal/WebRtcStats/WebRtcStats.js\n// module chunks = main","\"use strict\";\nexports.__esModule = true;\nvar OpenVidu_1 = require(\"./OpenVidu/OpenVidu\");\nexports.OpenVidu = OpenVidu_1.OpenVidu;\nvar Session_1 = require(\"./OpenVidu/Session\");\nexports.Session = Session_1.Session;\nvar Publisher_1 = require(\"./OpenVidu/Publisher\");\nexports.Publisher = Publisher_1.Publisher;\nvar Subscriber_1 = require(\"./OpenVidu/Subscriber\");\nexports.Subscriber = Subscriber_1.Subscriber;\nvar Stream_1 = require(\"./OpenVidu/Stream\");\nexports.Stream = Stream_1.Stream;\nvar Connection_1 = require(\"./OpenVidu/Connection\");\nexports.Connection = Connection_1.Connection;\nvar LocalRecorder_1 = require(\"./OpenVidu/LocalRecorder\");\nexports.LocalRecorder = LocalRecorder_1.LocalRecorder;\nvar LocalRecorderState_1 = require(\"./OpenViduInternal/Enums/LocalRecorderState\");\nexports.LocalRecorderState = LocalRecorderState_1.LocalRecorderState;\nvar OpenViduError_1 = require(\"./OpenViduInternal/Enums/OpenViduError\");\nexports.OpenViduError = OpenViduError_1.OpenViduError;\nvar VideoInsertMode_1 = require(\"./OpenViduInternal/Enums/VideoInsertMode\");\nexports.VideoInsertMode = VideoInsertMode_1.VideoInsertMode;\nvar Event_1 = require(\"./OpenViduInternal/Events/Event\");\nexports.Event = Event_1.Event;\nvar ConnectionEvent_1 = require(\"./OpenViduInternal/Events/ConnectionEvent\");\nexports.ConnectionEvent = ConnectionEvent_1.ConnectionEvent;\nvar PublisherSpeakingEvent_1 = require(\"./OpenViduInternal/Events/PublisherSpeakingEvent\");\nexports.PublisherSpeakingEvent = PublisherSpeakingEvent_1.PublisherSpeakingEvent;\nvar RecordingEvent_1 = require(\"./OpenViduInternal/Events/RecordingEvent\");\nexports.RecordingEvent = RecordingEvent_1.RecordingEvent;\nvar SessionDisconnectedEvent_1 = require(\"./OpenViduInternal/Events/SessionDisconnectedEvent\");\nexports.SessionDisconnectedEvent = SessionDisconnectedEvent_1.SessionDisconnectedEvent;\nvar SignalEvent_1 = require(\"./OpenViduInternal/Events/SignalEvent\");\nexports.SignalEvent = SignalEvent_1.SignalEvent;\nvar StreamEvent_1 = require(\"./OpenViduInternal/Events/StreamEvent\");\nexports.StreamEvent = StreamEvent_1.StreamEvent;\nvar VideoElementEvent_1 = require(\"./OpenViduInternal/Events/VideoElementEvent\");\nexports.VideoElementEvent = VideoElementEvent_1.VideoElementEvent;\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/lib/index.js\n// module id = ../../../../openvidu-browser/lib/index.js\n// module chunks = main","/* jshint node: true */\n'use strict';\n\nvar normalice = require('normalice');\n\n/**\n # freeice\n\n The `freeice` module is a simple way of getting random STUN or TURN server\n for your WebRTC application. The list of servers (just STUN at this stage)\n were sourced from this [gist](https://gist.github.com/zziuni/3741933).\n\n ## Example Use\n\n The following demonstrates how you can use `freeice` with\n [rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect):\n\n <<< examples/quickconnect.js\n\n As the `freeice` module generates ice servers in a list compliant with the\n WebRTC spec you will be able to use it with raw `RTCPeerConnection`\n constructors and other WebRTC libraries.\n\n ## Hey, don't use my STUN/TURN server!\n\n If for some reason your free STUN or TURN server ends up in the\n list of servers ([stun](https://github.com/DamonOehlman/freeice/blob/master/stun.json) or\n [turn](https://github.com/DamonOehlman/freeice/blob/master/turn.json))\n that is used in this module, you can feel\n free to open an issue on this repository and those servers will be removed\n within 24 hours (or sooner). This is the quickest and probably the most\n polite way to have something removed (and provides us some visibility\n if someone opens a pull request requesting that a server is added).\n\n ## Please add my server!\n\n If you have a server that you wish to add to the list, that's awesome! I'm\n sure I speak on behalf of a whole pile of WebRTC developers who say thanks.\n To get it into the list, feel free to either open a pull request or if you\n find that process a bit daunting then just create an issue requesting\n the addition of the server (make sure you provide all the details, and if\n you have a Terms of Service then including that in the PR/issue would be\n awesome).\n\n ## I know of a free server, can I add it?\n\n Sure, if you do your homework and make sure it is ok to use (I'm currently\n in the process of reviewing the terms of those STUN servers included from\n the original list). If it's ok to go, then please see the previous entry\n for how to add it.\n\n ## Current List of Servers\n\n * current as at the time of last `README.md` file generation\n\n ### STUN\n\n <<< stun.json\n\n ### TURN\n\n <<< turn.json\n\n**/\n\nvar freeice = module.exports = function(opts) {\n // if a list of servers has been provided, then use it instead of defaults\n var servers = {\n stun: (opts || {}).stun || require('./stun.json'),\n turn: (opts || {}).turn || require('./turn.json')\n };\n\n var stunCount = (opts || {}).stunCount || 2;\n var turnCount = (opts || {}).turnCount || 0;\n var selected;\n\n function getServers(type, count) {\n var out = [];\n var input = [].concat(servers[type]);\n var idx;\n\n while (input.length && out.length < count) {\n idx = (Math.random() * input.length) | 0;\n out = out.concat(input.splice(idx, 1));\n }\n\n return out.map(function(url) {\n //If it's a not a string, don't try to \"normalice\" it otherwise using type:url will screw it up\n if ((typeof url !== 'string') && (! (url instanceof String))) {\n return url;\n } else {\n return normalice(type + ':' + url);\n }\n });\n }\n\n // add stun servers\n selected = [].concat(getServers('stun', stunCount));\n\n if (turnCount) {\n selected = selected.concat(getServers('turn', turnCount));\n }\n\n return selected;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/freeice/index.js\n// module id = ../../../../openvidu-browser/node_modules/freeice/index.js\n// module chunks = main","module.exports = [\"stun.l.google.com:19302\",\"stun1.l.google.com:19302\",\"stun2.l.google.com:19302\",\"stun3.l.google.com:19302\",\"stun4.l.google.com:19302\",\"stun.ekiga.net\",\"stun.ideasip.com\",\"stun.schlund.de\",\"stun.stunprotocol.org:3478\",\"stun.voiparound.com\",\"stun.voipbuster.com\",\"stun.voipstunt.com\",\"stun.voxgratia.org\",\"stun.services.mozilla.com\"]\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/freeice/stun.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/stun.json\n// module chunks = main","module.exports = []\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/freeice/turn.json\n// module id = ../../../../openvidu-browser/node_modules/freeice/turn.json\n// module chunks = main","var WildEmitter = require('wildemitter');\n\nfunction getMaxVolume (analyser, fftBins) {\n var maxVolume = -Infinity;\n analyser.getFloatFrequencyData(fftBins);\n\n for(var i=4, ii=fftBins.length; i < ii; i++) {\n if (fftBins[i] > maxVolume && fftBins[i] < 0) {\n maxVolume = fftBins[i];\n }\n };\n\n return maxVolume;\n}\n\n\nvar audioContextType;\nif (typeof window !== 'undefined') {\n audioContextType = window.AudioContext || window.webkitAudioContext;\n}\n// use a single audio context due to hardware limits\nvar audioContext = null;\nmodule.exports = function(stream, options) {\n var harker = new WildEmitter();\n\n\n // make it not break in non-supported browsers\n if (!audioContextType) return harker;\n\n //Config\n var options = options || {},\n smoothing = (options.smoothing || 0.1),\n interval = (options.interval || 50),\n threshold = options.threshold,\n play = options.play,\n history = options.history || 10,\n running = true;\n\n //Setup Audio Context\n if (!audioContext) {\n audioContext = new audioContextType();\n }\n var sourceNode, fftBins, analyser;\n\n analyser = audioContext.createAnalyser();\n analyser.fftSize = 512;\n analyser.smoothingTimeConstant = smoothing;\n fftBins = new Float32Array(analyser.frequencyBinCount);\n\n if (stream.jquery) stream = stream[0];\n if (stream instanceof HTMLAudioElement || stream instanceof HTMLVideoElement) {\n //Audio Tag\n sourceNode = audioContext.createMediaElementSource(stream);\n if (typeof play === 'undefined') play = true;\n threshold = threshold || -50;\n } else {\n //WebRTC Stream\n sourceNode = audioContext.createMediaStreamSource(stream);\n threshold = threshold || -50;\n }\n\n sourceNode.connect(analyser);\n if (play) analyser.connect(audioContext.destination);\n\n harker.speaking = false;\n\n harker.suspend = function() {\n audioContext.suspend();\n }\n harker.resume = function() {\n audioContext.resume();\n }\n Object.defineProperty(harker, 'state', { get: function() {\n return audioContext.state;\n }});\n audioContext.onstatechange = function() {\n harker.emit('state_change', audioContext.state);\n }\n\n harker.setThreshold = function(t) {\n threshold = t;\n };\n\n harker.setInterval = function(i) {\n interval = i;\n };\n\n harker.stop = function() {\n running = false;\n harker.emit('volume_change', -100, threshold);\n if (harker.speaking) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n analyser.disconnect();\n sourceNode.disconnect();\n };\n harker.speakingHistory = [];\n for (var i = 0; i < history; i++) {\n harker.speakingHistory.push(0);\n }\n\n // Poll the analyser node to determine if speaking\n // and emit events if changed\n var looper = function() {\n setTimeout(function() {\n\n //check if stop has been called\n if(!running) {\n return;\n }\n\n var currentVolume = getMaxVolume(analyser, fftBins);\n\n harker.emit('volume_change', currentVolume, threshold);\n\n var history = 0;\n if (currentVolume > threshold && !harker.speaking) {\n // trigger quickly, short history\n for (var i = harker.speakingHistory.length - 3; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history >= 2) {\n harker.speaking = true;\n harker.emit('speaking');\n }\n } else if (currentVolume < threshold && harker.speaking) {\n for (var i = 0; i < harker.speakingHistory.length; i++) {\n history += harker.speakingHistory[i];\n }\n if (history == 0) {\n harker.speaking = false;\n harker.emit('stopped_speaking');\n }\n }\n harker.speakingHistory.shift();\n harker.speakingHistory.push(0 + (currentVolume > threshold));\n\n looper();\n }, interval);\n };\n looper();\n\n\n return harker;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/hark/hark.js\n// module id = ../../../../openvidu-browser/node_modules/hark/hark.js\n// module chunks = main","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/inherits/inherits_browser.js\n// module id = ../../../../openvidu-browser/node_modules/inherits/inherits_browser.js\n// module chunks = main","/*!\r\n * @name JavaScript/NodeJS Merge v1.2.0\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\r\n\r\n;(function(isNode) {\r\n\r\n\t/**\r\n\t * Merge one or more objects \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tvar Public = function(clone) {\r\n\r\n\t\treturn merge(clone === true, false, arguments);\r\n\r\n\t}, publicName = 'merge';\r\n\r\n\t/**\r\n\t * Merge two or more objects recursively \r\n\t * @param bool? clone\r\n\t * @param mixed,... arguments\r\n\t * @return object\r\n\t */\r\n\r\n\tPublic.recursive = function(clone) {\r\n\r\n\t\treturn merge(clone === true, true, arguments);\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Clone the input removing any reference\r\n\t * @param mixed input\r\n\t * @return mixed\r\n\t */\r\n\r\n\tPublic.clone = function(input) {\r\n\r\n\t\tvar output = input,\r\n\t\t\ttype = typeOf(input),\r\n\t\t\tindex, size;\r\n\r\n\t\tif (type === 'array') {\r\n\r\n\t\t\toutput = [];\r\n\t\t\tsize = input.length;\r\n\r\n\t\t\tfor (index=0;index 1) {\n url = parts[1];\n parts = parts[0].split(':');\n\n // add the output credential and username\n output.username = parts[0];\n output.credential = (input || {}).credential || parts[1] || '';\n }\n\n output.url = protocol + url;\n output.urls = [ output.url ];\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/normalice/index.js\n// module id = ../../../../openvidu-browser/node_modules/normalice/index.js\n// module chunks = main","/*!\n * Platform.js \n * Copyright 2014-2018 Benjamin Tan \n * Copyright 2011-2013 John-David Dalton \n * Available under MIT license \n */\n;(function() {\n 'use strict';\n\n /** Used to determine if values are of the language type `Object`. */\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n /** Used as a reference to the global object. */\n var root = (objectTypes[typeof window] && window) || this;\n\n /** Backup possible global object. */\n var oldRoot = root;\n\n /** Detect free variable `exports`. */\n var freeExports = objectTypes[typeof exports] && exports;\n\n /** Detect free variable `module`. */\n var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;\n\n /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */\n var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n }\n\n /**\n * Used as the maximum length of an array-like object.\n * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)\n * for more details.\n */\n var maxSafeInteger = Math.pow(2, 53) - 1;\n\n /** Regular expression to detect Opera. */\n var reOpera = /\\bOpera/;\n\n /** Possible global object. */\n var thisBinding = this;\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check for own properties of an object. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to resolve the internal `[[Class]]` of values. */\n var toString = objectProto.toString;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Capitalizes a string value.\n *\n * @private\n * @param {string} string The string to capitalize.\n * @returns {string} The capitalized string.\n */\n function capitalize(string) {\n string = String(string);\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n /**\n * A utility function to clean up the OS name.\n *\n * @private\n * @param {string} os The OS name to clean up.\n * @param {string} [pattern] A `RegExp` pattern matching the OS name.\n * @param {string} [label] A label for the OS.\n */\n function cleanupOS(os, pattern, label) {\n // Platform tokens are defined at:\n // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n var data = {\n '10.0': '10',\n '6.4': '10 Technical Preview',\n '6.3': '8.1',\n '6.2': '8',\n '6.1': 'Server 2008 R2 / 7',\n '6.0': 'Server 2008 / Vista',\n '5.2': 'Server 2003 / XP 64-bit',\n '5.1': 'XP',\n '5.01': '2000 SP1',\n '5.0': '2000',\n '4.0': 'NT',\n '4.90': 'ME'\n };\n // Detect Windows version from platform tokens.\n if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) &&\n (data = data[/[\\d.]+$/.exec(os)])) {\n os = 'Windows ' + data;\n }\n // Correct character case and cleanup string.\n os = String(os);\n\n if (pattern && label) {\n os = os.replace(RegExp(pattern, 'i'), label);\n }\n\n os = format(\n os.replace(/ ce$/i, ' CE')\n .replace(/\\bhpw/i, 'web')\n .replace(/\\bMacintosh\\b/, 'Mac OS')\n .replace(/_PowerPC\\b/i, ' OS')\n .replace(/\\b(OS X) [^ \\d]+/i, '$1')\n .replace(/\\bMac (OS X)\\b/, '$1')\n .replace(/\\/(\\d)/, ' $1')\n .replace(/_/g, '.')\n .replace(/(?: BePC|[ .]*fc[ \\d.]+)$/i, '')\n .replace(/\\bx86\\.64\\b/gi, 'x86_64')\n .replace(/\\b(Windows Phone) OS\\b/, '$1')\n .replace(/\\b(Chrome OS \\w+) [\\d.]+\\b/, '$1')\n .split(' on ')[0]\n );\n\n return os;\n }\n\n /**\n * An iteration utility for arrays and objects.\n *\n * @private\n * @param {Array|Object} object The object to iterate over.\n * @param {Function} callback The function called per iteration.\n */\n function each(object, callback) {\n var index = -1,\n length = object ? object.length : 0;\n\n if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {\n while (++index < length) {\n callback(object[index], index, object);\n }\n } else {\n forOwn(object, callback);\n }\n }\n\n /**\n * Trim and conditionally capitalize string values.\n *\n * @private\n * @param {string} string The string to format.\n * @returns {string} The formatted string.\n */\n function format(string) {\n string = trim(string);\n return /^(?:webOS|i(?:OS|P))/.test(string)\n ? string\n : capitalize(string);\n }\n\n /**\n * Iterates over an object's own properties, executing the `callback` for each.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} callback The function executed per own property.\n */\n function forOwn(object, callback) {\n for (var key in object) {\n if (hasOwnProperty.call(object, key)) {\n callback(object[key], key, object);\n }\n }\n }\n\n /**\n * Gets the internal `[[Class]]` of a value.\n *\n * @private\n * @param {*} value The value.\n * @returns {string} The `[[Class]]`.\n */\n function getClassOf(value) {\n return value == null\n ? capitalize(value)\n : toString.call(value).slice(8, -1);\n }\n\n /**\n * Host objects can return type values that are different from their actual\n * data type. The objects we are concerned with usually return non-primitive\n * types of \"object\", \"function\", or \"unknown\".\n *\n * @private\n * @param {*} object The owner of the property.\n * @param {string} property The property to check.\n * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.\n */\n function isHostType(object, property) {\n var type = object != null ? typeof object[property] : 'number';\n return !/^(?:boolean|number|string|undefined)$/.test(type) &&\n (type == 'object' ? !!object[property] : true);\n }\n\n /**\n * Prepares a string for use in a `RegExp` by making hyphens and spaces optional.\n *\n * @private\n * @param {string} string The string to qualify.\n * @returns {string} The qualified string.\n */\n function qualify(string) {\n return String(string).replace(/([ -])(?!$)/g, '$1?');\n }\n\n /**\n * A bare-bones `Array#reduce` like utility function.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function called per iteration.\n * @returns {*} The accumulated result.\n */\n function reduce(array, callback) {\n var accumulator = null;\n each(array, function(value, index) {\n accumulator = callback(accumulator, value, index, array);\n });\n return accumulator;\n }\n\n /**\n * Removes leading and trailing whitespace from a string.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} The trimmed string.\n */\n function trim(string) {\n return String(string).replace(/^ +| +$/g, '');\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Creates a new platform object.\n *\n * @memberOf platform\n * @param {Object|string} [ua=navigator.userAgent] The user agent string or\n * context object.\n * @returns {Object} A platform object.\n */\n function parse(ua) {\n\n /** The environment context object. */\n var context = root;\n\n /** Used to flag when a custom context is provided. */\n var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String';\n\n // Juggle arguments.\n if (isCustomContext) {\n context = ua;\n ua = null;\n }\n\n /** Browser navigator object. */\n var nav = context.navigator || {};\n\n /** Browser user agent string. */\n var userAgent = nav.userAgent || '';\n\n ua || (ua = userAgent);\n\n /** Used to flag when `thisBinding` is the [ModuleScope]. */\n var isModuleScope = isCustomContext || thisBinding == oldRoot;\n\n /** Used to detect if browser is like Chrome. */\n var likeChrome = isCustomContext\n ? !!nav.likeChrome\n : /\\bChrome\\b/.test(ua) && !/internal|\\n/i.test(toString.toString());\n\n /** Internal `[[Class]]` value shortcuts. */\n var objectClass = 'Object',\n airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject',\n enviroClass = isCustomContext ? objectClass : 'Environment',\n javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java),\n phantomClass = isCustomContext ? objectClass : 'RuntimeObject';\n\n /** Detect Java environments. */\n var java = /\\bJava/.test(javaClass) && context.java;\n\n /** Detect Rhino. */\n var rhino = java && getClassOf(context.environment) == enviroClass;\n\n /** A character to represent alpha. */\n var alpha = java ? 'a' : '\\u03b1';\n\n /** A character to represent beta. */\n var beta = java ? 'b' : '\\u03b2';\n\n /** Browser document object. */\n var doc = context.document || {};\n\n /**\n * Detect Opera browser (Presto-based).\n * http://www.howtocreate.co.uk/operaStuff/operaObject.html\n * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini\n */\n var opera = context.operamini || context.opera;\n\n /** Opera `[[Class]]`. */\n var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera))\n ? operaClass\n : (opera = null);\n\n /*------------------------------------------------------------------------*/\n\n /** Temporary variable used over the script's lifetime. */\n var data;\n\n /** The CPU architecture. */\n var arch = ua;\n\n /** Platform description array. */\n var description = [];\n\n /** Platform alpha/beta indicator. */\n var prerelease = null;\n\n /** A flag to indicate that environment features should be used to resolve the platform. */\n var useFeatures = ua == userAgent;\n\n /** The browser/environment version. */\n var version = useFeatures && opera && typeof opera.version == 'function' && opera.version();\n\n /** A flag to indicate if the OS ends with \"/ Version\" */\n var isSpecialCasedOS;\n\n /* Detectable layout engines (order is important). */\n var layout = getLayout([\n { 'label': 'EdgeHTML', 'pattern': 'Edge' },\n 'Trident',\n { 'label': 'WebKit', 'pattern': 'AppleWebKit' },\n 'iCab',\n 'Presto',\n 'NetFront',\n 'Tasman',\n 'KHTML',\n 'Gecko'\n ]);\n\n /* Detectable browser names (order is important). */\n var name = getName([\n 'Adobe AIR',\n 'Arora',\n 'Avant Browser',\n 'Breach',\n 'Camino',\n 'Electron',\n 'Epiphany',\n 'Fennec',\n 'Flock',\n 'Galeon',\n 'GreenBrowser',\n 'iCab',\n 'Iceweasel',\n 'K-Meleon',\n 'Konqueror',\n 'Lunascape',\n 'Maxthon',\n { 'label': 'Microsoft Edge', 'pattern': 'Edge' },\n 'Midori',\n 'Nook Browser',\n 'PaleMoon',\n 'PhantomJS',\n 'Raven',\n 'Rekonq',\n 'RockMelt',\n { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' },\n 'SeaMonkey',\n { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n 'Sleipnir',\n 'SlimBrowser',\n { 'label': 'SRWare Iron', 'pattern': 'Iron' },\n 'Sunrise',\n 'Swiftfox',\n 'Waterfox',\n 'WebPositive',\n 'Opera Mini',\n { 'label': 'Opera Mini', 'pattern': 'OPiOS' },\n 'Opera',\n { 'label': 'Opera', 'pattern': 'OPR' },\n 'Chrome',\n { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },\n { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },\n { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },\n { 'label': 'IE', 'pattern': 'IEMobile' },\n { 'label': 'IE', 'pattern': 'MSIE' },\n 'Safari'\n ]);\n\n /* Detectable products (order is important). */\n var product = getProduct([\n { 'label': 'BlackBerry', 'pattern': 'BB10' },\n 'BlackBerry',\n { 'label': 'Galaxy S', 'pattern': 'GT-I9000' },\n { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' },\n { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' },\n { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' },\n { 'label': 'Galaxy S5', 'pattern': 'SM-G900' },\n { 'label': 'Galaxy S6', 'pattern': 'SM-G920' },\n { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' },\n { 'label': 'Galaxy S7', 'pattern': 'SM-G930' },\n { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' },\n 'Google TV',\n 'Lumia',\n 'iPad',\n 'iPod',\n 'iPhone',\n 'Kindle',\n { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n 'Nexus',\n 'Nook',\n 'PlayBook',\n 'PlayStation Vita',\n 'PlayStation',\n 'TouchPad',\n 'Transformer',\n { 'label': 'Wii U', 'pattern': 'WiiU' },\n 'Wii',\n 'Xbox One',\n { 'label': 'Xbox 360', 'pattern': 'Xbox' },\n 'Xoom'\n ]);\n\n /* Detectable manufacturers. */\n var manufacturer = getManufacturer({\n 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },\n 'Archos': {},\n 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },\n 'Asus': { 'Transformer': 1 },\n 'Barnes & Noble': { 'Nook': 1 },\n 'BlackBerry': { 'PlayBook': 1 },\n 'Google': { 'Google TV': 1, 'Nexus': 1 },\n 'HP': { 'TouchPad': 1 },\n 'HTC': {},\n 'LG': {},\n 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },\n 'Motorola': { 'Xoom': 1 },\n 'Nintendo': { 'Wii U': 1, 'Wii': 1 },\n 'Nokia': { 'Lumia': 1 },\n 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },\n 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }\n });\n\n /* Detectable operating systems (order is important). */\n var os = getOS([\n 'Windows Phone',\n 'Android',\n 'CentOS',\n { 'label': 'Chrome OS', 'pattern': 'CrOS' },\n 'Debian',\n 'Fedora',\n 'FreeBSD',\n 'Gentoo',\n 'Haiku',\n 'Kubuntu',\n 'Linux Mint',\n 'OpenBSD',\n 'Red Hat',\n 'SuSE',\n 'Ubuntu',\n 'Xubuntu',\n 'Cygwin',\n 'Symbian OS',\n 'hpwOS',\n 'webOS ',\n 'webOS',\n 'Tablet OS',\n 'Tizen',\n 'Linux',\n 'Mac OS X',\n 'Macintosh',\n 'Mac',\n 'Windows 98;',\n 'Windows '\n ]);\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Picks the layout engine from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected layout engine.\n */\n function getLayout(guesses) {\n return reduce(guesses, function(result, guess) {\n return result || RegExp('\\\\b' + (\n guess.pattern || qualify(guess)\n ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n });\n }\n\n /**\n * Picks the manufacturer from an array of guesses.\n *\n * @private\n * @param {Array} guesses An object of guesses.\n * @returns {null|string} The detected manufacturer.\n */\n function getManufacturer(guesses) {\n return reduce(guesses, function(result, value, key) {\n // Lookup the manufacturer by product or scan the UA for the manufacturer.\n return result || (\n value[product] ||\n value[/^[a-z]+(?: +[a-z]+\\b)*/i.exec(product)] ||\n RegExp('\\\\b' + qualify(key) + '(?:\\\\b|\\\\w*\\\\d)', 'i').exec(ua)\n ) && key;\n });\n }\n\n /**\n * Picks the browser name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected browser name.\n */\n function getName(guesses) {\n return reduce(guesses, function(result, guess) {\n return result || RegExp('\\\\b' + (\n guess.pattern || qualify(guess)\n ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n });\n }\n\n /**\n * Picks the OS name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected OS name.\n */\n function getOS(guesses) {\n return reduce(guesses, function(result, guess) {\n var pattern = guess.pattern || qualify(guess);\n if (!result && (result =\n RegExp('\\\\b' + pattern + '(?:/[\\\\d.]+|[ \\\\w.]*)', 'i').exec(ua)\n )) {\n result = cleanupOS(result, pattern, guess.label || guess);\n }\n return result;\n });\n }\n\n /**\n * Picks the product name from an array of guesses.\n *\n * @private\n * @param {Array} guesses An array of guesses.\n * @returns {null|string} The detected product name.\n */\n function getProduct(guesses) {\n return reduce(guesses, function(result, guess) {\n var pattern = guess.pattern || qualify(guess);\n if (!result && (result =\n RegExp('\\\\b' + pattern + ' *\\\\d+[.\\\\w_]*', 'i').exec(ua) ||\n RegExp('\\\\b' + pattern + ' *\\\\w+-[\\\\w]*', 'i').exec(ua) ||\n RegExp('\\\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\\\d+|[^ ();-]*)', 'i').exec(ua)\n )) {\n // Split by forward slash and append product version if needed.\n if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\\d.]+/.test(result[0])) {\n result[0] += ' ' + result[1];\n }\n // Correct character case and cleanup string.\n guess = guess.label || guess;\n result = format(result[0]\n .replace(RegExp(pattern, 'i'), guess)\n .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ')\n .replace(RegExp('(' + guess + ')[-_.]?(\\\\w)', 'i'), '$1 $2'));\n }\n return result;\n });\n }\n\n /**\n * Resolves the version using an array of UA patterns.\n *\n * @private\n * @param {Array} patterns An array of UA patterns.\n * @returns {null|string} The detected version.\n */\n function getVersion(patterns) {\n return reduce(patterns, function(result, pattern) {\n return result || (RegExp(pattern +\n '(?:-[\\\\d.]+/|(?: for [\\\\w-]+)?[ /-])([\\\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;\n });\n }\n\n /**\n * Returns `platform.description` when the platform object is coerced to a string.\n *\n * @name toString\n * @memberOf platform\n * @returns {string} Returns `platform.description` if available, else an empty string.\n */\n function toStringPlatform() {\n return this.description || '';\n }\n\n /*------------------------------------------------------------------------*/\n\n // Convert layout to an array so we can add extra details.\n layout && (layout = [layout]);\n\n // Detect product names that contain their manufacturer's name.\n if (manufacturer && !product) {\n product = getProduct([manufacturer]);\n }\n // Clean up Google TV.\n if ((data = /\\bGoogle TV\\b/.exec(product))) {\n product = data[0];\n }\n // Detect simulators.\n if (/\\bSimulator\\b/i.test(ua)) {\n product = (product ? product + ' ' : '') + 'Simulator';\n }\n // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS.\n if (name == 'Opera Mini' && /\\bOPiOS\\b/.test(ua)) {\n description.push('running in Turbo/Uncompressed mode');\n }\n // Detect IE Mobile 11.\n if (name == 'IE' && /\\blike iPhone OS\\b/.test(ua)) {\n data = parse(ua.replace(/like iPhone OS/, ''));\n manufacturer = data.manufacturer;\n product = data.product;\n }\n // Detect iOS.\n else if (/^iP/.test(product)) {\n name || (name = 'Safari');\n os = 'iOS' + ((data = / OS ([\\d_]+)/i.exec(ua))\n ? ' ' + data[1].replace(/_/g, '.')\n : '');\n }\n // Detect Kubuntu.\n else if (name == 'Konqueror' && !/buntu/i.test(os)) {\n os = 'Kubuntu';\n }\n // Detect Android browsers.\n else if ((manufacturer && manufacturer != 'Google' &&\n ((/Chrome/.test(name) && !/\\bMobile Safari\\b/i.test(ua)) || /\\bVita\\b/.test(product))) ||\n (/\\bAndroid\\b/.test(os) && /^Chrome/.test(name) && /\\bVersion\\//i.test(ua))) {\n name = 'Android Browser';\n os = /\\bAndroid\\b/.test(os) ? os : 'Android';\n }\n // Detect Silk desktop/accelerated modes.\n else if (name == 'Silk') {\n if (!/\\bMobi/i.test(ua)) {\n os = 'Android';\n description.unshift('desktop mode');\n }\n if (/Accelerated *= *true/i.test(ua)) {\n description.unshift('accelerated');\n }\n }\n // Detect PaleMoon identifying as Firefox.\n else if (name == 'PaleMoon' && (data = /\\bFirefox\\/([\\d.]+)\\b/.exec(ua))) {\n description.push('identifying as Firefox ' + data[1]);\n }\n // Detect Firefox OS and products running Firefox.\n else if (name == 'Firefox' && (data = /\\b(Mobile|Tablet|TV)\\b/i.exec(ua))) {\n os || (os = 'Firefox OS');\n product || (product = data[1]);\n }\n // Detect false positives for Firefox/Safari.\n else if (!name || (data = !/\\bMinefield\\b/i.test(ua) && /\\b(?:Firefox|Safari)\\b/.exec(name))) {\n // Escape the `/` for Firefox 1.\n if (name && !product && /[\\/,]|^[^(]+?\\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) {\n // Clear name of false positives.\n name = null;\n }\n // Reassign a generic name.\n if ((data = product || manufacturer || os) &&\n (product || manufacturer || /\\b(?:Android|Symbian OS|Tablet OS|webOS)\\b/.test(os))) {\n name = /[a-z]+(?: Hat)?/i.exec(/\\bAndroid\\b/.test(os) ? os : data) + ' Browser';\n }\n }\n // Add Chrome version to description for Electron.\n else if (name == 'Electron' && (data = (/\\bChrome\\/([\\d.]+)\\b/.exec(ua) || 0)[1])) {\n description.push('Chromium ' + data);\n }\n // Detect non-Opera (Presto-based) versions (order is important).\n if (!version) {\n version = getVersion([\n '(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\\\d.]+$))',\n 'Version',\n qualify(name),\n '(?:Firefox|Minefield|NetFront)'\n ]);\n }\n // Detect stubborn layout engines.\n if ((data =\n layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' ||\n /\\bOpera\\b/.test(name) && (/\\bOPR\\b/.test(ua) ? 'Blink' : 'Presto') ||\n /\\b(?:Midori|Nook|Safari)\\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' ||\n !layout && /\\bMSIE\\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') ||\n layout == 'WebKit' && /\\bPlayStation\\b(?! Vita\\b)/i.test(name) && 'NetFront'\n )) {\n layout = [data];\n }\n // Detect Windows Phone 7 desktop mode.\n if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(ua) || 0)[1])) {\n name += ' Mobile';\n os = 'Windows Phone ' + (/\\+$/.test(data) ? data : data + '.x');\n description.unshift('desktop mode');\n }\n // Detect Windows Phone 8.x desktop mode.\n else if (/\\bWPDesktop\\b/i.test(ua)) {\n name = 'IE Mobile';\n os = 'Windows Phone 8.x';\n description.unshift('desktop mode');\n version || (version = (/\\brv:([\\d.]+)/.exec(ua) || 0)[1]);\n }\n // Detect IE 11 identifying as other browsers.\n else if (name != 'IE' && layout == 'Trident' && (data = /\\brv:([\\d.]+)/.exec(ua))) {\n if (name) {\n description.push('identifying as ' + name + (version ? ' ' + version : ''));\n }\n name = 'IE';\n version = data[1];\n }\n // Leverage environment features.\n if (useFeatures) {\n // Detect server-side environments.\n // Rhino has a global function while others have a global object.\n if (isHostType(context, 'global')) {\n if (java) {\n data = java.lang.System;\n arch = data.getProperty('os.arch');\n os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version');\n }\n if (rhino) {\n try {\n version = context.require('ringo/engine').version.join('.');\n name = 'RingoJS';\n } catch(e) {\n if ((data = context.system) && data.global.system == context.system) {\n name = 'Narwhal';\n os || (os = data[0].os || null);\n }\n }\n if (!name) {\n name = 'Rhino';\n }\n }\n else if (\n typeof context.process == 'object' && !context.process.browser &&\n (data = context.process)\n ) {\n if (typeof data.versions == 'object') {\n if (typeof data.versions.electron == 'string') {\n description.push('Node ' + data.versions.node);\n name = 'Electron';\n version = data.versions.electron;\n } else if (typeof data.versions.nw == 'string') {\n description.push('Chromium ' + version, 'Node ' + data.versions.node);\n name = 'NW.js';\n version = data.versions.nw;\n }\n }\n if (!name) {\n name = 'Node.js';\n arch = data.arch;\n os = data.platform;\n version = /[\\d.]+/.exec(data.version);\n version = version ? version[0] : null;\n }\n }\n }\n // Detect Adobe AIR.\n else if (getClassOf((data = context.runtime)) == airRuntimeClass) {\n name = 'Adobe AIR';\n os = data.flash.system.Capabilities.os;\n }\n // Detect PhantomJS.\n else if (getClassOf((data = context.phantom)) == phantomClass) {\n name = 'PhantomJS';\n version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch);\n }\n // Detect IE compatibility modes.\n else if (typeof doc.documentMode == 'number' && (data = /\\bTrident\\/(\\d+)/i.exec(ua))) {\n // We're in compatibility mode when the Trident version + 4 doesn't\n // equal the document mode.\n version = [version, doc.documentMode];\n if ((data = +data[1] + 4) != version[1]) {\n description.push('IE ' + version[1] + ' mode');\n layout && (layout[1] = '');\n version[1] = data;\n }\n version = name == 'IE' ? String(version[1].toFixed(1)) : version[0];\n }\n // Detect IE 11 masking as other browsers.\n else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\\b/.test(name)) {\n description.push('masking as ' + name + ' ' + version);\n name = 'IE';\n version = '11.0';\n layout = ['Trident'];\n os = 'Windows';\n }\n os = os && format(os);\n }\n // Detect prerelease phases.\n if (version && (data =\n /(?:[ab]|dp|pre|[ab]\\d+pre)(?:\\d+\\+?)?$/i.exec(version) ||\n /(?:alpha|beta)(?: ?\\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) ||\n /\\bMinefield\\b/i.test(ua) && 'a'\n )) {\n prerelease = /b/i.test(data) ? 'beta' : 'alpha';\n version = version.replace(RegExp(data + '\\\\+?$'), '') +\n (prerelease == 'beta' ? beta : alpha) + (/\\d+\\+?/.exec(data) || '');\n }\n // Detect Firefox Mobile.\n if (name == 'Fennec' || name == 'Firefox' && /\\b(?:Android|Firefox OS)\\b/.test(os)) {\n name = 'Firefox Mobile';\n }\n // Obscure Maxthon's unreliable version.\n else if (name == 'Maxthon' && version) {\n version = version.replace(/\\.[\\d.]+/, '.x');\n }\n // Detect Xbox 360 and Xbox One.\n else if (/\\bXbox\\b/i.test(product)) {\n if (product == 'Xbox 360') {\n os = null;\n }\n if (product == 'Xbox 360' && /\\bIEMobile\\b/.test(ua)) {\n description.unshift('mobile mode');\n }\n }\n // Add mobile postfix.\n else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) &&\n (os == 'Windows CE' || /Mobi/i.test(ua))) {\n name += ' Mobile';\n }\n // Detect IE platform preview.\n else if (name == 'IE' && useFeatures) {\n try {\n if (context.external === null) {\n description.unshift('platform preview');\n }\n } catch(e) {\n description.unshift('embedded');\n }\n }\n // Detect BlackBerry OS version.\n // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp\n else if ((/\\bBlackBerry\\b/.test(product) || /\\bBB10\\b/.test(ua)) && (data =\n (RegExp(product.replace(/ +/g, ' *') + '/([.\\\\d]+)', 'i').exec(ua) || 0)[1] ||\n version\n )) {\n data = [data, /BB10/.test(ua)];\n os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0];\n version = null;\n }\n // Detect Opera identifying/masking itself as another browser.\n // http://www.opera.com/support/kb/view/843/\n else if (this != forOwn && product != 'Wii' && (\n (useFeatures && opera) ||\n (/Opera/.test(name) && /\\b(?:MSIE|Firefox)\\b/i.test(ua)) ||\n (name == 'Firefox' && /\\bOS X (?:\\d+\\.){2,}/.test(os)) ||\n (name == 'IE' && (\n (os && !/^Win/.test(os) && version > 5.5) ||\n /\\bWindows XP\\b/.test(os) && version > 8 ||\n version == 8 && !/\\bTrident\\b/.test(ua)\n ))\n ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) {\n // When \"identifying\", the UA contains both Opera and the other browser's name.\n data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');\n if (reOpera.test(name)) {\n if (/\\bIE\\b/.test(data) && os == 'Mac OS') {\n os = null;\n }\n data = 'identify' + data;\n }\n // When \"masking\", the UA contains only the other browser's name.\n else {\n data = 'mask' + data;\n if (operaClass) {\n name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2'));\n } else {\n name = 'Opera';\n }\n if (/\\bIE\\b/.test(data)) {\n os = null;\n }\n if (!useFeatures) {\n version = null;\n }\n }\n layout = ['Presto'];\n description.push(data);\n }\n // Detect WebKit Nightly and approximate Chrome/Safari versions.\n if ((data = (/\\bAppleWebKit\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n // Correct build number for numeric comparison.\n // (e.g. \"532.5\" becomes \"532.05\")\n data = [parseFloat(data.replace(/\\.(\\d)$/, '.0$1')), data];\n // Nightly builds are postfixed with a \"+\".\n if (name == 'Safari' && data[1].slice(-1) == '+') {\n name = 'WebKit Nightly';\n prerelease = 'alpha';\n version = data[1].slice(0, -1);\n }\n // Clear incorrect browser versions.\n else if (version == data[1] ||\n version == (data[2] = (/\\bSafari\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n version = null;\n }\n // Use the full Chrome version when available.\n data[1] = (/\\bChrome\\/([\\d.]+)/i.exec(ua) || 0)[1];\n // Detect Blink layout engine.\n if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {\n layout = ['Blink'];\n }\n // Detect JavaScriptCore.\n // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi\n if (!useFeatures || (!likeChrome && !data[1])) {\n layout && (layout[1] = 'like Safari');\n data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8');\n } else {\n layout && (layout[1] = 'like Chrome');\n data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');\n }\n // Add the postfix of \".x\" or \"+\" for approximate versions.\n layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+'));\n // Obscure version for some Safari 1-2 releases.\n if (name == 'Safari' && (!version || parseInt(version) > 45)) {\n version = data;\n }\n }\n // Detect Opera desktop modes.\n if (name == 'Opera' && (data = /\\bzbov|zvav$/.exec(os))) {\n name += ' ';\n description.unshift('desktop mode');\n if (data == 'zvav') {\n name += 'Mini';\n version = null;\n } else {\n name += 'Mobile';\n }\n os = os.replace(RegExp(' *' + data + '$'), '');\n }\n // Detect Chrome desktop mode.\n else if (name == 'Safari' && /\\bChrome\\b/.exec(layout && layout[1])) {\n description.unshift('desktop mode');\n name = 'Chrome Mobile';\n version = null;\n\n if (/\\bOS X\\b/.test(os)) {\n manufacturer = 'Apple';\n os = 'iOS 4.3+';\n } else {\n os = null;\n }\n }\n // Strip incorrect OS versions.\n if (version && version.indexOf((data = /[\\d.]+$/.exec(os))) == 0 &&\n ua.indexOf('/' + data + '-') > -1) {\n os = trim(os.replace(data, ''));\n }\n // Add layout engine.\n if (layout && !/\\b(?:Avant|Nook)\\b/.test(name) && (\n /Browser|Lunascape|Maxthon/.test(name) ||\n name != 'Safari' && /^iOS/.test(os) && /\\bSafari\\b/.test(layout[1]) ||\n /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name) && layout[1])) {\n // Don't add layout details to description if they are falsey.\n (data = layout[layout.length - 1]) && description.push(data);\n }\n // Combine contextual information.\n if (description.length) {\n description = ['(' + description.join('; ') + ')'];\n }\n // Append manufacturer to description.\n if (manufacturer && product && product.indexOf(manufacturer) < 0) {\n description.push('on ' + manufacturer);\n }\n // Append product to description.\n if (product) {\n description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product);\n }\n // Parse the OS into an object.\n if (os) {\n data = / ([\\d.+]+)$/.exec(os);\n isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/';\n os = {\n 'architecture': 32,\n 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os,\n 'version': data ? data[1] : null,\n 'toString': function() {\n var version = this.version;\n return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');\n }\n };\n }\n // Add browser/OS architecture.\n if ((data = /\\b(?:AMD|IA|Win|WOW|x86_|x)64\\b/i.exec(arch)) && !/\\bi686\\b/i.test(arch)) {\n if (os) {\n os.architecture = 64;\n os.family = os.family.replace(RegExp(' *' + data), '');\n }\n if (\n name && (/\\bWOW64\\b/i.test(ua) ||\n (useFeatures && /\\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\\bWin64; x64\\b/i.test(ua)))\n ) {\n description.unshift('32-bit');\n }\n }\n // Chrome 39 and above on OS X is always 64-bit.\n else if (\n os && /^OS X/.test(os.family) &&\n name == 'Chrome' && parseFloat(version) >= 39\n ) {\n os.architecture = 64;\n }\n\n ua || (ua = null);\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The platform object.\n *\n * @name platform\n * @type Object\n */\n var platform = {};\n\n /**\n * The platform description.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.description = ua;\n\n /**\n * The name of the browser's layout engine.\n *\n * The list of common layout engines include:\n * \"Blink\", \"EdgeHTML\", \"Gecko\", \"Trident\" and \"WebKit\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.layout = layout && layout[0];\n\n /**\n * The name of the product's manufacturer.\n *\n * The list of manufacturers include:\n * \"Apple\", \"Archos\", \"Amazon\", \"Asus\", \"Barnes & Noble\", \"BlackBerry\",\n * \"Google\", \"HP\", \"HTC\", \"LG\", \"Microsoft\", \"Motorola\", \"Nintendo\",\n * \"Nokia\", \"Samsung\" and \"Sony\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.manufacturer = manufacturer;\n\n /**\n * The name of the browser/environment.\n *\n * The list of common browser names include:\n * \"Chrome\", \"Electron\", \"Firefox\", \"Firefox for iOS\", \"IE\",\n * \"Microsoft Edge\", \"PhantomJS\", \"Safari\", \"SeaMonkey\", \"Silk\",\n * \"Opera Mini\" and \"Opera\"\n *\n * Mobile versions of some browsers have \"Mobile\" appended to their name:\n * eg. \"Chrome Mobile\", \"Firefox Mobile\", \"IE Mobile\" and \"Opera Mobile\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.name = name;\n\n /**\n * The alpha/beta release indicator.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.prerelease = prerelease;\n\n /**\n * The name of the product hosting the browser.\n *\n * The list of common products include:\n *\n * \"BlackBerry\", \"Galaxy S4\", \"Lumia\", \"iPad\", \"iPod\", \"iPhone\", \"Kindle\",\n * \"Kindle Fire\", \"Nexus\", \"Nook\", \"PlayBook\", \"TouchPad\" and \"Transformer\"\n *\n * @memberOf platform\n * @type string|null\n */\n platform.product = product;\n\n /**\n * The browser's user agent string.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.ua = ua;\n\n /**\n * The browser/environment version.\n *\n * @memberOf platform\n * @type string|null\n */\n platform.version = name && version;\n\n /**\n * The name of the operating system.\n *\n * @memberOf platform\n * @type Object\n */\n platform.os = os || {\n\n /**\n * The CPU architecture the OS is built for.\n *\n * @memberOf platform.os\n * @type number|null\n */\n 'architecture': null,\n\n /**\n * The family of the OS.\n *\n * Common values include:\n * \"Windows\", \"Windows Server 2008 R2 / 7\", \"Windows Server 2008 / Vista\",\n * \"Windows XP\", \"OS X\", \"Ubuntu\", \"Debian\", \"Fedora\", \"Red Hat\", \"SuSE\",\n * \"Android\", \"iOS\" and \"Windows Phone\"\n *\n * @memberOf platform.os\n * @type string|null\n */\n 'family': null,\n\n /**\n * The version of the OS.\n *\n * @memberOf platform.os\n * @type string|null\n */\n 'version': null,\n\n /**\n * Returns the OS string.\n *\n * @memberOf platform.os\n * @returns {string} The OS string.\n */\n 'toString': function() { return 'null'; }\n };\n\n platform.parse = parse;\n platform.toString = toStringPlatform;\n\n if (platform.version) {\n description.unshift(version);\n }\n if (platform.name) {\n description.unshift(name);\n }\n if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) {\n description.push(product ? '(' + os + ')' : 'on ' + os);\n }\n if (description.length) {\n platform.description = description.join(' ');\n }\n return platform;\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Export platform.\n var platform = parse();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Expose platform on the global object to prevent errors when platform is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n root.platform = platform;\n\n // Define as an anonymous module so platform can be aliased through path mapping.\n define(function() {\n return platform;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n else if (freeExports && freeModule) {\n // Export for CommonJS support.\n forOwn(platform, function(value, key) {\n freeExports[key] = value;\n });\n }\n else {\n // Export to the global object.\n root.platform = platform;\n }\n}.call(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/platform/platform.js\n// module id = ../../../../openvidu-browser/node_modules/platform/platform.js\n// module chunks = main","var grammar = module.exports = {\n v: [{\n name: 'version',\n reg: /^(\\d*)$/\n }],\n o: [{ //o=- 20518 0 IN IP4 203.0.113.1\n // NB: sessionId will be a String in most cases because it is huge\n name: 'origin',\n reg: /^(\\S*) (\\d*) (\\d*) (\\S*) IP(\\d) (\\S*)/,\n names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],\n format: \"%s %s %d %s IP%d %s\"\n }],\n // default parsing of these only (though some of these feel outdated)\n s: [{ name: 'name' }],\n i: [{ name: 'description' }],\n u: [{ name: 'uri' }],\n e: [{ name: 'email' }],\n p: [{ name: 'phone' }],\n z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly..\n r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly\n //k: [{}], // outdated thing ignored\n t: [{ //t=0 0\n name: 'timing',\n reg: /^(\\d*) (\\d*)/,\n names: ['start', 'stop'],\n format: \"%d %d\"\n }],\n c: [{ //c=IN IP4 10.47.197.26\n name: 'connection',\n reg: /^IN IP(\\d) (\\S*)/,\n names: ['version', 'ip'],\n format: \"IN IP%d %s\"\n }],\n b: [{ //b=AS:4000\n push: 'bandwidth',\n reg: /^(TIAS|AS|CT|RR|RS):(\\d*)/,\n names: ['type', 'limit'],\n format: \"%s:%s\"\n }],\n m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31\n // NB: special - pushes to session\n // TODO: rtp/fmtp should be filtered by the payloads found here?\n reg: /^(\\w*) (\\d*) ([\\w\\/]*)(?: (.*))?/,\n names: ['type', 'port', 'protocol', 'payloads'],\n format: \"%s %d %s %s\"\n }],\n a: [\n { //a=rtpmap:110 opus/48000/2\n push: 'rtp',\n reg: /^rtpmap:(\\d*) ([\\w\\-]*)(?:\\s*\\/(\\d*)(?:\\s*\\/(\\S*))?)?/,\n names: ['payload', 'codec', 'rate', 'encoding'],\n format: function (o) {\n return (o.encoding) ?\n \"rtpmap:%d %s/%s/%s\":\n o.rate ?\n \"rtpmap:%d %s/%s\":\n \"rtpmap:%d %s\";\n }\n },\n {\n //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000\n //a=fmtp:111 minptime=10; useinbandfec=1\n push: 'fmtp',\n reg: /^fmtp:(\\d*) ([\\S| ]*)/,\n names: ['payload', 'config'],\n format: \"fmtp:%d %s\"\n },\n { //a=control:streamid=0\n name: 'control',\n reg: /^control:(.*)/,\n format: \"control:%s\"\n },\n { //a=rtcp:65179 IN IP4 193.84.77.194\n name: 'rtcp',\n reg: /^rtcp:(\\d*)(?: (\\S*) IP(\\d) (\\S*))?/,\n names: ['port', 'netType', 'ipVer', 'address'],\n format: function (o) {\n return (o.address != null) ?\n \"rtcp:%d %s IP%d %s\":\n \"rtcp:%d\";\n }\n },\n { //a=rtcp-fb:98 trr-int 100\n push: 'rtcpFbTrrInt',\n reg: /^rtcp-fb:(\\*|\\d*) trr-int (\\d*)/,\n names: ['payload', 'value'],\n format: \"rtcp-fb:%d trr-int %d\"\n },\n { //a=rtcp-fb:98 nack rpsi\n push: 'rtcpFb',\n reg: /^rtcp-fb:(\\*|\\d*) ([\\w-_]*)(?: ([\\w-_]*))?/,\n names: ['payload', 'type', 'subtype'],\n format: function (o) {\n return (o.subtype != null) ?\n \"rtcp-fb:%s %s %s\":\n \"rtcp-fb:%s %s\";\n }\n },\n { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\n //a=extmap:1/recvonly URI-gps-string\n push: 'ext',\n reg: /^extmap:([\\w_\\/]*) (\\S*)(?: (\\S*))?/,\n names: ['value', 'uri', 'config'], // value may include \"/direction\" suffix\n format: function (o) {\n return (o.config != null) ?\n \"extmap:%s %s %s\":\n \"extmap:%s %s\";\n }\n },\n {\n //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32\n push: 'crypto',\n reg: /^crypto:(\\d*) ([\\w_]*) (\\S*)(?: (\\S*))?/,\n names: ['id', 'suite', 'config', 'sessionConfig'],\n format: function (o) {\n return (o.sessionConfig != null) ?\n \"crypto:%d %s %s %s\":\n \"crypto:%d %s %s\";\n }\n },\n { //a=setup:actpass\n name: 'setup',\n reg: /^setup:(\\w*)/,\n format: \"setup:%s\"\n },\n { //a=mid:1\n name: 'mid',\n reg: /^mid:([^\\s]*)/,\n format: \"mid:%s\"\n },\n { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a\n name: 'msid',\n reg: /^msid:(.*)/,\n format: \"msid:%s\"\n },\n { //a=ptime:20\n name: 'ptime',\n reg: /^ptime:(\\d*)/,\n format: \"ptime:%d\"\n },\n { //a=maxptime:60\n name: 'maxptime',\n reg: /^maxptime:(\\d*)/,\n format: \"maxptime:%d\"\n },\n { //a=sendrecv\n name: 'direction',\n reg: /^(sendrecv|recvonly|sendonly|inactive)/\n },\n { //a=ice-lite\n name: 'icelite',\n reg: /^(ice-lite)/\n },\n { //a=ice-ufrag:F7gI\n name: 'iceUfrag',\n reg: /^ice-ufrag:(\\S*)/,\n format: \"ice-ufrag:%s\"\n },\n { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g\n name: 'icePwd',\n reg: /^ice-pwd:(\\S*)/,\n format: \"ice-pwd:%s\"\n },\n { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33\n name: 'fingerprint',\n reg: /^fingerprint:(\\S*) (\\S*)/,\n names: ['type', 'hash'],\n format: \"fingerprint:%s %s\"\n },\n {\n //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host\n //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0\n //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0\n //a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0\n //a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0\n push:'candidates',\n reg: /^candidate:(\\S*) (\\d*) (\\S*) (\\d*) (\\S*) (\\d*) typ (\\S*)(?: raddr (\\S*) rport (\\d*))?(?: tcptype (\\S*))?(?: generation (\\d*))?/,\n names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation'],\n format: function (o) {\n var str = \"candidate:%s %d %s %d %s %d typ %s\";\n\n str += (o.raddr != null) ? \" raddr %s rport %d\" : \"%v%v\";\n\n // NB: candidate has three optional chunks, so %void middles one if it's missing\n str += (o.tcptype != null) ? \" tcptype %s\" : \"%v\";\n\n if (o.generation != null) {\n str += \" generation %d\";\n }\n return str;\n }\n },\n { //a=end-of-candidates (keep after the candidates line for readability)\n name: 'endOfCandidates',\n reg: /^(end-of-candidates)/\n },\n { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...\n name: 'remoteCandidates',\n reg: /^remote-candidates:(.*)/,\n format: \"remote-candidates:%s\"\n },\n { //a=ice-options:google-ice\n name: 'iceOptions',\n reg: /^ice-options:(\\S*)/,\n format: \"ice-options:%s\"\n },\n { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1\n push: \"ssrcs\",\n reg: /^ssrc:(\\d*) ([\\w_]*):(.*)/,\n names: ['id', 'attribute', 'value'],\n format: \"ssrc:%d %s:%s\"\n },\n { //a=ssrc-group:FEC 1 2\n push: \"ssrcGroups\",\n reg: /^ssrc-group:(\\w*) (.*)/,\n names: ['semantics', 'ssrcs'],\n format: \"ssrc-group:%s %s\"\n },\n { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV\n name: \"msidSemantic\",\n reg: /^msid-semantic:\\s?(\\w*) (\\S*)/,\n names: ['semantic', 'token'],\n format: \"msid-semantic: %s %s\" // space after \":\" is not accidental\n },\n { //a=group:BUNDLE audio video\n push: 'groups',\n reg: /^group:(\\w*) (.*)/,\n names: ['type', 'mids'],\n format: \"group:%s %s\"\n },\n { //a=rtcp-mux\n name: 'rtcpMux',\n reg: /^(rtcp-mux)/\n },\n { //a=rtcp-rsize\n name: 'rtcpRsize',\n reg: /^(rtcp-rsize)/\n },\n { // any a= that we don't understand is kepts verbatim on media.invalid\n push: 'invalid',\n names: [\"value\"]\n }\n ]\n};\n\n// set sensible defaults to avoid polluting the grammar with boring details\nObject.keys(grammar).forEach(function (key) {\n var objs = grammar[key];\n objs.forEach(function (obj) {\n if (!obj.reg) {\n obj.reg = /(.*)/;\n }\n if (!obj.format) {\n obj.format = \"%s\";\n }\n });\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/grammar.js\n// module chunks = main","var parser = require('./parser');\nvar writer = require('./writer');\n\nexports.write = writer;\nexports.parse = parser.parse;\nexports.parseFmtpConfig = parser.parseFmtpConfig;\nexports.parsePayloads = parser.parsePayloads;\nexports.parseRemoteCandidates = parser.parseRemoteCandidates;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/index.js\n// module chunks = main","var toIntIfInt = function (v) {\n return String(Number(v)) === v ? Number(v) : v;\n};\n\nvar attachProperties = function (match, location, names, rawName) {\n if (rawName && !names) {\n location[rawName] = toIntIfInt(match[1]);\n }\n else {\n for (var i = 0; i < names.length; i += 1) {\n if (match[i+1] != null) {\n location[names[i]] = toIntIfInt(match[i+1]);\n }\n }\n }\n};\n\nvar parseReg = function (obj, location, content) {\n var needsBlank = obj.name && obj.names;\n if (obj.push && !location[obj.push]) {\n location[obj.push] = [];\n }\n else if (needsBlank && !location[obj.name]) {\n location[obj.name] = {};\n }\n var keyLocation = obj.push ?\n {} : // blank object that will be pushed\n needsBlank ? location[obj.name] : location; // otherwise, named location or root\n\n attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name);\n\n if (obj.push) {\n location[obj.push].push(keyLocation);\n }\n};\n\nvar grammar = require('./grammar');\nvar validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);\n\nexports.parse = function (sdp) {\n var session = {}\n , media = []\n , location = session; // points at where properties go under (one of the above)\n\n // parse lines we understand\n sdp.split(/(\\r\\n|\\r|\\n)/).filter(validLine).forEach(function (l) {\n var type = l[0];\n var content = l.slice(2);\n if (type === 'm') {\n media.push({rtp: [], fmtp: []});\n location = media[media.length-1]; // point at latest media line\n }\n\n for (var j = 0; j < (grammar[type] || []).length; j += 1) {\n var obj = grammar[type][j];\n if (obj.reg.test(content)) {\n return parseReg(obj, location, content);\n }\n }\n });\n\n session.media = media; // link it up\n return session;\n};\n\nvar fmtpReducer = function (acc, expr) {\n var s = expr.split('=');\n if (s.length === 2) {\n acc[s[0]] = toIntIfInt(s[1]);\n }\n return acc;\n};\n\nexports.parseFmtpConfig = function (str) {\n return str.split(/\\;\\s?/).reduce(fmtpReducer, {});\n};\n\nexports.parsePayloads = function (str) {\n return str.split(' ').map(Number);\n};\n\nexports.parseRemoteCandidates = function (str) {\n var candidates = [];\n var parts = str.split(' ').map(toIntIfInt);\n for (var i = 0; i < parts.length; i += 3) {\n candidates.push({\n component: parts[i],\n ip: parts[i + 1],\n port: parts[i + 2]\n });\n }\n return candidates;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/parser.js\n// module chunks = main","var grammar = require('./grammar');\n\n// customized util.format - discards excess arguments and can void middle ones\nvar formatRegExp = /%[sdv%]/g;\nvar format = function (formatStr) {\n var i = 1;\n var args = arguments;\n var len = args.length;\n return formatStr.replace(formatRegExp, function (x) {\n if (i >= len) {\n return x; // missing argument\n }\n var arg = args[i];\n i += 1;\n switch (x) {\n case '%%':\n return '%';\n case '%s':\n return String(arg);\n case '%d':\n return Number(arg);\n case '%v':\n return '';\n }\n });\n // NB: we discard excess arguments - they are typically undefined from makeLine\n};\n\nvar makeLine = function (type, obj, location) {\n var str = obj.format instanceof Function ?\n (obj.format(obj.push ? location : location[obj.name])) :\n obj.format;\n\n var args = [type + '=' + str];\n if (obj.names) {\n for (var i = 0; i < obj.names.length; i += 1) {\n var n = obj.names[i];\n if (obj.name) {\n args.push(location[obj.name][n]);\n }\n else { // for mLine and push attributes\n args.push(location[obj.names[i]]);\n }\n }\n }\n else {\n args.push(location[obj.name]);\n }\n return format.apply(null, args);\n};\n\n// RFC specified order\n// TODO: extend this with all the rest\nvar defaultOuterOrder = [\n 'v', 'o', 's', 'i',\n 'u', 'e', 'p', 'c',\n 'b', 't', 'r', 'z', 'a'\n];\nvar defaultInnerOrder = ['i', 'c', 'b', 'a'];\n\n\nmodule.exports = function (session, opts) {\n opts = opts || {};\n // ensure certain properties exist\n if (session.version == null) {\n session.version = 0; // \"v=0\" must be there (only defined version atm)\n }\n if (session.name == null) {\n session.name = \" \"; // \"s= \" must be there if no meaningful name set\n }\n session.media.forEach(function (mLine) {\n if (mLine.payloads == null) {\n mLine.payloads = \"\";\n }\n });\n\n var outerOrder = opts.outerOrder || defaultOuterOrder;\n var innerOrder = opts.innerOrder || defaultInnerOrder;\n var sdp = [];\n\n // loop through outerOrder for matching properties on session\n outerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in session && session[obj.name] != null) {\n sdp.push(makeLine(type, obj, session));\n }\n else if (obj.push in session && session[obj.push] != null) {\n session[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n\n // then for each media line, follow the innerOrder\n session.media.forEach(function (mLine) {\n sdp.push(makeLine('m', grammar.m[0], mLine));\n\n innerOrder.forEach(function (type) {\n grammar[type].forEach(function (obj) {\n if (obj.name in mLine && mLine[obj.name] != null) {\n sdp.push(makeLine(type, obj, mLine));\n }\n else if (obj.push in mLine && mLine[obj.push] != null) {\n mLine[obj.push].forEach(function (el) {\n sdp.push(makeLine(type, obj, el));\n });\n }\n });\n });\n });\n\n return sdp.join('\\r\\n') + '\\r\\n';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-transform/lib/writer.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = function arrayEquals(array) {\n // if the other array is a falsy value, return\n if (!array)\n return false;\n\n // compare lengths - can save a lot of time\n if (this.length != array.length)\n return false;\n\n for (var i = 0, l = this.length; i < l; i++) {\n // Check if we have nested arrays\n if (this[i] instanceof Array && array[i] instanceof Array) {\n // recurse into the nested arrays\n if (!arrayEquals.apply(this[i], [array[i]]))\n return false;\n } else if (this[i] != array[i]) {\n // Warning - two different object instances will never be equal:\n // {x:20} != {x:20}\n return false;\n }\n }\n return true;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/array-equals.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexports.Interop = require('./interop');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/index.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* global RTCSessionDescription */\n/* global RTCIceCandidate */\n/* jshint -W097 */\n\"use strict\";\n\nvar transform = require('./transform');\nvar arrayEquals = require('./array-equals');\n\nfunction Interop() {\n\n /**\n * This map holds the most recent Unified Plan offer/answer SDP that was\n * converted to Plan B, with the SDP type ('offer' or 'answer') as keys and\n * the SDP string as values.\n *\n * @type {{}}\n */\n this.cache = {\n mlB2UMap : {},\n mlU2BMap : {}\n };\n}\n\nmodule.exports = Interop;\n\n/**\n * Changes the candidate args to match with the related Unified Plan\n */\nInterop.prototype.candidateToUnifiedPlan = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n cand.sdpMLineIndex = this.cache.mlB2UMap[cand.sdpMLineIndex];\n /* TODO: change sdpMid to (audio|video)-SSRC */\n\n return cand;\n};\n\n/**\n * Changes the candidate args to match with the related Plan B\n */\nInterop.prototype.candidateToPlanB = function(candidate) {\n var cand = new RTCIceCandidate(candidate);\n\n if (cand.sdpMid.indexOf('audio') === 0) {\n cand.sdpMid = 'audio';\n } else if (cand.sdpMid.indexOf('video') === 0) {\n cand.sdpMid = 'video';\n } else {\n throw new Error('candidate with ' + cand.sdpMid + ' not allowed');\n }\n\n cand.sdpMLineIndex = this.cache.mlU2BMap[cand.sdpMLineIndex];\n\n return cand;\n};\n\n/**\n * Returns the index of the first m-line with the given media type and with a\n * direction which allows sending, in the last Unified Plan description with\n * type \"answer\" converted to Plan B. Returns {null} if there is no saved\n * answer, or if none of its m-lines with the given type allow sending.\n * @param type the media type (\"audio\" or \"video\").\n * @returns {*}\n */\nInterop.prototype.getFirstSendingIndexFromAnswer = function(type) {\n if (!this.cache.answer) {\n return null;\n }\n\n var session = transform.parse(this.cache.answer);\n if (session && session.media && Array.isArray(session.media)){\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type == type &&\n (!session.media[i].direction /* default to sendrecv */ ||\n session.media[i].direction === 'sendrecv' ||\n session.media[i].direction === 'sendonly')){\n return i;\n }\n }\n }\n\n return null;\n};\n\n/**\n * This method transforms a Unified Plan SDP to an equivalent Plan B SDP. A\n * PeerConnection wrapper transforms the SDP to Plan B before passing it to the\n * application.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toPlanB = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n // Objectify the SDP for easier manipulation.\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Unified Plan SDP. Plan B\n // SDP has a video, an audio and a data \"channel\" at most.\n if (session.media.length <= 3 && session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Unified Plan.');\n return desc;\n }\n\n //#endregion\n\n // HACK https://bugzilla.mozilla.org/show_bug.cgi?id=1113443\n var sdp = desc.sdp;\n var rewrite = false;\n for (var i = 0; i < session.media.length; i++) {\n var uLine = session.media[i];\n uLine.rtp.forEach(function(rtp) {\n if (rtp.codec === 'NULL')\n {\n rewrite = true;\n var offer = transform.parse(self.cache.offer);\n rtp.codec = offer.media[i].rtp[0].codec;\n }\n });\n }\n if (rewrite) {\n sdp = transform.write(session);\n }\n\n // Unified Plan SDP is our \"precious\". Cache it for later use in the Plan B\n // -> Unified Plan transformation.\n this.cache[desc.type] = sdp;\n\n //#region Convert from Unified Plan to Plan B.\n\n // We rebuild the session.media array.\n var media = session.media;\n session.media = [];\n\n // Associative array that maps channel types to channel objects for fast\n // access to channel objects by their type, e.g. type2bl['audio']->channel\n // obj.\n var type2bl = {};\n\n // Used to build the group:BUNDLE value after the channels construction\n // loop.\n var types = [];\n\n media.forEach(function(uLine) {\n // rtcp-mux is required in the Plan B SDP.\n if ((typeof uLine.rtcpMux !== 'string' ||\n uLine.rtcpMux !== 'rtcp-mux') &&\n uLine.direction !== 'inactive') {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'without the rtcp-mux attribute were found.');\n }\n\n // If we don't have a channel for this uLine.type OR the selected is\n // inactive, then select this uLine as the channel basis.\n if (typeof type2bl[uLine.type] === 'undefined' ||\n type2bl[uLine.type].direction === 'inactive') {\n type2bl[uLine.type] = uLine;\n }\n\n if (uLine.protocol != type2bl[uLine.type].protocol) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different protocols and this library does not have ' +\n 'support for that');\n }\n\n if (uLine.payloads != type2bl[uLine.type].payloads) {\n throw new Error('Cannot convert to Plan B because m-lines ' +\n 'have different payloads and this library does not have ' +\n 'support for that');\n }\n\n });\n\n // Implode the Unified Plan m-lines/tracks into Plan B channels.\n media.forEach(function(uLine) {\n if (uLine.type === 'application') {\n session.media.push(uLine);\n types.push(uLine.mid);\n return;\n }\n\n // Add sources to the channel and handle a=msid.\n if (typeof uLine.sources === 'object') {\n Object.keys(uLine.sources).forEach(function(ssrc) {\n if (typeof type2bl[uLine.type].sources !== 'object')\n type2bl[uLine.type].sources = {};\n\n // Assign the sources to the channel.\n type2bl[uLine.type].sources[ssrc] =\n uLine.sources[ssrc];\n\n if (typeof uLine.msid !== 'undefined') {\n // In Plan B the msid is an SSRC attribute. Also, we don't\n // care about the obsolete label and mslabel attributes.\n //\n // Note that it is not guaranteed that the uLine will\n // have an msid. recvonly channels in particular don't have\n // one.\n type2bl[uLine.type].sources[ssrc].msid =\n uLine.msid;\n }\n // NOTE ssrcs in ssrc groups will share msids, as\n // draft-uberti-rtcweb-plan-00 mandates.\n });\n }\n\n // Add ssrc groups to the channel.\n if (typeof uLine.ssrcGroups !== 'undefined' &&\n Array.isArray(uLine.ssrcGroups)) {\n\n // Create the ssrcGroups array, if it's not defined.\n if (typeof type2bl[uLine.type].ssrcGroups === 'undefined' ||\n !Array.isArray(type2bl[uLine.type].ssrcGroups)) {\n type2bl[uLine.type].ssrcGroups = [];\n }\n\n type2bl[uLine.type].ssrcGroups =\n type2bl[uLine.type].ssrcGroups.concat(\n uLine.ssrcGroups);\n }\n\n if (type2bl[uLine.type] === uLine) {\n // Plan B mids are in ['audio', 'video', 'data']\n uLine.mid = uLine.type;\n\n // Plan B doesn't support/need the bundle-only attribute.\n delete uLine.bundleOnly;\n\n // In Plan B the msid is an SSRC attribute.\n delete uLine.msid;\n\n\t if (uLine.type == media[0].type) {\n\t types.unshift(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.unshift(uLine);\n\t } else {\n\t types.push(uLine.type);\n\t // Add the channel to the new media array.\n\t session.media.push(uLine);\n\t }\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group with the new mids.\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = types.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n/* follow rules defined in RFC4145 */\nfunction addSetupAttr(uLine) {\n if (typeof uLine.setup === 'undefined') {\n return;\n }\n\n if (uLine.setup === \"active\") {\n uLine.setup = \"passive\";\n } else if (uLine.setup === \"passive\") {\n uLine.setup = \"active\";\n }\n}\n\n/**\n * This method transforms a Plan B SDP to an equivalent Unified Plan SDP. A\n * PeerConnection wrapper transforms the SDP to Unified Plan before passing it\n * to FF.\n *\n * @param desc\n * @returns {*}\n */\nInterop.prototype.toUnifiedPlan = function(desc) {\n var self = this;\n //#region Preliminary input validation.\n\n if (typeof desc !== 'object' || desc === null ||\n typeof desc.sdp !== 'string') {\n console.warn('An empty description was passed as an argument.');\n return desc;\n }\n\n var session = transform.parse(desc.sdp);\n\n // If the SDP contains no media, there's nothing to transform.\n if (typeof session.media === 'undefined' ||\n !Array.isArray(session.media) || session.media.length === 0) {\n console.warn('The description has no media.');\n return desc;\n }\n\n // Try some heuristics to \"make sure\" this is a Plan B SDP. Plan B SDP has\n // a video, an audio and a data \"channel\" at most.\n if (session.media.length > 3 || !session.media.every(function(m) {\n return ['video', 'audio', 'data'].indexOf(m.mid) !== -1;\n })) {\n console.warn('This description does not look like Plan B.');\n return desc;\n }\n\n // Make sure this Plan B SDP can be converted to a Unified Plan SDP.\n var mids = [];\n session.media.forEach(function(m) {\n mids.push(m.mid);\n });\n\n var hasBundle = false;\n if (typeof session.groups !== 'undefined' &&\n Array.isArray(session.groups)) {\n hasBundle = session.groups.every(function(g) {\n return g.type !== 'BUNDLE' ||\n arrayEquals.apply(g.mids.sort(), [mids.sort()]);\n });\n }\n\n if (!hasBundle) {\n var mustBeBundle = false;\n\n session.media.forEach(function(m) {\n if (m.direction !== 'inactive') {\n mustBeBundle = true;\n }\n });\n\n if (mustBeBundle) {\n throw new Error(\"Cannot convert to Unified Plan because m-lines that\" +\n \" are not bundled were found.\");\n }\n }\n\n //#endregion\n\n\n //#region Convert from Plan B to Unified Plan.\n\n // Unfortunately, a Plan B offer/answer doesn't have enough information to\n // rebuild an equivalent Unified Plan offer/answer.\n //\n // For example, if this is a local answer (in Unified Plan style) that we\n // convert to Plan B prior to handing it over to the application (the\n // PeerConnection wrapper called us, for instance, after a successful\n // createAnswer), we want to remember the m-line at which we've seen the\n // (local) SSRC. That's because when the application wants to do call the\n // SLD method, forcing us to do the inverse transformation (from Plan B to\n // Unified Plan), we need to know to which m-line to assign the (local)\n // SSRC. We also need to know all the other m-lines that the original\n // answer had and include them in the transformed answer as well.\n //\n // Another example is if this is a remote offer that we convert to Plan B\n // prior to giving it to the application, we want to remember the mid at\n // which we've seen the (remote) SSRC.\n //\n // In the iteration that follows, we use the cached Unified Plan (if it\n // exists) to assign mids to ssrcs.\n\n var type;\n if (desc.type === 'answer') {\n type = 'offer';\n } else if (desc.type === 'offer') {\n type = 'answer';\n } else {\n throw new Error(\"Type '\" + desc.type + \"' not supported.\");\n }\n\n var cached;\n if (typeof this.cache[type] !== 'undefined') {\n cached = transform.parse(this.cache[type]);\n }\n\n var recvonlySsrcs = {\n audio: {},\n video: {}\n };\n\n // A helper map that sends mids to m-line objects. We use it later to\n // rebuild the Unified Plan style session.media array.\n var mid2ul = {};\n var bIdx = 0;\n var uIdx = 0;\n\n var sources2ul = {};\n\n var candidates;\n var iceUfrag;\n var icePwd;\n var fingerprint;\n var payloads = {};\n var rtcpFb = {};\n var rtp = {};\n\n session.media.forEach(function(bLine) {\n if ((typeof bLine.rtcpMux !== 'string' ||\n bLine.rtcpMux !== 'rtcp-mux') &&\n bLine.direction !== 'inactive') {\n throw new Error(\"Cannot convert to Unified Plan because m-lines \" +\n \"without the rtcp-mux attribute were found.\");\n }\n\n if (bLine.type === 'application') {\n mid2ul[bLine.mid] = bLine;\n return;\n }\n\n // With rtcp-mux and bundle all the channels should have the same ICE\n // stuff.\n var sources = bLine.sources;\n var ssrcGroups = bLine.ssrcGroups;\n var port = bLine.port;\n\n /* Chrome adds different candidates even using bundle, so we concat the candidates list */\n if (typeof bLine.candidates != 'undefined') {\n if (typeof candidates != 'undefined') {\n candidates = candidates.concat(bLine.candidates);\n } else {\n candidates = bLine.candidates;\n }\n }\n\n if ((typeof iceUfrag != 'undefined') && (typeof bLine.iceUfrag != 'undefined') && (iceUfrag != bLine.iceUfrag)) {\n throw new Error(\"Only BUNDLE supported, iceUfrag must be the same for all m-lines.\\n\" +\n \"\\tLast iceUfrag: \" + iceUfrag + \"\\n\" +\n \"\\tNew iceUfrag: \" + bLine.iceUfrag\n );\n }\n\n if (typeof bLine.iceUfrag != 'undefined') {\n iceUfrag = bLine.iceUfrag;\n }\n\n if ((typeof icePwd != 'undefined') && (typeof bLine.icePwd != 'undefined') && (icePwd != bLine.icePwd)) {\n throw new Error(\"Only BUNDLE supported, icePwd must be the same for all m-lines.\\n\" +\n \"\\tLast icePwd: \" + icePwd + \"\\n\" +\n \"\\tNew icePwd: \" + bLine.icePwd\n );\n }\n\n if (typeof bLine.icePwd != 'undefined') {\n icePwd = bLine.icePwd;\n }\n\n if ((typeof fingerprint != 'undefined') && (typeof bLine.fingerprint != 'undefined') &&\n (fingerprint.type != bLine.fingerprint.type || fingerprint.hash != bLine.fingerprint.hash)) {\n throw new Error(\"Only BUNDLE supported, fingerprint must be the same for all m-lines.\\n\" +\n \"\\tLast fingerprint: \" + JSON.stringify(fingerprint) + \"\\n\" +\n \"\\tNew fingerprint: \" + JSON.stringify(bLine.fingerprint)\n );\n }\n\n if (typeof bLine.fingerprint != 'undefined') {\n fingerprint = bLine.fingerprint;\n }\n\n payloads[bLine.type] = bLine.payloads;\n rtcpFb[bLine.type] = bLine.rtcpFb;\n rtp[bLine.type] = bLine.rtp;\n\n // inverted ssrc group map\n var ssrc2group = {};\n if (typeof ssrcGroups !== 'undefined' && Array.isArray(ssrcGroups)) {\n ssrcGroups.forEach(function (ssrcGroup) {\n // XXX This might brake if an SSRC is in more than one group\n // for some reason.\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs.forEach(function (ssrc) {\n if (typeof ssrc2group[ssrc] === 'undefined') {\n ssrc2group[ssrc] = [];\n }\n\n ssrc2group[ssrc].push(ssrcGroup);\n });\n }\n });\n }\n\n // ssrc to m-line index.\n var ssrc2ml = {};\n\n if (typeof sources === 'object') {\n\n // We'll use the \"bLine\" object as a prototype for each new \"mLine\"\n // that we create, but first we need to clean it up a bit.\n delete bLine.sources;\n delete bLine.ssrcGroups;\n delete bLine.candidates;\n delete bLine.iceUfrag;\n delete bLine.icePwd;\n delete bLine.fingerprint;\n delete bLine.port;\n delete bLine.mid;\n\n // Explode the Plan B channel sources with one m-line per source.\n Object.keys(sources).forEach(function(ssrc) {\n\n // The (unified) m-line for this SSRC. We either create it from\n // scratch or, if it's a grouped SSRC, we re-use a related\n // mline. In other words, if the source is grouped with another\n // source, put the two together in the same m-line.\n var uLine;\n\n // We assume here that we are the answerer in the O/A, so any\n // offers which we translate come from the remote side, while\n // answers are local. So the check below is to make that we\n // handle receive-only SSRCs in a special way only if they come\n // from the remote side.\n if (desc.type==='offer') {\n // We want to detect SSRCs which are used by a remote peer\n // in an m-line with direction=recvonly (i.e. they are\n // being used for RTCP only).\n // This information would have gotten lost if the remote\n // peer used Unified Plan and their local description was\n // translated to Plan B. So we use the lack of an MSID\n // attribute to deduce a \"receive only\" SSRC.\n if (!sources[ssrc].msid) {\n recvonlySsrcs[bLine.type][ssrc] = sources[ssrc];\n // Receive-only SSRCs must not create new m-lines. We\n // will assign them to an existing m-line later.\n return;\n }\n }\n\n if (typeof ssrc2group[ssrc] !== 'undefined' &&\n Array.isArray(ssrc2group[ssrc])) {\n ssrc2group[ssrc].some(function (ssrcGroup) {\n // ssrcGroup.ssrcs *is* an Array, no need to check\n // again here.\n return ssrcGroup.ssrcs.some(function (related) {\n if (typeof ssrc2ml[related] === 'object') {\n uLine = ssrc2ml[related];\n return true;\n }\n });\n });\n }\n\n if (typeof uLine === 'object') {\n // the m-line already exists. Just add the source.\n uLine.sources[ssrc] = sources[ssrc];\n delete sources[ssrc].msid;\n } else {\n // Use the \"bLine\" as a prototype for the \"uLine\".\n uLine = Object.create(bLine);\n ssrc2ml[ssrc] = uLine;\n\n if (typeof sources[ssrc].msid !== 'undefined') {\n // Assign the msid of the source to the m-line. Note\n // that it is not guaranteed that the source will have\n // msid. In particular \"recvonly\" sources don't have an\n // msid. Note that \"recvonly\" is a term only defined\n // for m-lines.\n uLine.msid = sources[ssrc].msid;\n delete sources[ssrc].msid;\n }\n\n // We assign one SSRC per media line.\n uLine.sources = {};\n uLine.sources[ssrc] = sources[ssrc];\n uLine.ssrcGroups = ssrc2group[ssrc];\n\n // Use the cached Unified Plan SDP (if it exists) to assign\n // SSRCs to mids.\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n\n cached.media.forEach(function (m) {\n if (typeof m.sources === 'object') {\n Object.keys(m.sources).forEach(function (s) {\n if (s === ssrc) {\n uLine.mid = m.mid;\n }\n });\n }\n });\n }\n\n if (typeof uLine.mid === 'undefined') {\n\n // If this is an SSRC that we see for the first time\n // assign it a new mid. This is typically the case when\n // this method is called to transform a remote\n // description for the first time or when there is a\n // new SSRC in the remote description because a new\n // peer has joined the conference. Local SSRCs should\n // have already been added to the map in the toPlanB\n // method.\n //\n // Because FF generates answers in Unified Plan style,\n // we MUST already have a cached answer with all the\n // local SSRCs mapped to some m-line/mid.\n\n uLine.mid = [bLine.type, '-', ssrc].join('');\n }\n\n // Include the candidates in the 1st media line.\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n sources2ul[uIdx] = uLine.sources;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n uIdx++;\n }\n });\n } else {\n var uLine = bLine;\n\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n uLine.port = port;\n\n mid2ul[uLine.mid] = uLine;\n\n self.cache.mlU2BMap[uIdx] = bIdx;\n if (typeof self.cache.mlB2UMap[bIdx] === 'undefined') {\n self.cache.mlB2UMap[bIdx] = uIdx;\n }\n }\n\n bIdx++;\n });\n\n // Rebuild the media array in the right order and add the missing mLines\n // (missing from the Plan B SDP).\n session.media = [];\n mids = []; // reuse\n\n if (desc.type === 'answer') {\n\n // The media lines in the answer must match the media lines in the\n // offer. The order is important too. Here we assume that Firefox is\n // the answerer, so we merely have to use the reconstructed (unified)\n // answer to update the cached (unified) answer accordingly.\n //\n // In the general case, one would have to use the cached (unified)\n // offer to find the m-lines that are missing from the reconstructed\n // answer, potentially grabbing them from the cached (unified) answer.\n // One has to be careful with this approach because inactive m-lines do\n // not always have an mid, making it tricky (impossible?) to find where\n // exactly and which m-lines are missing from the reconstructed answer.\n\n for (var i = 0; i < cached.media.length; i++) {\n var uLine = cached.media[i];\n\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (typeof sources2ul[i] === 'undefined') {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'recvonly';\n else if (uLine.direction === 'sendonly')\n uLine.direction = 'inactive';\n } else {\n if (!uLine.direction\n || uLine.direction === 'sendrecv')\n uLine.direction = 'sendrecv';\n else if (uLine.direction === 'recvonly')\n uLine.direction = 'sendonly';\n }\n\n uLine.sources = sources2ul[i];\n uLine.candidates = candidates;\n uLine.iceUfrag = iceUfrag;\n uLine.icePwd = icePwd;\n uLine.fingerprint = fingerprint;\n\n uLine.rtp = rtp[uLine.type];\n uLine.payloads = payloads[uLine.type];\n uLine.rtcpFb = rtcpFb[uLine.type];\n\n session.media.push(uLine);\n\n if (typeof uLine.mid === 'string') {\n // inactive lines don't/may not have an mid.\n mids.push(uLine.mid);\n }\n }\n } else {\n\n // SDP offer/answer (and the JSEP spec) forbids removing an m-section\n // under any circumstances. If we are no longer interested in sending a\n // track, we just remove the msid and ssrc attributes and set it to\n // either a=recvonly (as the reofferer, we must use recvonly if the\n // other side was previously sending on the m-section, but we can also\n // leave the possibility open if it wasn't previously in use), or\n // a=inactive.\n\n if (typeof cached !== 'undefined' &&\n typeof cached.media !== 'undefined' &&\n Array.isArray(cached.media)) {\n cached.media.forEach(function(uLine) {\n mids.push(uLine.mid);\n if (typeof mid2ul[uLine.mid] !== 'undefined') {\n session.media.push(mid2ul[uLine.mid]);\n } else {\n delete uLine.msid;\n delete uLine.sources;\n delete uLine.ssrcGroups;\n\n if (!uLine.direction\n || uLine.direction === 'sendrecv') {\n uLine.direction = 'sendonly';\n }\n if (!uLine.direction\n || uLine.direction === 'recvonly') {\n uLine.direction = 'inactive';\n }\n\n addSetupAttr (uLine);\n session.media.push(uLine);\n }\n });\n }\n\n // Add all the remaining (new) m-lines of the transformed SDP.\n Object.keys(mid2ul).forEach(function(mid) {\n if (mids.indexOf(mid) === -1) {\n mids.push(mid);\n if (mid2ul[mid].direction === 'recvonly') {\n // This is a remote recvonly channel. Add its SSRC to the\n // appropriate sendrecv or sendonly channel.\n // TODO(gp) what if we don't have sendrecv/sendonly\n // channel?\n\n var done = false;\n\n session.media.some(function (uLine) {\n if ((uLine.direction === 'sendrecv' ||\n uLine.direction === 'sendonly') &&\n uLine.type === mid2ul[mid].type) {\n // mid2ul[mid] shouldn't have any ssrc-groups\n Object.keys(mid2ul[mid].sources).forEach(\n function (ssrc) {\n uLine.sources[ssrc] =\n mid2ul[mid].sources[ssrc];\n });\n\n done = true;\n return true;\n }\n });\n\n if (!done) {\n session.media.push(mid2ul[mid]);\n }\n } else {\n session.media.push(mid2ul[mid]);\n }\n }\n });\n }\n\n // After we have constructed the Plan Unified m-lines we can figure out\n // where (in which m-line) to place the 'recvonly SSRCs'.\n // Note: we assume here that we are the answerer in the O/A, so any offers\n // which we translate come from the remote side, while answers are local\n // (and so our last local description is cached as an 'answer').\n [\"audio\", \"video\"].forEach(function (type) {\n if (!session || !session.media || !Array.isArray(session.media))\n return;\n\n var idx = null;\n if (Object.keys(recvonlySsrcs[type]).length > 0) {\n idx = self.getFirstSendingIndexFromAnswer(type);\n if (idx === null){\n // If this is the first offer we receive, we don't have a\n // cached answer. Assume that we will be sending media using\n // the first m-line for each media type.\n\n for (var i = 0; i < session.media.length; i++) {\n if (session.media[i].type === type) {\n idx = i;\n break;\n }\n }\n }\n }\n\n if (idx && session.media.length > idx) {\n var mLine = session.media[idx];\n Object.keys(recvonlySsrcs[type]).forEach(function(ssrc) {\n if (mLine.sources && mLine.sources[ssrc]) {\n console.warn(\"Replacing an existing SSRC.\");\n }\n if (!mLine.sources) {\n mLine.sources = {};\n }\n\n mLine.sources[ssrc] = recvonlySsrcs[type][ssrc];\n });\n }\n });\n\n if (typeof session.groups !== 'undefined') {\n // We regenerate the BUNDLE group (since we regenerated the mids)\n session.groups.some(function(group) {\n\t if (group.type === 'BUNDLE') {\n\t group.mids = mids.join(' ');\n\t return true;\n\t }\n });\n }\n\n // msid semantic\n session.msidSemantic = {\n semantic: 'WMS',\n token: '*'\n };\n\n var resStr = transform.write(session);\n\n // Cache the transformed SDP (Unified Plan) for later re-use in this\n // function.\n this.cache[desc.type] = resStr;\n\n return new RTCSessionDescription({\n type: desc.type,\n sdp: resStr\n });\n\n //#endregion\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/interop.js\n// module chunks = main","/* Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar transform = require('sdp-transform');\n\nexports.write = function(session, opts) {\n\n if (typeof session !== 'undefined' &&\n typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // expand sources to ssrcs\n if (typeof mLine.sources !== 'undefined' &&\n Object.keys(mLine.sources).length !== 0) {\n mLine.ssrcs = [];\n Object.keys(mLine.sources).forEach(function (ssrc) {\n var source = mLine.sources[ssrc];\n Object.keys(source).forEach(function (attribute) {\n mLine.ssrcs.push({\n id: ssrc,\n attribute: attribute,\n value: source[attribute]\n });\n });\n });\n delete mLine.sources;\n }\n\n // join ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs !== 'undefined' &&\n Array.isArray(ssrcGroup.ssrcs)) {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.join(' ');\n }\n });\n }\n });\n }\n\n // join group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids !== 'undefined' && Array.isArray(g.mids)) {\n g.mids = g.mids.join(' ');\n }\n });\n }\n\n return transform.write(session, opts);\n};\n\nexports.parse = function(sdp) {\n var session = transform.parse(sdp);\n\n if (typeof session !== 'undefined' && typeof session.media !== 'undefined' &&\n Array.isArray(session.media)) {\n\n session.media.forEach(function (mLine) {\n // group sources attributes by ssrc\n if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) {\n mLine.sources = {};\n mLine.ssrcs.forEach(function (ssrc) {\n if (!mLine.sources[ssrc.id])\n mLine.sources[ssrc.id] = {};\n mLine.sources[ssrc.id][ssrc.attribute] = ssrc.value;\n });\n\n delete mLine.ssrcs;\n }\n\n // split ssrcs in ssrc groups\n if (typeof mLine.ssrcGroups !== 'undefined' &&\n Array.isArray(mLine.ssrcGroups)) {\n mLine.ssrcGroups.forEach(function (ssrcGroup) {\n if (typeof ssrcGroup.ssrcs === 'string') {\n ssrcGroup.ssrcs = ssrcGroup.ssrcs.split(' ');\n }\n });\n }\n });\n }\n // split group mids\n if (typeof session !== 'undefined' &&\n typeof session.groups !== 'undefined' && Array.isArray(session.groups)) {\n\n session.groups.forEach(function (g) {\n if (typeof g.mids === 'string') {\n g.mids = g.mids.split(' ');\n }\n });\n }\n\n return session;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module id = ../../../../openvidu-browser/node_modules/sdp-translator/lib/transform.js\n// module chunks = main","/**\n * UAParser.js v0.7.17\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 & MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.17',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]+)*/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]+)*/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [NAME, VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\\/([\\w\\.-]+)/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]+)*/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/[\\w\\.]+.*silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/[\\w\\.]+.*silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]+)*/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w+)*/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]+)*/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?(:?\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w+)*/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)*/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w+)*/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]+)*/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w+)*/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)?(?:[\\s_]*[\\w\\s]+)?)\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i // OnePlus\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Venue[\\d\\s]*)\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(zte)?.+(k\\d{2})\\s+build/i // ZTE K Series Tablet\n ], [[VENDOR, 'ZTE'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2}x?.*)\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(.+)\\s+build/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?.+)\\s+build/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?.+)\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-?)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(.*\\b)\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q.+)\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android.+)[;\\/].+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]+).*(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s]+\\w)*/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]+)*/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]+)*/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]+)*/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w+)*/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]+)*/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]+)*/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]+)*/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.]+\\d)*/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]+(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]+\\w)*/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]+)*/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.]*)*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]+)*/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module id = ../../../../openvidu-browser/node_modules/ua-parser-js/src/ua-parser.js\n// module chunks = main","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/uuid/index.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/index.js\n// module chunks = main","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/bytesToUuid.js\n// module chunks = main","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/lib/rng-browser.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/uuid/v1.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v1.js\n// module chunks = main","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/uuid/v4.js\n// module id = ../../../../openvidu-browser/node_modules/uuid/v4.js\n// module chunks = main","/*\r\nWildEmitter.js is a slim little event emitter by @henrikjoreteg largely based\r\non @visionmedia's Emitter from UI Kit.\r\n\r\nWhy? I wanted it standalone.\r\n\r\nI also wanted support for wildcard emitters like this:\r\n\r\nemitter.on('*', function (eventName, other, event, payloads) {\r\n\r\n});\r\n\r\nemitter.on('somenamespace*', function (eventName, payloads) {\r\n\r\n});\r\n\r\nPlease note that callbacks triggered by wildcard registered events also get\r\nthe event name as the first argument.\r\n*/\r\n\r\nmodule.exports = WildEmitter;\r\n\r\nfunction WildEmitter() { }\r\n\r\nWildEmitter.mixin = function (constructor) {\r\n var prototype = constructor.prototype || constructor;\r\n\r\n prototype.isWildEmitter= true;\r\n\r\n // Listen on the given `event` with `fn`. Store a group name if present.\r\n prototype.on = function (event, groupName, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n func._groupName = group;\r\n (this.callbacks[event] = this.callbacks[event] || []).push(func);\r\n return this;\r\n };\r\n\r\n // Adds an `event` listener that will be invoked a single\r\n // time then automatically removed.\r\n prototype.once = function (event, groupName, fn) {\r\n var self = this,\r\n hasGroup = (arguments.length === 3),\r\n group = hasGroup ? arguments[1] : undefined,\r\n func = hasGroup ? arguments[2] : arguments[1];\r\n function on() {\r\n self.off(event, on);\r\n func.apply(this, arguments);\r\n }\r\n this.on(event, group, on);\r\n return this;\r\n };\r\n\r\n // Unbinds an entire group\r\n prototype.releaseGroup = function (groupName) {\r\n this.callbacks = this.callbacks || {};\r\n var item, i, len, handlers;\r\n for (item in this.callbacks) {\r\n handlers = this.callbacks[item];\r\n for (i = 0, len = handlers.length; i < len; i++) {\r\n if (handlers[i]._groupName === groupName) {\r\n //console.log('removing');\r\n // remove it and shorten the array we're looping through\r\n handlers.splice(i, 1);\r\n i--;\r\n len--;\r\n }\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n // Remove the given callback for `event` or all\r\n // registered callbacks.\r\n prototype.off = function (event, fn) {\r\n this.callbacks = this.callbacks || {};\r\n var callbacks = this.callbacks[event],\r\n i;\r\n\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (arguments.length === 1) {\r\n delete this.callbacks[event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n i = callbacks.indexOf(fn);\r\n callbacks.splice(i, 1);\r\n if (callbacks.length === 0) {\r\n delete this.callbacks[event];\r\n }\r\n return this;\r\n };\r\n\r\n /// Emit `event` with the given args.\r\n // also calls any `*` handlers\r\n prototype.emit = function (event) {\r\n this.callbacks = this.callbacks || {};\r\n var args = [].slice.call(arguments, 1),\r\n callbacks = this.callbacks[event],\r\n specialCallbacks = this.getWildcardCallbacks(event),\r\n i,\r\n len,\r\n item,\r\n listeners;\r\n\r\n if (callbacks) {\r\n listeners = callbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, args);\r\n }\r\n }\r\n\r\n if (specialCallbacks) {\r\n len = specialCallbacks.length;\r\n listeners = specialCallbacks.slice();\r\n for (i = 0, len = listeners.length; i < len; ++i) {\r\n if (!listeners[i]) {\r\n break;\r\n }\r\n listeners[i].apply(this, [event].concat(args));\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // Helper for for finding special wildcard event handlers that match the event\r\n prototype.getWildcardCallbacks = function (eventName) {\r\n this.callbacks = this.callbacks || {};\r\n var item,\r\n split,\r\n result = [];\r\n\r\n for (item in this.callbacks) {\r\n split = item.split('*');\r\n if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {\r\n result = result.concat(this.callbacks[item]);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n};\r\n\r\nWildEmitter.mixin(WildEmitter);\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module id = ../../../../openvidu-browser/node_modules/wildemitter/wildemitter.js\n// module chunks = main","/*!\n * EventEmitter v5.2.4 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /opt/openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module id = ../../../../openvidu-browser/node_modules/wolfy87-eventemitter/EventEmitter.js\n// module chunks = main","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/$$_lazy_route_resource lazy\n// module id = ./src/$$_lazy_route_resource lazy recursive\n// module chunks = main","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.css\n// module id = ./src/app/app.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/app.component.html\n// module id = ./src/app/app.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { InfoService } from 'app/services/info.service';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport {\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n} from '@angular/material';\n\n@NgModule({\n imports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n exports: [\n BrowserAnimationsModule,\n MatButtonModule,\n MatIconModule,\n MatCheckboxModule,\n MatCardModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n MatDialogModule,\n MatSlideToggleModule,\n MatListModule\n ],\n})\nexport class AppMaterialModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.material.module.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpModule } from '@angular/http';\nimport { RouterModule } from '@angular/router';\nimport 'hammerjs';\n\nimport { routing } from './app.routing';\nimport { AppMaterialModule } from 'app/app.material.module';\n\nimport { InfoService } from './services/info.service';\nimport { RestService } from './services/rest.service';\n\nimport { AppComponent } from './app.component';\nimport { DashboardComponent } from './components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from './components/session-details/session-details.component';\nimport { CredentialsDialogComponent } from './components/dashboard/credentials-dialog.component';\nimport { LayoutBestFitComponent } from './components/layouts/layout-best-fit/layout-best-fit.component';\n\n\n@NgModule({\n declarations: [\n AppComponent,\n DashboardComponent,\n SessionDetailsComponent,\n CredentialsDialogComponent,\n LayoutBestFitComponent,\n ],\n imports: [\n BrowserModule,\n FormsModule,\n HttpModule,\n routing,\n AppMaterialModule,\n FlexLayoutModule\n ],\n entryComponents: [\n CredentialsDialogComponent,\n ],\n providers: [InfoService, RestService],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { DashboardComponent } from 'app/components/dashboard/dashboard.component';\nimport { SessionDetailsComponent } from 'app/components/session-details/session-details.component';\nimport { LayoutBestFitComponent } from 'app/components/layouts/layout-best-fit/layout-best-fit.component';\n\nconst appRoutes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n pathMatch: 'full'\n },\n {\n path: 'session/:sessionId',\n component: SessionDetailsComponent,\n pathMatch: 'full'\n },\n {\n path: 'layout-best-fit/:sessionId/:secret',\n component: LayoutBestFitComponent,\n pathMatch: 'full'\n }\n];\n\nexport const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.routing.ts","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n@Component({\n selector: 'app-credentials-dialog',\n template: `\n
\n

\n Insert your secret\n

\n
\n \n \n \n \n \n \n \n \n \n
\n
\n `,\n styles: [`\n #quality-div {\n margin-top: 20px;\n }\n #join-div {\n margin-top: 25px;\n margin-bottom: 20px;\n }\n #quality-tag {\n display: block;\n }\n h5 {\n margin-bottom: 10px;\n text-align: left;\n }\n #joinWithVideo {\n margin-right: 50px;\n }\n mat-dialog-actions {\n display: block;\n }\n #join-btn {\n float: right;\n }\n `],\n})\nexport class CredentialsDialogComponent {\n\n public myReference: MatDialogRef;\n secret: string;\n\n constructor() { }\n\n testVideo() {\n this.myReference.close(this.secret);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/credentials-dialog.component.ts","module.exports = \"#dashboard-div {\\n padding: 20px;\\n}\\n\\n#log {\\n height: 90%;\\n}\\n\\n#log-content {\\n height: 90%;\\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\\n overflow-y: auto;\\n overflow-x: hidden\\n}\\n\\nul {\\n margin: 0;\\n}\\n\\n#test-btn {\\n text-transform: uppercase;\\n float: right;\\n}\\n\\nmat-card-title button.blue {\\n color: #ffffff;\\n background-color: #0088aa;\\n}\\n\\nmat-card-title button.yellow {\\n color: rgba(0, 0, 0, 0.87);\\n background-color: #ffcc00;\\n}\\n\\nmat-spinner {\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tick-div {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#tooltip-tick {\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n z-index: 2;\\n}\\n\\n.circ {\\n opacity: 0;\\n stroke-dasharray: 130;\\n stroke-dashoffset: 130;\\n -webkit-transition: all 1s;\\n transition: all 1s;\\n}\\n\\n.tick {\\n stroke-dasharray: 50;\\n stroke-dashoffset: 50;\\n -webkit-transition: stroke-dashoffset 1s 0.5s ease-out;\\n transition: stroke-dashoffset 1s 0.5s ease-out;\\n}\\n\\n.drawn+svg .path {\\n opacity: 1;\\n stroke-dashoffset: 0;\\n}\\n\\n#mirrored-video {\\n position: relative;\\n}\\n\\n/* Pure CSS loader */\\n\\n#loader {\\n width: 100px;\\n height: 100px;\\n z-index: 1;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n\\n#loader * {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::after {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n#loader ::before {\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n.loader-1 {\\n height: 100px;\\n width: 100px;\\n -webkit-animation: loader-1-1 4.8s linear infinite;\\n animation: loader-1-1 4.8s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loader-1-1 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.loader-1 span {\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n -webkit-animation: loader-1-2 1.2s linear infinite;\\n animation: loader-1-2 1.2s linear infinite;\\n}\\n\\n@-webkit-keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n }\\n}\\n\\n@keyframes loader-1-2 {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(220deg);\\n transform: rotate(220deg);\\n }\\n}\\n\\n.loader-1 span::after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin: auto;\\n height: 100px;\\n width: 100px;\\n clip: rect(0, 100px, 100px, 50px);\\n border: 8px solid #4d4d4d;\\n border-radius: 50%;\\n -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite;\\n}\\n\\n@-webkit-keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n }\\n}\\n\\n@keyframes loader-1-3 {\\n 0% {\\n -webkit-transform: rotate(-140deg);\\n transform: rotate(-140deg);\\n }\\n 50% {\\n -webkit-transform: rotate(-160deg);\\n transform: rotate(-160deg);\\n }\\n 100% {\\n -webkit-transform: rotate(140deg);\\n transform: rotate(140deg);\\n }\\n}\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.css\n// module id = ./src/app/components/dashboard/dashboard.component.css\n// module chunks = main","module.exports = \"
\\n\\n
\\n \\n Server events\\n \\n lock_outline\\n \\n \\n \\n \\n
    \\n
  • \\n

    {{i}}

    \\n
  • \\n
\\n
\\n
\\n
\\n\\n
\\n \\n Test the connection\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \\n \\n \\n
\\n
\\n

{{msg}}

\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/dashboard/dashboard.component.html\n// module id = ./src/app/components/dashboard/dashboard.component.html\n// module chunks = main","import { Component, OnInit, ViewChild, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material';\nimport { Subscription } from 'rxjs/Subscription';\n\nimport { InfoService } from '../../services/info.service';\nimport { RestService } from '../../services/rest.service';\n\nimport { OpenVidu, Session } from 'openvidu-browser';\nimport { CredentialsDialogComponent } from './credentials-dialog.component';\n\ndeclare const $;\n\n@Component({\n selector: 'app-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css'],\n})\nexport class DashboardComponent implements OnInit, OnDestroy {\n\n websocket: WebSocket;\n\n @ViewChild('scrollMe') private myScrollContainer: ElementRef;\n lockScroll = false;\n\n infoSubscription: Subscription;\n info = [];\n\n session: Session;\n\n testStatus = 'DISCONNECTED';\n testButton = 'Test';\n tickClass = 'trigger';\n showSpinner = false;\n msgChain = [];\n\n openviduPublicUrl: string;\n\n constructor(private infoService: InfoService, private restService: RestService, public dialog: MatDialog) {\n // Subscription to info updated event raised by InfoService\n this.infoSubscription = this.infoService.newInfo$.subscribe(\n info => {\n this.info.push(info);\n this.scrollToBottom();\n });\n }\n\n ngOnInit() {\n\n const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';\n const port = (location.port) ? (':' + location.port) : '';\n\n this.websocket = new WebSocket(protocol + location.hostname + port + '/info');\n\n this.websocket.onopen = (event) => {\n console.log('Info websocket connected');\n };\n this.websocket.onclose = (event) => {\n console.log('Info websocket closed');\n };\n this.websocket.onerror = (event) => {\n console.log('Info websocket error');\n };\n this.websocket.onmessage = (event) => {\n console.log('Info websocket message');\n console.log(event.data);\n this.infoService.updateInfo(event.data);\n };\n\n this.restService.getOpenViduPublicUrl()\n .then(url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n })\n .catch(error => {\n console.error(error);\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n // On window closed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n ngOnDestroy() {\n // On component destroyed leave test session and close info websocket\n if (this.session) {\n this.endTestVideo();\n }\n this.websocket.close();\n }\n\n toggleTestVideo() {\n if (!this.session) {\n this.testVideo();\n } else {\n this.endTestVideo();\n }\n }\n\n testVideo() {\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n if (!this.openviduPublicUrl) {\n this.restService.getOpenViduPublicUrl()\n .then((url => {\n this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }))\n .catch(error => {\n console.error(error);\n });\n } else {\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }\n }\n });\n }\n\n connectToSession(token: string) {\n this.msgChain = [];\n\n const OV = new OpenVidu();\n this.session = OV.initSession();\n\n this.testStatus = 'CONNECTING';\n this.testButton = 'Testing...';\n\n this.session.connect(token)\n .then(() => {\n\n this.testStatus = 'CONNECTED';\n\n const publisherRemote = OV.initPublisher('mirrored-video', {\n publishAudio: true,\n publishVideo: true,\n resolution: '640x480'\n },\n e => {\n if (!!e) {\n console.error(e);\n }\n }\n );\n\n publisherRemote.on('accessAllowed', () => {\n this.msgChain.push('Camera access allowed');\n });\n\n publisherRemote.on('accessDenied', () => {\n this.endTestVideo();\n this.msgChain.push('Camera access denied');\n });\n\n publisherRemote.on('videoElementCreated', (video) => {\n this.showSpinner = true;\n this.msgChain.push('Video element created');\n });\n\n publisherRemote.on('remoteVideoPlaying', (video) => {\n this.msgChain.push('Remote video playing');\n this.testButton = 'End test';\n this.testStatus = 'PLAYING';\n this.showSpinner = false;\n });\n\n publisherRemote.subscribeToRemote();\n this.session.publish(publisherRemote);\n\n })\n .catch(error => {\n if (error.code === 401) { // User unauthorized error. OpenVidu security is active\n this.endTestVideo();\n let dialogRef: MatDialogRef;\n dialogRef = this.dialog.open(CredentialsDialogComponent);\n dialogRef.componentInstance.myReference = dialogRef;\n\n dialogRef.afterClosed().subscribe(secret => {\n if (secret) {\n this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret);\n }\n });\n } else {\n console.error(error);\n }\n });\n }\n\n endTestVideo() {\n this.session.disconnect();\n this.session = null;\n this.testStatus = 'DISCONNECTED';\n this.testButton = 'Test';\n this.showSpinner = false;\n this.info = [];\n this.msgChain = [];\n }\n\n scrollToBottom(): void {\n try {\n if (!this.lockScroll) {\n this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;\n }\n } catch (err) {\n console.error('[Error]:' + err.toString());\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/dashboard/dashboard.component.ts","module.exports = \".bounds {\\n background-color: black;\\n overflow: hidden;\\n cursor: none !important;\\n position: absolute;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n}\\n\\nvideo {\\n -o-object-fit: cover;\\n object-fit: cover;\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n}\\n\\n/*!\\n * Copyright (c) 2017 TokBox, Inc.\\n * Released under the MIT license\\n * http://opensource.org/licenses/MIT\\n */\\n\\n.custom-class {\\n min-height: 0px !important;\\n}\\n\\n/**\\n * OT Base styles\\n */\\n\\n/* Root OT object, this is where our CSS reset happens */\\n\\n.OT_root,\\n.OT_root * {\\n color: #ffffff;\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font-family: Arial, Helvetica, sans-serif;\\n vertical-align: baseline;\\n}\\n\\n.OT_dialog-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_dialog-centering-child {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_dialog {\\n position: relative;\\n\\n -webkit-box-sizing: border-box;\\n\\n box-sizing: border-box;\\n max-width: 576px;\\n margin-right: auto;\\n margin-left: auto;\\n padding: 36px;\\n text-align: center; /* centers all the inline content */\\n\\n background-color: #363636;\\n color: #fff;\\n -webkit-box-shadow: 2px 4px 6px #999;\\n box-shadow: 2px 4px 6px #999;\\n font-family: 'Didact Gothic', sans-serif;\\n font-size: 13px;\\n line-height: 1.4;\\n}\\n\\n.OT_dialog * {\\n font-family: inherit;\\n -webkit-box-sizing: inherit;\\n box-sizing: inherit;\\n}\\n\\n.OT_closeButton {\\n color: #999999;\\n cursor: pointer;\\n font-size: 32px;\\n line-height: 36px;\\n position: absolute;\\n right: 18px;\\n top: 0;\\n}\\n\\n.OT_dialog-messages {\\n text-align: center;\\n}\\n\\n.OT_dialog-messages-main {\\n margin-bottom: 36px;\\n line-height: 36px;\\n\\n font-weight: 300;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-messages-minor {\\n margin-bottom: 18px;\\n\\n font-size: 13px;\\n line-height: 18px;\\n color: #A4A4A4;\\n}\\n\\n.OT_dialog-messages-minor strong {\\n color: #ffffff;\\n}\\n\\n.OT_dialog-actions-card {\\n display: inline-block;\\n}\\n\\n.OT_dialog-button-title {\\n margin-bottom: 18px;\\n line-height: 18px;\\n\\n font-weight: 300;\\n text-align: center;\\n font-size: 14px;\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title label {\\n color: #999999;\\n}\\n\\n.OT_dialog-button-title a,\\n.OT_dialog-button-title a:link,\\n.OT_dialog-button-title a:active {\\n color: #02A1DE;\\n}\\n\\n.OT_dialog-button-title strong {\\n color: #ffffff;\\n font-weight: 100;\\n display: block;\\n}\\n\\n.OT_dialog-button {\\n display: inline-block;\\n\\n margin-bottom: 18px;\\n padding: 0 1em;\\n\\n background-color: #1CA3DC;\\n text-align: center;\\n cursor: pointer;\\n}\\n\\n.OT_dialog-button:disabled {\\n cursor: not-allowed;\\n opacity: 0.5;\\n}\\n\\n.OT_dialog-button-large {\\n line-height: 36px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n font-weight: 100;\\n font-size: 24px;\\n}\\n\\n.OT_dialog-button-small {\\n line-height: 18px;\\n padding-top: 9px;\\n padding-bottom: 9px;\\n\\n background-color: #444444;\\n color: #999999;\\n font-size: 16px;\\n}\\n\\n.OT_dialog-progress-bar {\\n display: inline-block; /* prevents margin collapse */\\n width: 100%;\\n margin-top: 5px;\\n margin-bottom: 41px;\\n\\n border: 1px solid #4E4E4E;\\n height: 8px;\\n}\\n\\n.OT_dialog-progress-bar-fill {\\n height: 100%;\\n\\n background-color: #29A4DA;\\n}\\n\\n.OT_dialog-plugin-upgrading .OT_dialog-plugin-upgrade-percentage {\\n line-height: 54px;\\n\\n font-size: 48px;\\n font-weight: 100;\\n}\\n\\n/* Helpers */\\n\\n.OT_centered {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n margin: 0;\\n}\\n\\n.OT_dialog-hidden {\\n display: none;\\n}\\n\\n.OT_dialog-button-block {\\n display: block;\\n}\\n\\n.OT_dialog-no-natural-margin {\\n margin-bottom: 0;\\n}\\n\\n/* Publisher and Subscriber styles */\\n\\n.OT_publisher, .OT_subscriber {\\n position: relative;\\n min-width: 48px;\\n min-height: 48px;\\n}\\n\\n.OT_publisher .OT_video-element,\\n.OT_subscriber .OT_video-element {\\n display: block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n\\n -webkit-transform-origin: 0 0;\\n\\n transform-origin: 0 0;\\n}\\n\\n/* Styles that are applied when the video element should be mirrored */\\n\\n.OT_publisher.OT_mirrored .OT_video-element {\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n -webkit-transform-origin: 50% 50%;\\n transform-origin: 50% 50%;\\n}\\n\\n.OT_subscriber_error {\\n background-color: #000;\\n color: #fff;\\n text-align: center;\\n}\\n\\n.OT_subscriber_error > p {\\n padding: 20px;\\n}\\n\\n/* The publisher/subscriber name/mute background */\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar,\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name,\\n.OT_publisher .OT_archiving,\\n.OT_subscriber .OT_archiving,\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status,\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n -webkit-box-sizing: border-box;\\n -ms-box-sizing: border-box;\\n box-sizing: border-box;\\n top: 0;\\n left: 0;\\n right: 0;\\n display: block;\\n height: 34px;\\n position: absolute;\\n}\\n\\n.OT_publisher .OT_bar,\\n.OT_subscriber .OT_bar {\\n background: rgba(0, 0, 0, 0.4);\\n}\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n z-index: 1; /* required to get audio level meter underneath */\\n}\\n\\n/* The publisher/subscriber name panel/archiving status bar */\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n background-color: transparent;\\n color: #ffffff;\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n padding: 0 4px 0 36px;\\n}\\n\\n.OT_publisher .OT_archiving-status,\\n.OT_subscriber .OT_archiving-status {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n left: 34px;\\n padding: 0 4px;\\n color: rgba(255, 255, 255, 0.8);\\n font-size: 15px;\\n line-height: 34px;\\n font-weight: normal;\\n}\\n\\n.OT_micro .OT_archiving-status,\\n.OT_micro:hover .OT_archiving-status,\\n.OT_mini .OT_archiving-status,\\n.OT_mini:hover .OT_archiving-status {\\n display: none;\\n}\\n\\n.OT_publisher .OT_archiving-light-box,\\n.OT_subscriber .OT_archiving-light-box {\\n background: rgba(0, 0, 0, 0.4);\\n top: auto;\\n bottom: 0;\\n right: auto;\\n width: 34px;\\n height: 34px;\\n}\\n\\n.OT_archiving-light {\\n width: 7px;\\n height: 7px;\\n border-radius: 30px;\\n position: absolute;\\n top: 14px;\\n left: 14px;\\n background-color: #575757;\\n -webkit-box-shadow: 0 0 5px 1px #575757;\\n box-shadow: 0 0 5px 1px #575757;\\n}\\n\\n.OT_archiving-light.OT_active {\\n background-color: #970d13;\\n animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n -moz-animation: OT_pulse 1.3s ease-in;\\n -webkit-animation: OT_pulse 1.3s ease-in;\\n animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n -moz-animation-iteration-count: infinite;\\n -webkit-animation-iteration-count: infinite;\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n@-webkit-keyframes OT_pulse {\\n 0% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 30% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 50% {\\n -webkit-box-shadow: 0 0 5px 1px #c70019;\\n box-shadow: 0 0 5px 1px #c70019;\\n }\\n\\n 80% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n\\n 100% {\\n -webkit-box-shadow: 0 0 0px 0px #c70019;\\n box-shadow: 0 0 0px 0px #c70019;\\n }\\n}\\n\\n.OT_mini .OT_bar,\\n.OT_bar.OT_mode-mini,\\n.OT_bar.OT_mode-mini-auto {\\n bottom: 0;\\n height: auto;\\n}\\n\\n.OT_mini .OT_name.OT_mode-off,\\n.OT_mini .OT_name.OT_mode-on,\\n.OT_mini .OT_name.OT_mode-auto,\\n.OT_mini:hover .OT_name.OT_mode-auto {\\n display: none;\\n}\\n\\n.OT_publisher .OT_name,\\n.OT_subscriber .OT_name {\\n left: 10px;\\n right: 37px;\\n height: 34px;\\n padding-left: 0;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n border: none;\\n cursor: pointer;\\n display: block;\\n position: absolute;\\n text-align: center;\\n text-indent: -9999em;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n}\\n\\n.OT_publisher .OT_mute,\\n.OT_subscriber .OT_mute {\\n right: 0;\\n top: 0;\\n border-left: 1px solid rgba(255, 255, 255, 0.2);\\n height: 36px;\\n width: 37px;\\n}\\n\\n.OT_mini .OT_mute,\\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\\n top: 50%;\\n left: 50%;\\n right: auto;\\n margin-top: -18px;\\n margin-left: -18.5px;\\n border-left: none;\\n}\\n\\n.OT_publisher .OT_mute {\\n background-image: url(data:image/png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3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg==);\\n background-position: 9px 4px;\\n}\\n\\n.OT_subscriber .OT_mute {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII=);\\n background-position: 8px 7px;\\n}\\n\\n.OT_subscriber .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9Nc9iRrBuYySmIsXUU9iFMEFERRBvAjJLUQi5ioiHvSScfTmgqC4XAT1ZIgLuJHkICaaQAgKI2hAUBT30bjUq7bbv4eukXK029F3+eqtv/fqK6qQdEnSNUmT6CDB/bvgfjO4N9zj2RD8007xg1IABkwEzkma0qb4PGAPMBZYLtSD8eNwAEjqTlNI0gNJM4YU7w7ut4O7gvuhZFsR3C8NC5BBLiTIY0mzM8AvqbiC++pk+zLpE95XuwAws3vAQuBPYDRwWtL84P4tsDSLv5oaug4EYOawAMF9jMdoLxqNZcDvQA04UVYqL4G/svj7AF21mhJscrvCksYBFO7xc2AAGGg2mrdjvf4rcAyomNn+slLZmUEGBgsYdh945xZJmgvckDSrEJpK6ySBgV6q12O8ABwGPjGzfWWlsjdN9rpjoSfA+DYDXARGAksK4Is3XC1Ub4z1f4CDQGFmu6tleQSYk0U+p7WVeefLJc00s4fAeWB6Qeunvj0m2ugx9gO7kmlrtSxvBfcy6fXUZS6rgG/S+jLQUwCVNmMC9HqM14EtSe+rluWazN8YEv8IqKZ1E1qnaIDO0ucx3gX6kv6TpM3AM+D/IbGjgP60/gq4WQA33gMA2OQxPgHWJX1ttSwL4FAeZGYLgB2SasBs4A8L7qOBf9M0uXQB3a+TMYSmVctyDrA9mfcBK82smSdKWgCcAaa1bTm4fxbc/8uuCQX3RanAD5Ka6Wo5IGnE0HxJPZ03pQX5Org3MsD3AO5xXLPZXJ9BjkrqdFg6QjZkgG3Jtsw93pG0VFI9QU5K6voYQBHcTydAfwheBI9HgvvPAJIWS3qeIL9JGvUxkO7gfi1BrqTvwkG/pPmSnibIqTzXPgAyEVgBjAEu1qrVPbk/PVTHgb/NbPGg/RVIzOQqzSTBaQAAAABJRU5ErkJggg==);\\n background-position: 7px 7px;\\n}\\n\\n/**\\n * Styles for display modes\\n *\\n * Note: It's important that these completely control the display and opacity\\n * attributes, no other selectors should atempt to change them.\\n */\\n\\n/* Default display mode transitions for various chrome elements */\\n\\n.OT_publisher .OT_edge-bar-item,\\n.OT_subscriber .OT_edge-bar-item {\\n -webkit-transition-property: top, bottom, opacity;\\n transition-property: top, bottom, opacity;\\n -webkit-transition-duration: 0.5s;\\n transition-duration: 0.5s;\\n -webkit-transition-timing-function: ease-in;\\n transition-timing-function: ease-in;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\\n top: -25px;\\n opacity: 0;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-auto,\\n.OT_publisher .OT_mute.OT_mode-mini-auto,\\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\\n top: auto;\\n bottom: -25px;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\\n top: 0;\\n opacity: 1;\\n}\\n\\n.OT_mini .OT_mute.OT_mode-on,\\n.OT_mini:hover .OT_mute.OT_mode-auto,\\n.OT_mute.OT_mode-mini,\\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\\n top: 50%;\\n}\\n\\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\\n top: auto;\\n bottom: 0;\\n opacity: 1;\\n}\\n\\n/* Contains the video element, used to fix video letter-boxing */\\n\\n.OT_widget-container {\\n width: 100%;\\n height: 100%;\\n position: absolute;\\n background-color: #000000;\\n overflow: hidden;\\n}\\n\\n/* Load animation */\\n\\n.OT_root .OT_video-loading {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n background-color: rgba(0, 0, 0, .75);\\n}\\n\\n.OT_root .OT_video-loading .OT_video-loading-spinner {\\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAtMjAgMjQwIDI0MCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4Mj0iMCIgeTI9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3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gMCAwIDEgMCAxMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2IpIiBkPSJNODYuNiA1MEExMDAgMTAwIDAgMCAxIDAgMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNjKSIgZD0iTTAgMTAwYTEwMCAxMDAgMCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+PHBhdGggc3Ryb2tlPSJ1cmwoI2YpIiBkPSJNMC0xMDBhMTAwIDEwMCAwIDAgMSA4Ni42IDUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjwvZz48L21hc2s+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9Ii0yMCIgeT0iLTIwIiBtYXNrPSJ1cmwoI2cpIiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;\\n position: absolute;\\n width: 32px;\\n height: 32px;\\n left: 50%;\\n top: 50%;\\n margin-left: -16px;\\n margin-top: -16px;\\n -webkit-animation: OT_spin 2s linear infinite;\\n animation: OT_spin 2s linear infinite;\\n}\\n\\n@-webkit-keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes OT_spin {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n.OT_publisher.OT_loading .OT_video-loading,\\n.OT_subscriber.OT_loading .OT_video-loading {\\n display: block;\\n}\\n\\n.OT_video-centering {\\n display: table;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.OT_video-container {\\n display: table-cell;\\n vertical-align: middle;\\n}\\n\\n.OT_video-poster {\\n position: absolute;\\n z-index: 1;\\n width: 100%;\\n height: 100%;\\n display: none;\\n\\n opacity: .25;\\n\\n background-repeat: no-repeat;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDcxIDQ2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc5IDMwOGMxNC4yNS02LjUgNTQuMjUtMTkuNzUgNzEtMjkgOS0zLjI1IDI1LTIxIDI1LTIxczMuNzUtMTMgMy0yMmMtMS43NS02Ljc1LTE1LTQzLTE1LTQzLTIuNSAzLTQuNzQxIDMuMjU5LTcgMS0zLjI1LTcuNS0yMC41LTQ0LjUtMTYtNTcgMS4yNS03LjUgMTAtNiAxMC02LTExLjI1LTMzLjc1LTgtNjctOC02N3MuMDczLTcuMzQ2IDYtMTVjLTMuNDguNjM3LTkgNC05IDQgMi41NjMtMTEuNzI3IDE1LTIxIDE1LTIxIC4xNDgtLjMxMi0xLjMyMS0xLjQ1NC0xMCAxIDEuNS0yLjc4IDE2LjY3NS04LjY1NCAzMC0xMSAzLjc4Ny05LjM2MSAxMi43ODItMTcuMzk4IDIyLTIyLTIuMzY1IDMuMTMzLTMgNi0zIDZzMTUuNjQ3LTguMDg4IDQxLTZjLTE5Ljc1IDItMjQgNi0yNCA2czc0LjUtMTAuNzUgMTA0IDM3YzcuNSA5LjUgMjQuNzUgNTUuNzUgMTAgODkgMy43NS0xLjUgNC41LTQuNSA5IDEgLjI1IDE0Ljc1LTExLjUgNjMtMTkgNjItMi43NSAxLTQtMy00LTMtMTAuNzUgMjkuNS0xNCAzOC0xNCAzOC0yIDQuMjUtMy43NSAxOC41LTEgMjIgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\\n background-size: auto 76%;\\n}\\n\\n.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: cover;\\n object-fit: cover;\\n}\\n\\n/* Workaround for iOS freezing issue when cropping videos */\\n\\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\\n\\n@media only screen\\n and (orientation: portrait) {\\n .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\\n -o-object-fit: contain !important;\\n object-fit: contain !important;\\n }\\n}\\n\\n.OT_fit-mode-contain .OT_video-element {\\n -o-object-fit: contain;\\n object-fit: contain;\\n}\\n\\n.OT_fit-mode-cover .OT_video-poster {\\n background-position: center bottom;\\n}\\n\\n.OT_fit-mode-contain .OT_video-poster {\\n background-position: center;\\n}\\n\\n.OT_audio-level-meter {\\n position: absolute;\\n width: 25%;\\n max-width: 224px;\\n min-width: 21px;\\n top: 0;\\n right: 0;\\n overflow: hidden;\\n}\\n\\n.OT_audio-level-meter:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__bar {\\n position: absolute;\\n width: 192%; /* meter value can overflow of 8% */\\n height: 192%;\\n top: -96% /* half of the size */;\\n right: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_audio-level-meter__audio-only-img {\\n position: absolute;\\n top: 22%;\\n right: 15%;\\n width: 40%;\\n\\n opacity: .7;\\n\\n background: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzkgODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzIDMuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NSAwYy0zLjczNy01LjE5MS0xMi43MTEtNC4zMDgtMTIuNzExLTQuMzA4LTIuMjIzIDMuMDE0LTUuMTI2IDI0LjU4Ni0zLjYyNCAyOC43MTggMS40MDEgMS4zMDEgMTEuNjExIDEuNjI5IDEzLjM4LTEuNDM2IDEuMjI2LTguODA0IDIuOTU1LTIyLjk3NSAyLjk1NS0yMi45NzV6Ii8+PHBhdGggZD0iTTY4LjY0NyA1OC42Yy43MjktNC43NTMgMi4zOC05LjU2MSAyLjM4LTE0LjgwNCAwLTIxLjQxMi0xNC4xMTUtMzguNzctMzEuNTI4LTM4Ljc3LTE3LjQxMiAwLTMxLjUyNyAxNy4zNTgtMzEuNTI3IDM4Ljc3IDAgNC41NDEuNTE1IDguOTM2IDEuODAyIDEyLjk1IDEuNjk4IDUuMjk1LTUuNTQyIDYuOTkxLTYuNjE2IDIuMDczQzIuNDEgNTUuMzk0IDAgNTEuNzg3IDAgNDguMTAzIDAgMjEuNTM2IDE3LjY4NSAwIDM5LjUgMCA2MS4zMTYgMCA3OSAyMS41MzYgNzkgNDguMTAzYzAgLjcxOC0yLjg5OSA5LjY5My0zLjI5MiAxMS40MDgtLjc1NCAzLjI5My03Ljc1MSAzLjU4OS03LjA2MS0uOTEyeiIvPjxwYXRoIGQ9Ik01LjA4NCA1MS4zODVjLS44MDQtMy43ODIuNTY5LTcuMzM1IDMuMTM0LTcuOTIxIDIuNjM2LS42MDMgNS40ODUgMi4xNSA2LjI4OSA2LjEzMi43OTcgMy45NDgtLjc1MiA3LjQ1Ny0zLjM4OCA3Ljg1OS0yLjU2Ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+PC9zdmc+) no-repeat center;\\n}\\n\\n.OT_audio-level-meter__audio-only-img:before {\\n /* makes the height of the container equals its width */\\n content: '';\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.OT_audio-level-meter__value {\\n position: absolute;\\n border-radius: 50%;\\n background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\\n}\\n\\n.OT_audio-level-meter.OT_mode-off {\\n display: none;\\n}\\n\\n.OT_audio-level-meter.OT_mode-on,\\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\\n display: block;\\n}\\n\\n.OT_audio-only.OT_publisher .OT_video-element,\\n.OT_audio-only.OT_subscriber .OT_video-element {\\n display: none;\\n}\\n\\n.OT_video-disabled-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: bottom right;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 3px;\\n right: 3px;\\n}\\n\\n.OT_video-disabled {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAINUlEQVR42u2aaUxUVxTHcRBmAAEBRVTK4sKwDIsg+wCK7CqIw1CN1YobbbS2qYlJ06Qx1UpdqMbYWq2pSzWmH6ytNbXWJY1Lq7VuqBERtW64V0XFLYae0/xvcp3MMAMzDz6IyT/ge2ce5/7ucpY3Ts3NzZ1ygF57AJ0gO0G2jyZPmdbFyclJSAV1EeoEaUUSLGdSV5KLLFxzFmA7QVqGqDqjixhWkxCVeyRVl38wM6bwj6yYItYK47BAuu9B0gCqs6Ng2r494KQtkj/Dz2jHraw6qw2fdSE4rNmcCPCvZONP8iF1I6kdBdMaQJWZLeJqRWa2kPJAxXY+GxE+zxLI03GRh8lGSwoi9WCY8FWlCEh+8JOnT7MfPGjMuXX7Tt61hoaCi/9cKmKdv3BxeEtim/UbNpnbQiqF4MmT7kqrbr4lkMcTo46TTSpJB5g+8NHuVWnWuaampvhmO/7duHmrGluoO4C6OsJZGRrkDIld43ZqUOTnlkDSmXmabAoBU0vqBf+6KgFSxQ9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Mgw4AuWNWukNeuOYqOsmQi2jgws4PA/DD/z0B2x0/veCs4naw0cgybezid7X9jV3rX2RSs0wfLkll4pBGcgifg+NYxe1kJ2ycTaRq66uG/wBOl0vjcw70xwAAAABJRU5ErkJggg==);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-warning {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4Ae2aA7D0yBaAc7oH12vbRmlLaxYWb23btm3btm2899a2bWuYtPZ01cmtU9lJrib315yqr9I3Oem/5/s7acwEnehEJzoxCcX2O+wEeIgRBDDaGjAZOgQ6ihRpLklHZDJIXK1WWymMIhGGkVBKCWMM+Iv/f/b5t7faYtM/sGgIS7j8RNLjceUVl41GvGN1BFiHy9sgtRWaYbhvuVQ6o1VOvV5/tLe3dyssKoZuh8xClkDEi2MMS6ZjR0cScxdK/+HgnJsmLccYOx0e/PUGUqfTJDEHkV5go9lcMQoj4R8RpSIRRUr4a9baTJFCCNfqESKJ7RYJibK0xoi05EhFRTxMi1Rit6xHAuLaKRLwEVi6q1x+EhlVpd3d3Wfh4VQkQhRhxthYLg7SRGqdLlIp7UVOHf+JhEhEMscUolVje3p63saeeOFoKsT7fjj++BNuw2I/0ouUENmGaQcQEilQvUU6xuWC0kqmVWCt8df6kG7WLoFA20VSCOyNh0RKPT+SyrTWtQsvuvTYCy84z3+oAdbgAiLGIvHjTz6bFuu/B3lKKfVkFKknwih6EnnipZdfXQZzepAupXSGSCfwUGZtkrx3t/0dSQGnnXbmdocdetArQoj+4VR23wMP3bj/vnv9Sv/rBmkish09ca655thHSrlWq4TFF1vkNDxsgjiUnPqZnHPABIq47jx7pPMcecShfz7x1DO7D6eit99576X1113nVd8rqLGAuDaNitJonTGIqHgQGQjDsJglMrUH5iDSEQbRa6y2yrNvv/PuWVmV/PTzLz8steTit1B9FtGJeZrJksmWdBzBMcami4xUkaY1A1Qe94WIaPGBApJhaERrLrXkElf8+NPPz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NcquMBv/pCNUZ5pHHem01KdN/I/DG66/lLhKSvTO5M84kav5C5z2ZfyAivi9i9VGd45RH7UWJbjwGG/7NYsRECt7jiOToHedKAui8SW4CsxyRc54mKH/8f7ELhCCACyNcIl/wI+FaAJyc8yzRtinQPzWzuFZrFHq/AAAAAElFTkSuQmCC);\\n background-size: 33px auto;\\n}\\n\\n.OT_video-disabled-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_audio-blocked-indicator {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n}\\n\\n.OT_audio-blocked {\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjkwIj48ZGVmcz48cGF0aCBkPSJNNjcgMTJMNi40NDggNzIuNTUyIDAgMzFWMThMMjYgMGw0MSAxMnptMyA3bDYgNDctMjkgMTgtMzUuNTAyLTYuNDk4TDcwIDE5eiIgaWQ9ImEiLz48L2RlZnM+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSI5MCIgcng9IjM1IiByeT0iNDUiIG9wYWNpdHk9Ii41Ii8+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNikiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik0zOS4yNDkgNTEuMzEyYy42OTcgMTAuMzcgMi43ODUgMTcuODk3IDUuMjUxIDE3Ljg5NyAzLjAzOCAwIDUuNS0xMS40MTcgNS41LTI1LjVzLTIuNDYyLTI1LjUtNS41LTI1LjVjLTIuNTEgMC00LjYyOCA3Ljc5Ny01LjI4NyAxOC40NTNBOC45ODkgOC45ODkgMCAwIDEgNDMgNDRhOC45ODggOC45ODggMCAwIDEtMy43NTEgNy4zMTJ6TTIwLjk4NSAzMi4yMjRsMTUuNzQ2LTE2Ljg3N2E3LjM4NSA3LjM4NSAwIDAgMSAxMC4zNzQtLjQyQzUxLjcwMiAxOS4xMTQgNTQgMjkuMjA4IDU0IDQ1LjIwOGMwIDE0LjUyNy0yLjM0MyAyMy44OC03LjAzIDI4LjA1OGE3LjI4IDcuMjggMCAwIDEtMTAuMTY4LS40NjhMMjAuNDA1IDU1LjIyNEgxMmE1IDUgMCAwIDEtNS01di0xM2E1IDUgMCAwIDEgNS01aDguOTg1eiIgZmlsbD0iI0ZGRiIgbWFzaz0idXJsKCNiKSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 90px auto;\\n}\\n\\n.OT_container-audio-blocked {\\n cursor: pointer;\\n}\\n\\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\\n display: none;\\n}\\n\\n.OT_container-audio-blocked .OT_mute {\\n display: none;\\n}\\n\\n.OT_audio-blocked-indicator.OT_active {\\n display: block;\\n}\\n\\n.OT_video-unsupported {\\n opacity: 1;\\n border: none;\\n display: none;\\n position: absolute;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-size: 58px auto;\\n pointer-events: none;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n margin-top: -30px;\\n}\\n\\n.OT_video-unsupported-bar {\\n display: none;\\n position: absolute;\\n width: 192%; /* copy the size of the audio meter bar for symmetry */\\n height: 192%;\\n top: -96% /* half of the size */;\\n left: -96%;\\n border-radius: 50%;\\n\\n background-color: rgba(0, 0, 0, .8);\\n}\\n\\n.OT_video-unsupported-img {\\n display: none;\\n position: absolute;\\n top: 11%;\\n left: 15%;\\n width: 70%;\\n opacity: .7;\\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMCAxIDUgNVY1OC4xOGE1IDUgMCAwIDEtNSA1SDkuMTFhNSA1IDAgMCAxLTUtNVYyNS45N2E1IDUgMCAwIDEgNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwIDEgNC4zMDQgMi43MDJ2MjYuODM1YTMgMyAwIDAgMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg==);\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: 100% auto;\\n}\\n\\n.OT_video-unsupported-img:before {\\n /* makes the height of the container 93% of its width (90/97 px) */\\n content: '';\\n display: block;\\n padding-top: 93%;\\n}\\n\\n.OT_video-unsupported-text {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n text-align: center;\\n height: 100%;\\n margin-top: 40px;\\n}\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.css\n// module chunks = main","module.exports = \"
\\n
\\n
\\n \\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module id = ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.html\n// module chunks = main","import { Component, OnInit, OnDestroy, HostListener, ViewEncapsulation, ApplicationRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { OpenVidu, Session, Stream, Subscriber, StreamEvent } from 'openvidu-browser';\n\nimport { OpenViduLayout } from '../openvidu-layout';\n\n@Component({\n selector: 'app-layout-best-fit',\n templateUrl: './layout-best-fit.component.html',\n styleUrls: ['./layout-best-fit.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LayoutBestFitComponent implements OnInit, OnDestroy {\n\n openviduLayout: OpenViduLayout;\n sessionId: string;\n secret: string;\n\n session: Session;\n streams: Stream[] = [];\n\n layout: any;\n resizeTimeout;\n\n constructor(private route: ActivatedRoute, private appRef: ApplicationRef) {\n this.route.params.subscribe(params => {\n this.sessionId = params.sessionId;\n this.secret = params.secret;\n });\n }\n\n @HostListener('window:beforeunload')\n beforeunloadHandler() {\n this.leaveSession();\n }\n\n @HostListener('window:resize', ['$event'])\n sizeChange(event) {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.openviduLayout.updateLayout();\n }, 20);\n }\n\n ngOnDestroy() {\n this.leaveSession();\n }\n\n ngOnInit() {\n const OV = new OpenVidu();\n this.session = OV.initSession();\n\n this.session.on('streamCreated', (event: StreamEvent) => {\n const subscriber: Subscriber = this.session.subscribe(event.stream, '');\n this.addRemoteStream(event.stream);\n });\n\n this.session.on('streamDestroyed', (event: StreamEvent) => {\n event.preventDefault();\n this.deleteRemoteStream(event.stream);\n this.openviduLayout.updateLayout();\n });\n\n const token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';\n this.session.connect(token)\n .catch(error => {\n console.error(error);\n })\n\n this.openviduLayout = new OpenViduLayout();\n this.openviduLayout.initLayoutContainer(document.getElementById('layout'), {\n maxRatio: 3 / 2, // The narrowest ratio that will be used (default 2x3)\n minRatio: 9 / 16, // The widest ratio that will be used (default 16x9)\n fixedRatio: false, /* If this is true then the aspect ratio of the video is maintained\n and minRatio and maxRatio are ignored (default false) */\n bigClass: 'OV_big', // The class to add to elements that should be sized bigger\n bigPercentage: 0.8, // The maximum percentage of space the big ones should take up\n bigFixedRatio: false, // fixedRatio for the big ones\n bigMaxRatio: 3 / 2, // The narrowest ratio to use for the big elements (default 2x3)\n bigMinRatio: 9 / 16, // The widest ratio to use for the big elements (default 16x9)\n bigFirst: true, // Whether to place the big one in the top left (true) or bottom right\n animate: true // Whether you want to animate the transitions\n });\n }\n\n private addRemoteStream(stream: Stream): void {\n this.streams.push(stream);\n this.appRef.tick();\n }\n\n private deleteRemoteStream(stream: Stream): void {\n let index = -1;\n for (let i = 0; i < this.streams.length; i++) {\n if (this.streams[i].streamId === stream.streamId) {\n index = i;\n break;\n }\n }\n\n if (index > -1) {\n this.streams.splice(index, 1);\n }\n this.appRef.tick();\n }\n\n leaveSession() {\n if (this.session) { this.session.disconnect(); };\n this.streams = [];\n this.session = null;\n }\n\n onVideoPlaying(event) {\n const video: HTMLVideoElement = event.target;\n video.parentElement.parentElement.classList.remove('custom-class');\n this.openviduLayout.updateLayout();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts","declare var $: any;\n\nexport interface OpenViduLayoutOptions {\n maxRatio: number;\n minRatio: number;\n fixedRatio: boolean;\n animate: any;\n bigClass: string;\n bigPercentage: any;\n bigFixedRatio: any;\n bigMaxRatio: any;\n bigMinRatio: any;\n bigFirst: any;\n}\n\nexport class OpenViduLayout {\n\n private layoutContainer: HTMLElement;\n private opts: OpenViduLayoutOptions;\n\n private fixAspectRatio(elem: HTMLVideoElement, width: number) {\n const sub: HTMLVideoElement = elem.querySelector('.OT_root');\n if (sub) {\n // If this is the parent of a subscriber or publisher then we need\n // to force the mutation observer on the publisher or subscriber to\n // trigger to get it to fix it's layout\n const oldWidth = sub.style.width;\n sub.style.width = width + 'px';\n // sub.style.height = height + 'px';\n sub.style.width = oldWidth || '';\n }\n }\n\n private positionElement(elem: HTMLVideoElement, x: number, y: number, width: number, height: number, animate: any) {\n const targetPosition = {\n left: x + 'px',\n top: y + 'px',\n width: width + 'px',\n height: height + 'px'\n };\n\n this.fixAspectRatio(elem, width);\n\n if (animate && $) {\n $(elem).stop();\n $(elem).animate(targetPosition, animate.duration || 200, animate.easing || 'swing',\n () => {\n this.fixAspectRatio(elem, width);\n if (animate.complete) { animate.complete.call(this); }\n });\n } else {\n $(elem).css(targetPosition);\n }\n this.fixAspectRatio(elem, width);\n }\n\n private getVideoRatio(elem: HTMLVideoElement) {\n if (!elem) {\n return 3 / 4;\n }\n const video: HTMLVideoElement = elem.querySelector('video');\n if (video && video.videoHeight && video.videoWidth) {\n return video.videoHeight / video.videoWidth;\n } else if (elem.videoHeight && elem.videoWidth) {\n return elem.videoHeight / elem.videoWidth;\n }\n return 3 / 4;\n }\n\n private getCSSNumber(elem: HTMLElement, prop: string) {\n const cssStr = $(elem).css(prop);\n return cssStr ? parseInt(cssStr, 10) : 0;\n }\n\n // Really cheap UUID function\n private cheapUUID() {\n return (Math.random() * 100000000).toFixed(0);\n }\n\n private getHeight(elem: HTMLElement) {\n const heightStr = $(elem).css('height');\n return heightStr ? parseInt(heightStr, 10) : 0;\n }\n\n private getWidth(elem: HTMLElement) {\n const widthStr = $(elem).css('width');\n return widthStr ? parseInt(widthStr, 10) : 0;\n }\n\n private getBestDimensions(minR: number, maxR: number, count: number, WIDTH: number, HEIGHT: number, targetHeight: number) {\n let maxArea,\n targetCols,\n targetRows,\n targetWidth,\n tWidth,\n tHeight,\n tRatio;\n\n // Iterate through every possible combination of rows and columns\n // and see which one has the least amount of whitespace\n for (let i = 1; i <= count; i++) {\n const colsAux = i;\n const rowsAux = Math.ceil(count / colsAux);\n\n // Try taking up the whole height and width\n tHeight = Math.floor(HEIGHT / rowsAux);\n tWidth = Math.floor(WIDTH / colsAux);\n\n tRatio = tHeight / tWidth;\n if (tRatio > maxR) {\n // We went over decrease the height\n tRatio = maxR;\n tHeight = tWidth * tRatio;\n } else if (tRatio < minR) {\n // We went under decrease the width\n tRatio = minR;\n tWidth = tHeight / tRatio;\n }\n\n const area = (tWidth * tHeight) * count;\n\n // If this width and height takes up the most space then we're going with that\n if (maxArea === undefined || (area > maxArea)) {\n maxArea = area;\n targetHeight = tHeight;\n targetWidth = tWidth;\n targetCols = colsAux;\n targetRows = rowsAux;\n }\n }\n return {\n maxArea: maxArea,\n targetCols: targetCols,\n targetRows: targetRows,\n targetHeight: targetHeight,\n targetWidth: targetWidth,\n ratio: targetHeight / targetWidth\n };\n };\n\n private arrange(children: HTMLVideoElement[], WIDTH: number, HEIGHT: number, offsetLeft: number, offsetTop: number, fixedRatio: boolean,\n minRatio: number, maxRatio: number, animate: any) {\n\n let targetHeight;\n\n const count = children.length;\n let dimensions;\n\n if (!fixedRatio) {\n dimensions = this.getBestDimensions(minRatio, maxRatio, count, WIDTH, HEIGHT, targetHeight);\n } else {\n // Use the ratio of the first video element we find to approximate\n const ratio = this.getVideoRatio(children.length > 0 ? children[0] : null);\n dimensions = this.getBestDimensions(ratio, ratio, count, WIDTH, HEIGHT, targetHeight);\n }\n\n // Loop through each stream in the container and place it inside\n let x = 0,\n y = 0;\n const rows = [];\n let row;\n // Iterate through the children and create an array with a new item for each row\n // and calculate the width of each row so that we know if we go over the size and need\n // to adjust\n for (let i = 0; i < children.length; i++) {\n if (i % dimensions.targetCols === 0) {\n // This is a new row\n row = {\n children: [],\n width: 0,\n height: 0\n };\n rows.push(row);\n }\n const elem: HTMLVideoElement = children[i];\n row.children.push(elem);\n let targetWidth = dimensions.targetWidth;\n targetHeight = dimensions.targetHeight;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = targetHeight / this.getVideoRatio(elem);\n }\n row.width += targetWidth;\n row.height = targetHeight;\n }\n // Calculate total row height adjusting if we go too wide\n let totalRowHeight = 0;\n let remainingShortRows = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width > WIDTH) {\n // Went over on the width, need to adjust the height proportionally\n row.height = Math.floor(row.height * (WIDTH / row.width));\n row.width = WIDTH;\n } else if (row.width < WIDTH) {\n remainingShortRows += 1;\n }\n totalRowHeight += row.height;\n }\n if (totalRowHeight < HEIGHT && remainingShortRows > 0) {\n // We can grow some of the rows, we're not taking up the whole height\n let remainingHeightDiff = HEIGHT - totalRowHeight;\n totalRowHeight = 0;\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n if (row.width < WIDTH) {\n // Evenly distribute the extra height between the short rows\n let extraHeight = remainingHeightDiff / remainingShortRows;\n if ((extraHeight / row.height) > ((WIDTH - row.width) / row.width)) {\n // We can't go that big or we'll go too wide\n extraHeight = Math.floor(((WIDTH - row.width) / row.width) * row.height);\n }\n row.width += Math.floor((extraHeight / row.height) * row.width);\n row.height += extraHeight;\n remainingHeightDiff -= extraHeight;\n remainingShortRows -= 1;\n }\n totalRowHeight += row.height;\n }\n }\n // vertical centering\n y = ((HEIGHT - (totalRowHeight)) / 2);\n // Iterate through each row and place each child\n for (let i = 0; i < rows.length; i++) {\n row = rows[i];\n // center the row\n const rowMarginLeft = ((WIDTH - row.width) / 2);\n x = rowMarginLeft;\n for (let j = 0; j < row.children.length; j++) {\n const elem: HTMLVideoElement = row.children[j];\n\n let targetWidth = dimensions.targetWidth;\n targetHeight = row.height;\n // If we're using a fixedRatio then we need to set the correct ratio for this element\n if (fixedRatio) {\n targetWidth = Math.floor(targetHeight / this.getVideoRatio(elem));\n }\n elem.style.position = 'absolute';\n // $(elem).css('position', 'absolute');\n const actualWidth = targetWidth - this.getCSSNumber(elem, 'paddingLeft') -\n this.getCSSNumber(elem, 'paddingRight') -\n this.getCSSNumber(elem, 'marginLeft') -\n this.getCSSNumber(elem, 'marginRight') -\n this.getCSSNumber(elem, 'borderLeft') -\n this.getCSSNumber(elem, 'borderRight');\n\n const actualHeight = targetHeight - this.getCSSNumber(elem, 'paddingTop') -\n this.getCSSNumber(elem, 'paddingBottom') -\n this.getCSSNumber(elem, 'marginTop') -\n this.getCSSNumber(elem, 'marginBottom') -\n this.getCSSNumber(elem, 'borderTop') -\n this.getCSSNumber(elem, 'borderBottom');\n\n this.positionElement(elem, x + offsetLeft, y + offsetTop, actualWidth, actualHeight, animate);\n x += targetWidth;\n }\n y += targetHeight;\n }\n }\n\n private filterDisplayNone(element: HTMLElement) {\n return element.style.display !== 'none';\n }\n\n updateLayout() {\n if (this.layoutContainer.style.display === 'none') {\n return;\n }\n let id = this.layoutContainer.id;\n if (!id) {\n id = 'OT_' + this.cheapUUID();\n this.layoutContainer.id = id;\n }\n\n const HEIGHT = this.getHeight(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderTop') -\n this.getCSSNumber(this.layoutContainer, 'borderBottom');\n const WIDTH = this.getWidth(this.layoutContainer) -\n this.getCSSNumber(this.layoutContainer, 'borderLeft') -\n this.getCSSNumber(this.layoutContainer, 'borderRight');\n\n const availableRatio = HEIGHT / WIDTH;\n\n let offsetLeft = 0;\n let offsetTop = 0;\n let bigOffsetTop = 0;\n let bigOffsetLeft = 0;\n\n const bigOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>.' + this.opts.bigClass),\n this.filterDisplayNone);\n const smallOnes = Array.prototype.filter.call(\n this.layoutContainer.querySelectorAll('#' + id + '>*:not(.' + this.opts.bigClass + ')'),\n this.filterDisplayNone);\n\n if (bigOnes.length > 0 && smallOnes.length > 0) {\n let bigWidth, bigHeight;\n\n if (availableRatio > this.getVideoRatio(bigOnes[0])) {\n // We are tall, going to take up the whole width and arrange small\n // guys at the bottom\n bigWidth = WIDTH;\n bigHeight = Math.floor(HEIGHT * this.opts.bigPercentage);\n offsetTop = bigHeight;\n bigOffsetTop = HEIGHT - offsetTop;\n } else {\n // We are wide, going to take up the whole height and arrange the small\n // guys on the right\n bigHeight = HEIGHT;\n bigWidth = Math.floor(WIDTH * this.opts.bigPercentage);\n offsetLeft = bigWidth;\n bigOffsetLeft = WIDTH - offsetLeft;\n }\n if (this.opts.bigFirst) {\n this.arrange(bigOnes, bigWidth, bigHeight, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, 0, 0, this.opts.fixedRatio,\n this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n this.arrange(bigOnes, bigWidth, bigHeight, bigOffsetLeft, bigOffsetTop,\n this.opts.bigFixedRatio, this.opts.bigMinRatio, this.opts.bigMaxRatio, this.opts.animate);\n }\n } else if (bigOnes.length > 0 && smallOnes.length === 0) {\n this.\n // We only have one bigOne just center it\n arrange(bigOnes, WIDTH, HEIGHT, 0, 0, this.opts.bigFixedRatio, this.opts.bigMinRatio,\n this.opts.bigMaxRatio, this.opts.animate);\n } else {\n this.arrange(smallOnes, WIDTH - offsetLeft, HEIGHT - offsetTop, offsetLeft, offsetTop,\n this.opts.fixedRatio, this.opts.minRatio, this.opts.maxRatio, this.opts.animate);\n }\n }\n\n initLayoutContainer(container, opts) {\n this.opts = {\n maxRatio: (opts.maxRatio != null) ? opts.maxRatio : 3 / 2,\n minRatio: (opts.minRatio != null) ? opts.minRatio : 9 / 16,\n fixedRatio: (opts.fixedRatio != null) ? opts.fixedRatio : false,\n animate: (opts.animate != null) ? opts.animate : false,\n bigClass: (opts.bigClass != null) ? opts.bigClass : 'OT_big',\n bigPercentage: (opts.bigPercentage != null) ? opts.bigPercentage : 0.8,\n bigFixedRatio: (opts.bigFixedRatio != null) ? opts.bigFixedRatio : false,\n bigMaxRatio: (opts.bigMaxRatio != null) ? opts.bigMaxRatio : 3 / 2,\n bigMinRatio: (opts.bigMinRatio != null) ? opts.bigMinRatio : 9 / 16,\n bigFirst: (opts.bigFirst != null) ? opts.bigFirst : true\n };\n this.layoutContainer = typeof (container) === 'string' ? $(container) : container;\n }\n\n setLayoutOptions(options: OpenViduLayoutOptions) {\n this.opts = options;\n }\n\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/layouts/openvidu-layout.ts","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.css\n// module id = ./src/app/components/session-details/session-details.component.css\n// module chunks = main","module.exports = \"

\\n session-details works!\\n

\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/components/session-details/session-details.component.html\n// module id = ./src/app/components/session-details/session-details.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-session-details',\n templateUrl: './session-details.component.html',\n styleUrls: ['./session-details.component.css']\n})\nexport class SessionDetailsComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/components/session-details/session-details.component.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class InfoService {\n\n info: string;\n newInfo$: Subject;\n\n constructor() {\n this.newInfo$ = new Subject();\n }\n\n getInfo() {\n return this.info;\n }\n\n updateInfo(info: string) {\n this.info = info;\n this.newInfo$.next(info);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/info.service.ts","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\n\n@Injectable()\nexport class RestService {\n\n private openviduPublicUrl: string;\n\n getOpenViduPublicUrl(): Promise {\n return new Promise((resolve, reject) => {\n if (!!this.openviduPublicUrl) {\n resolve(this.openviduPublicUrl);\n } else {\n const url = location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') +\n '/config/openvidu-publicurl';\n const http = new XMLHttpRequest();\n\n http.onreadystatechange = () => {\n if (http.readyState === 4) {\n if (http.status === 200) {\n this.openviduPublicUrl = http.responseText;\n resolve(http.responseText);\n } else {\n reject('Error getting OpenVidu publicurl');\n }\n };\n }\n http.open('GET', url, true);\n http.send();\n }\n });\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/services/rest.service.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.ts"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/openvidu-testapp/package.json b/openvidu-testapp/package.json index afc781f4ae..7988cfe71b 100644 --- a/openvidu-testapp/package.json +++ b/openvidu-testapp/package.json @@ -15,7 +15,7 @@ "colormap": "^2.2.0", "core-js": "^2.4.1", "hammerjs": "^2.0.8", - "openvidu-browser": "1.9.0-beta-1", + "openvidu-browser": "2.0.0", "openvidu-node-client": "1.8.0", "rxjs": "^5.4.2", "zone.js": "^0.8.14" @@ -52,5 +52,5 @@ "start": "ng serve", "test": "ng test" }, - "version": "1.9.0-beta-1" + "version": "2.0.0" } \ No newline at end of file