diff --git a/openvidu-browser/docs/classes/openvidu.html b/openvidu-browser/docs/classes/openvidu.html index b7680486..f4d622ec 100644 --- a/openvidu-browser/docs/classes/openvidu.html +++ b/openvidu-browser/docs/classes/openvidu.html @@ -142,7 +142,7 @@
  • @@ -165,7 +165,7 @@
  • @@ -187,7 +187,7 @@
  • @@ -209,7 +209,7 @@
  • @@ -278,7 +278,7 @@ OV.getUserMedia({
  • @@ -312,7 +312,7 @@ OV.getUserMedia({
  • @@ -343,7 +343,7 @@ OV.getUserMedia({
  • @@ -377,7 +377,7 @@ OV.getUserMedia({
  • @@ -435,7 +435,7 @@ OV.getUserMedia({
  • @@ -506,7 +506,7 @@ OV.getUserMedia({
  • @@ -528,7 +528,7 @@ OV.getUserMedia({
  • Parameters

    @@ -548,13 +548,14 @@ OV.getUserMedia({

    initSession

    Returns Promise<Session>

    -

    A Promise that is resolved to the Session if success and rejected with an Error object if not

    +

    A Promise that is resolved to the Session if success and rejected with an Error object if not. + This Error object has as message property with the following values:

    +
  • @@ -181,7 +185,7 @@
  • @@ -216,7 +220,7 @@
  • @@ -251,7 +255,7 @@
  • @@ -276,7 +280,7 @@
  • @@ -306,7 +310,7 @@
  • @@ -344,7 +348,7 @@
  • @@ -386,7 +390,7 @@
  • diff --git a/openvidu-node-client/docs/interfaces/sessionproperties.html b/openvidu-node-client/docs/interfaces/sessionproperties.html index 9c52215f..7e9d36c9 100644 --- a/openvidu-node-client/docs/interfaces/sessionproperties.html +++ b/openvidu-node-client/docs/interfaces/sessionproperties.html @@ -82,6 +82,7 @@

    Properties

    Properties

    +
    + +

    Optional customSessionId

    +
    customSessionId: string
    + +
    +
    +

    Fix the sessionId that will be assigned to the session with this parameter. You can take advantage of this property + to facilitate the mapping between OpenVidu Server 'session' entities and your own 'session' entities. + If this parameter is undefined or an empty string, OpenVidu Server will generate a random sessionId for you.

    +
    +
    +

    Optional defaultCustomLayout

    @@ -197,6 +215,9 @@
  • SessionProperties
      +
    • + customSessionId +
    • defaultCustomLayout
    • diff --git a/openvidu-node-client/lib/OpenVidu.d.ts b/openvidu-node-client/lib/OpenVidu.d.ts index bae4c555..fa13231b 100644 --- a/openvidu-node-client/lib/OpenVidu.d.ts +++ b/openvidu-node-client/lib/OpenVidu.d.ts @@ -18,7 +18,9 @@ export declare class OpenVidu { /** * Creates an OpenVidu session. You can call [[Session.getSessionId]] in the resolved promise to retrieve the `sessionId` * - * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not + * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not. + * This Error object has as `message` property with the following values: + * - `409`: you are trying to assign an already-in-use custom sessionId to the session. See [[SessionProperties.customSessionId]] */ createSession(properties?: SessionProperties): Promise; startRecording(sessionId: string): Promise; diff --git a/openvidu-node-client/lib/OpenVidu.js b/openvidu-node-client/lib/OpenVidu.js index aecd706d..ef361ce6 100644 --- a/openvidu-node-client/lib/OpenVidu.js +++ b/openvidu-node-client/lib/OpenVidu.js @@ -35,7 +35,9 @@ var OpenVidu = /** @class */ (function () { /** * Creates an OpenVidu session. You can call [[Session.getSessionId]] in the resolved promise to retrieve the `sessionId` * - * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not + * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not. + * This Error object has as `message` property with the following values: + * - `409`: you are trying to assign an already-in-use custom sessionId to the session. See [[SessionProperties.customSessionId]] */ OpenVidu.prototype.createSession = function (properties) { var _this = this; @@ -317,11 +319,11 @@ var OpenVidu = /** @class */ (function () { }; OpenVidu.prototype.setHostnameAndPort = function () { var urlSplitted = this.urlOpenViduServer.split(':'); - if (urlSplitted.length === 3) { + if (urlSplitted.length === 3) { // URL has format: http:// + hostname + :port this.hostname = this.urlOpenViduServer.split(':')[1].replace(/\//g, ''); this.port = parseInt(this.urlOpenViduServer.split(':')[2].replace(/\//g, '')); } - else if (urlSplitted.length === 2) { + else if (urlSplitted.length === 2) { // URL has format: hostname + :port this.hostname = this.urlOpenViduServer.split(':')[0].replace(/\//g, ''); this.port = parseInt(this.urlOpenViduServer.split(':')[1].replace(/\//g, '')); } diff --git a/openvidu-node-client/lib/OpenVidu.js.map b/openvidu-node-client/lib/OpenVidu.js.map index 727d3f1c..5245ab09 100644 --- a/openvidu-node-client/lib/OpenVidu.js.map +++ b/openvidu-node-client/lib/OpenVidu.js.map @@ -1 +1 @@ -{"version":3,"file":"OpenVidu.js","sourceRoot":"","sources":["../src/OpenVidu.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,qCAAoC;AAEpC,yCAAwC;AAIxC;;GAEG;AACH,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B;IAUE;;;OAGG;IACH,kBAAoB,iBAAyB,EAAE,MAAc;QAAzC,sBAAiB,GAAjB,iBAAiB,CAAQ;QAC3C,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,gCAAa,GAApB,UAAqB,UAA8B;QAAnD,iBAWC;QAVC,MAAM,CAAC,IAAI,OAAO,CAAU,UAAC,OAAO,EAAE,MAAM;YAC1C,IAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,KAAI,CAAC,QAAQ,EAAE,KAAI,CAAC,IAAI,EAAE,KAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAClF,OAAO,CAAC,gBAAgB,EAAE;iBACvB,IAAI,CAAC,UAAA,SAAS;gBACb,OAAO,CAAC,OAAO,CAAC,CAAC;YACnB,CAAC,CAAC;iBACD,KAAK,CAAC,UAAA,KAAK;gBACV,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;IAMD;;;;;;;;;;OAUG;IACI,iCAAc,GAArB,UAAsB,SAAiB,EAAE,MAAqC;QAA9E,iBAmEC;QAlEC,MAAM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CAAC;IA5UuB,uBAAc,GAAW,iBAAiB,CAAC;IAC3C,6BAAoB,GAAW,QAAQ,CAAC;IACxC,4BAAmB,GAAW,OAAO,CAAC;IA4UhE,eAAC;CAAA,AAhVD,IAgVC;AAhVY,4BAAQ"} \ No newline at end of file diff --git a/openvidu-node-client/lib/Session.js b/openvidu-node-client/lib/Session.js index c717df18..10df7a62 100644 --- a/openvidu-node-client/lib/Session.js +++ b/openvidu-node-client/lib/Session.js @@ -104,7 +104,8 @@ var Session = /** @class */ (function () { mediaMode: !!_this.properties.mediaMode ? _this.properties.mediaMode : MediaMode_1.MediaMode.ROUTED, recordingMode: !!_this.properties.recordingMode ? _this.properties.recordingMode : RecordingMode_1.RecordingMode.MANUAL, defaultRecordingLayout: !!_this.properties.defaultRecordingLayout ? _this.properties.defaultRecordingLayout : RecordingLayout_1.RecordingLayout.BEST_FIT, - defaultCustomLayout: !!_this.properties.defaultCustomLayout ? _this.properties.defaultCustomLayout : '' + defaultCustomLayout: !!_this.properties.defaultCustomLayout ? _this.properties.defaultCustomLayout : '', + customSessionId: !!_this.properties.customSessionId ? _this.properties.customSessionId : '' }); var options = { hostname: _this.hostname, diff --git a/openvidu-node-client/lib/Session.js.map b/openvidu-node-client/lib/Session.js.map index b511361a..fcdabd4f 100644 --- a/openvidu-node-client/lib/Session.js.map +++ b/openvidu-node-client/lib/Session.js.map @@ -1 +1 @@ -{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,yCAAwC;AACxC,+CAA8C;AAC9C,qDAAoD;AACpD,iDAAgD;AAIhD;;GAEG;AACH,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B;IAQI,iBAAoB,QAAgB,EAAU,IAAY,EAAU,SAAiB,EAAE,UAA8B;QAAjG,aAAQ,GAAR,QAAQ,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAQ;QAAU,cAAS,GAAT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AG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YACvB,GAAG,CAAC,GAAG,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC;IAhIuB,oBAAY,GAAG,eAAe,CAAC;IAC/B,kBAAU,GAAG,aAAa,CAAC;IAiIvD,cAAC;CAAA,AApID,IAoIC;AApIY,0BAAO"} \ No newline at end of file diff --git a/openvidu-node-client/package.json b/openvidu-node-client/package.json index 0e0356a5..713aedb3 100644 --- a/openvidu-node-client/package.json +++ b/openvidu-node-client/package.json @@ -21,7 +21,7 @@ "tslint": "5.9.1", "typedoc": "^0.11.1", "typedoc-plugin-sourcefile-url": "^1.0.3", - "typescript": "2.7.2", + "typescript": "2.8.3", "grunt": "^1.0.1", "grunt-autoprefixer": "^3.0.4", "grunt-cli": "^1.2.0", diff --git a/openvidu-server/src/angular/BuildFront.sh b/openvidu-server/src/angular/BuildFront.sh new file mode 100755 index 00000000..c53b7eaa --- /dev/null +++ b/openvidu-server/src/angular/BuildFront.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cd frontend +ng build --output-path ../../main/resources/static diff --git a/openvidu-server/src/angular/frontend/src/app/components/dashboard/credentials-dialog.component.ts b/openvidu-server/src/angular/frontend/src/app/components/dashboard/credentials-dialog.component.ts index 30c9982e..faa5306a 100644 --- a/openvidu-server/src/angular/frontend/src/app/components/dashboard/credentials-dialog.component.ts +++ b/openvidu-server/src/angular/frontend/src/app/components/dashboard/credentials-dialog.component.ts @@ -11,7 +11,7 @@ import { MatDialogRef } from '@angular/material';
      - + diff --git a/openvidu-server/src/angular/frontend/src/app/components/dashboard/dashboard.component.ts b/openvidu-server/src/angular/frontend/src/app/components/dashboard/dashboard.component.ts index 5fbbf0d6..0697dbff 100644 --- a/openvidu-server/src/angular/frontend/src/app/components/dashboard/dashboard.component.ts +++ b/openvidu-server/src/angular/frontend/src/app/components/dashboard/dashboard.component.ts @@ -111,83 +111,85 @@ export class DashboardComponent implements OnInit, OnDestroy { this.restService.getOpenViduPublicUrl() .then((url => { this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://'); - this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret); + this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); })) .catch(error => { console.error(error); }); } else { - this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret); + this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); } } }); } - connectToSession(mySessionId: string) { + connectToSession(token: string) { this.msgChain = []; const OV = new OpenVidu(); - this.session = OV.initSession(mySessionId); + this.session = OV.initSession(); this.testStatus = 'CONNECTING'; this.testButton = 'Testing...'; - this.session.connect(null).then(() => { + this.session.connect(token) + .then(() => { - this.testStatus = 'CONNECTED'; + this.testStatus = 'CONNECTED'; - const publisherRemote = OV.initPublisher('mirrored-video', { - publishAudio: true, - publishVideo: true, - resolution: '640x480' - }, - e => { - if (!!e) { - console.error(e); + const publisherRemote = OV.initPublisher('mirrored-video', { + publishAudio: true, + publishVideo: true, + resolution: '640x480' + }, + e => { + if (!!e) { + console.error(e); + } } - } - ); + ); - publisherRemote.on('accessAllowed', () => { - this.msgChain.push('Camera access allowed'); - }); - - publisherRemote.on('accessDenied', () => { - this.endTestVideo(); - this.msgChain.push('Camera access denied'); - }); - - publisherRemote.on('videoElementCreated', (video) => { - this.showSpinner = true; - this.msgChain.push('Video element created'); - }); - - publisherRemote.on('remoteVideoPlaying', (video) => { - this.msgChain.push('Remote video playing'); - this.testButton = 'End test'; - this.testStatus = 'PLAYING'; - this.showSpinner = false; - }); - - publisherRemote.subscribeToRemote(); - this.session.publish(publisherRemote); - - }).catch(error => { - if (error.code === 401) { // User unauthorized error. OpenVidu security is active - this.endTestVideo(); - let dialogRef: MatDialogRef; - dialogRef = this.dialog.open(CredentialsDialogComponent); - dialogRef.componentInstance.myReference = dialogRef; - - dialogRef.afterClosed().subscribe(secret => { - if (secret) { - this.connectToSession('wss://' + location.hostname + ':4443/testSession?secret=' + secret); - } + publisherRemote.on('accessAllowed', () => { + this.msgChain.push('Camera access allowed'); }); - } else { - console.error(error); - } - }); + + publisherRemote.on('accessDenied', () => { + this.endTestVideo(); + this.msgChain.push('Camera access denied'); + }); + + publisherRemote.on('videoElementCreated', (video) => { + this.showSpinner = true; + this.msgChain.push('Video element created'); + }); + + publisherRemote.on('remoteVideoPlaying', (video) => { + this.msgChain.push('Remote video playing'); + this.testButton = 'End test'; + this.testStatus = 'PLAYING'; + this.showSpinner = false; + }); + + publisherRemote.subscribeToRemote(); + this.session.publish(publisherRemote); + + }) + .catch(error => { + if (error.code === 401) { // User unauthorized error. OpenVidu security is active + this.endTestVideo(); + let dialogRef: MatDialogRef; + dialogRef = this.dialog.open(CredentialsDialogComponent); + dialogRef.componentInstance.myReference = dialogRef; + + dialogRef.afterClosed().subscribe(secret => { + if (secret) { + this.connectToSession(this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); + } + }); + } else { + console.error(error); + } + }); } endTestVideo() { diff --git a/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts b/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts index 252cc69d..273d8e52 100644 --- a/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts +++ b/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts @@ -48,9 +48,7 @@ export class LayoutBestFitComponent implements OnInit, OnDestroy { ngOnInit() { const OV = new OpenVidu(); - const fullSessionId = 'wss://' + location.hostname + ':4443/' + this.sessionId + '?secret=' + this.secret + '&recorder=true'; - - this.session = OV.initSession(fullSessionId); + this.session = OV.initSession(); this.session.on('streamCreated', (event: StreamEvent) => { const subscriber: Subscriber = this.session.subscribe(event.stream, ''); @@ -63,7 +61,8 @@ export class LayoutBestFitComponent implements OnInit, OnDestroy { this.openviduLayout.updateLayout(); }); - this.session.connect(null) + const token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true'; + this.session.connect(token) .catch(error => { console.error(error); }) 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 3699e46d..e65609e4 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 61249b85238bdf352ff8"],"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 61249b85238bdf352ff8"],"sourceRoot":"webpack:///"} \ No newline at end of file +{"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 diff --git a/openvidu-server/src/main/resources/static/main.bundle.js b/openvidu-server/src/main/resources/static/main.bundle.js index 1c7d64da..fb4e9e6f 100644 --- a/openvidu-server/src/main/resources/static/main.bundle.js +++ b/openvidu-server/src/main/resources/static/main.bundle.js @@ -490,21 +490,19 @@ var RpcBuilder = __webpack_require__("../../../../openvidu-browser/lib/OpenViduI 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"); var platform = __webpack_require__("../../../../openvidu-browser/node_modules/platform/platform.js"); -/** - * @hidden - */ -var SECRET_PARAM = '?secret='; -/** - * @hidden - */ -var RECORDER_PARAM = '&recorder='; /** * Entrypoint of OpenVidu Browser library. * Use it to initialize objects of type [[Session]], [[Publisher]] and [[LocalRecorder]] */ var OpenVidu = /** @class */ (function () { function OpenVidu() { + /** + * @hidden + */ this.secret = ''; + /** + * @hidden + */ this.recorder = false; /** * @hidden @@ -517,7 +515,10 @@ var OpenVidu = /** @class */ (function () { * @param sessionId Session unique ID generated in openvidu-server */ OpenVidu.prototype.initSession = function (sessionId) { - this.session = new __1.Session(sessionId, this); + 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); return this.session; }; /** @@ -748,18 +749,6 @@ var OpenVidu = /** @class */ (function () { this.advancedConfiguration = configuration; }; /* Hidden methods */ - /** - * @hidden - */ - 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; - }; /** * @hidden */ @@ -925,20 +914,6 @@ var OpenVidu = /** @class */ (function () { OpenVidu.prototype.closeWs = function () { this.jsonRpcClient.close(); }; - /** - * @hidden - */ - 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); - }; /** * @hidden */ @@ -1012,39 +987,6 @@ var OpenVidu = /** @class */ (function () { 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) { - // OpenVidu server URL referes to a ngrok IP: secure wss protocol and delete port of URL - 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)) { - // OpenVidu server URL referes to localhost IP - } - return url; - }; return OpenVidu; }()); exports.OpenVidu = OpenVidu; @@ -1349,7 +1291,7 @@ var Publisher = /** @class */ (function () { // Ask independently for audio stream and video stream. If the user asks for both of them and one is blocked, the method still // success only with the allowed input. This is not the desierd behaviour: if any of them is blocked, access should be denied var constraintsAux = {}; - var timeForDialogEvent = 1000; + var timeForDialogEvent = 1250; if (_this.stream.isSendVideo()) { constraintsAux.audio = false; constraintsAux.video = constraints.video; @@ -1578,7 +1520,7 @@ var Session = /** @class */ (function () { /** * @hidden */ - function Session(sessionId, openvidu) { + function Session(openvidu) { // This map is only used to avoid race condition between 'joinRoom' response and 'onParticipantPublished' notification /** * @hidden @@ -1594,8 +1536,6 @@ var Session = /** @class */ (function () { this.speakingEventsEnabled = false; this.ee = new EventEmitter(); this.openvidu = openvidu; - this.sessionId = this.openvidu.getUrlWithoutSecret(sessionId); - this.openvidu.processOpenViduUrl(sessionId); } /** * Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when @@ -1629,6 +1569,7 @@ var Session = /** @class */ (function () { // DEPRECATED WARNING return VersionAdapter_1.solveIfCallback('Session.connect', (!!param3 && (typeof param3 === 'function')) ? param3 : ((typeof metadata === 'function') ? metadata : ''), /*return */ new Promise(function (resolve, reject) { + _this.processToken(token); if (_this.openvidu.checkSystemRequirements()) { // Early configuration to deactivate automatic subscription to streams _this.options = { @@ -2147,7 +2088,7 @@ var Session = /** @class */ (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'); } @@ -2198,27 +2139,32 @@ var Session = /** @class */ (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); - } - _this.openvidu.closeWs(); - }); + 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) { + // Make Publisher object dispatch 'streamDestroyed' event (if there's a local stream) + this.connection.stream.disposeWebRtcPeer(); + this.connection.stream.emitEvent('stream-destroyed-by-disconnect', [reason]); + } + if (!this.connection.disposed) { + // Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed) + var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason); + this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]); + sessionDisconnectEvent.callDefaultBehaviour(); + } } else { - this.openvidu.closeWs(); - } - if (!!this.connection.stream) { - // Make Publisher object dispatch 'streamDestroyed' event (if there's a local stream) - this.connection.stream.disposeWebRtcPeer(); - this.connection.stream.emitEvent('stream-destroyed-by-disconnect', [reason]); - } - if (!this.connection.disposed) { - // Make Session object dispatch 'sessionDisconnected' event (if it is not already disposed) - var sessionDisconnectEvent = new SessionDisconnectedEvent_1.SessionDisconnectedEvent(this, reason); - this.ee.emitEvent('sessionDisconnected', [sessionDisconnectEvent]); - sessionDisconnectEvent.callDefaultBehaviour(); + console.warn('You were not connected to the session ' + this.sessionId); } }; /* Private methods */ @@ -2238,36 +2184,41 @@ var Session = /** @class */ (function () { recorder: _this.openvidu.getRecorder() }; _this.openvidu.sendRequest('joinRoom', joinParams, function (error, response) { - // Initialize local Connection object with values returned by openvidu-server - _this.connection = new __1.Connection(_this); - _this.connection.connectionId = response.id; - _this.connection.data = response.metadata; - // Initialize remote Connections with value returned by openvidu-server - 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); - } - }); - // Own 'connectionCreated' event - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]); - // One 'connectionCreated' event for each existing connection in the session - events.connections.forEach(function (connection) { - _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); - }); - // One 'streamCreated' event for each active stream in the session - events.streams.forEach(function (stream) { - _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]); - }); - resolve(); + if (!!error) { + reject(error); + } + else { + // Initialize local Connection object with values returned by openvidu-server + _this.connection = new __1.Connection(_this); + _this.connection.connectionId = response.id; + _this.connection.data = response.metadata; + // Initialize remote Connections with value returned by openvidu-server + var events_1 = { + 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_1.connections.push(connection); + if (!!connection.stream) { + _this.remoteStreamsCreated[connection.stream.streamId] = true; + events_1.streams.push(connection.stream); + } + }); + // Own 'connectionCreated' event + _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', _this.connection, '')]); + // One 'connectionCreated' event for each existing connection in the session + events_1.connections.forEach(function (connection) { + _this.ee.emitEvent('connectionCreated', [new ConnectionEvent_1.ConnectionEvent(false, _this, 'connectionCreated', connection, '')]); + }); + // One 'streamCreated' event for each active stream in the session + events_1.streams.forEach(function (stream) { + _this.ee.emitEvent('streamCreated', [new StreamEvent_1.StreamEvent(false, _this, 'streamCreated', stream, '')]); + }); + resolve(); + } }); } }); @@ -2315,6 +2266,19 @@ var Session = /** @class */ (function () { } }); }; + 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; @@ -11508,7 +11472,7 @@ var CredentialsDialogComponent = (function () { CredentialsDialogComponent = __decorate([ Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ selector: 'app-credentials-dialog', - template: "\n
      \n

      \n Insert your secret\n

      \n \n \n \n \n \n \n \n \n \n \n \n
      \n ", + template: "\n
      \n

      \n Insert your secret\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 "], }), __metadata("design:paramtypes", []) @@ -11640,26 +11604,27 @@ var DashboardComponent = (function () { _this.restService.getOpenViduPublicUrl() .then((function (url) { _this.openviduPublicUrl = url.replace('https://', 'wss://').replace('http://', 'ws://'); - _this.connectToSession(_this.openviduPublicUrl + 'testSession?secret=' + secret); + _this.connectToSession(_this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); })) .catch(function (error) { console.error(error); }); } else { - _this.connectToSession(_this.openviduPublicUrl + 'testSession?secret=' + secret); + _this.connectToSession(_this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); } } }); }; - DashboardComponent.prototype.connectToSession = function (mySessionId) { + DashboardComponent.prototype.connectToSession = function (token) { var _this = this; this.msgChain = []; var OV = new __WEBPACK_IMPORTED_MODULE_4_openvidu_browser__["OpenVidu"](); - this.session = OV.initSession(mySessionId); + this.session = OV.initSession(); this.testStatus = 'CONNECTING'; this.testButton = 'Testing...'; - this.session.connect(null).then(function () { + this.session.connect(token) + .then(function () { _this.testStatus = 'CONNECTED'; var publisherRemote = OV.initPublisher('mirrored-video', { publishAudio: true, @@ -11689,7 +11654,8 @@ var DashboardComponent = (function () { }); publisherRemote.subscribeToRemote(); _this.session.publish(publisherRemote); - }).catch(function (error) { + }) + .catch(function (error) { if (error.code === 401) { _this.endTestVideo(); var dialogRef = void 0; @@ -11697,7 +11663,7 @@ var DashboardComponent = (function () { dialogRef.componentInstance.myReference = dialogRef; dialogRef.afterClosed().subscribe(function (secret) { if (secret) { - _this.connectToSession('wss://' + location.hostname + ':4443/testSession?secret=' + secret); + _this.connectToSession(_this.openviduPublicUrl + '?sessionId=testSession&secret=' + secret); } }); } @@ -11814,8 +11780,7 @@ var LayoutBestFitComponent = (function () { LayoutBestFitComponent.prototype.ngOnInit = function () { var _this = this; var OV = new __WEBPACK_IMPORTED_MODULE_2_openvidu_browser__["OpenVidu"](); - var fullSessionId = 'wss://' + location.hostname + ':4443/' + this.sessionId + '?secret=' + this.secret + '&recorder=true'; - this.session = OV.initSession(fullSessionId); + this.session = OV.initSession(); this.session.on('streamCreated', function (event) { var subscriber = _this.session.subscribe(event.stream, ''); _this.addRemoteStream(event.stream); @@ -11825,7 +11790,8 @@ var LayoutBestFitComponent = (function () { _this.deleteRemoteStream(event.stream); _this.openviduLayout.updateLayout(); }); - this.session.connect(null) + var token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true'; + this.session.connect(token) .catch(function (error) { console.error(error); }); 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 7abe3b28..892f8ec6 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,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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;ACxkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,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,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,yBAAyB;AACzB;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,CAAC;AACD;AACA,mC;;;;;;;;AC1wBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;A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;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,8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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,CAAC;YACT,QAAQ,EAAE,UAAU;;;SAGrB,CAAC;OACW,YAAY,CAExB;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;;;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 * @hidden\n */\nvar SECRET_PARAM = '?secret=';\n/**\n * @hidden\n */\nvar RECORDER_PARAM = '&recorder=';\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 this.secret = '';\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 this.session = new __1.Session(sessionId, 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.getUrlWithoutSecret = function (url) {\n if (!url) {\n console.error('sessionId is not defined');\n }\n if (url.indexOf(SECRET_PARAM) !== -1) {\n url = url.substring(0, url.lastIndexOf(SECRET_PARAM));\n }\n return url;\n };\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.processOpenViduUrl = function (url) {\n var secret = this.getSecretFromUrl(url);\n var recorder = this.getRecorderFromUrl(url);\n if (!!secret) {\n this.secret = secret;\n }\n if (!!recorder) {\n this.recorder = recorder;\n }\n this.wsUri = this.getFinalWsUrl(url);\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 OpenVidu.prototype.getSecretFromUrl = function (url) {\n var secret = '';\n if (url.indexOf(SECRET_PARAM) !== -1) {\n var endOfSecret = url.lastIndexOf(RECORDER_PARAM);\n if (endOfSecret !== -1) {\n secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, endOfSecret);\n }\n else {\n secret = url.substring(url.lastIndexOf(SECRET_PARAM) + SECRET_PARAM.length, url.length);\n }\n }\n return secret;\n };\n OpenVidu.prototype.getRecorderFromUrl = function (url) {\n var recorder = '';\n if (url.indexOf(RECORDER_PARAM) !== -1) {\n recorder = url.substring(url.lastIndexOf(RECORDER_PARAM) + RECORDER_PARAM.length, url.length);\n }\n return Boolean(recorder).valueOf();\n };\n OpenVidu.prototype.getFinalWsUrl = function (url) {\n url = this.getUrlWithoutSecret(url).substring(0, url.lastIndexOf('/')) + '/room';\n if (url.indexOf('.ngrok.io') !== -1) {\n // OpenVidu server URL referes to a ngrok IP: secure wss protocol and delete port of URL\n url = url.replace('ws://', 'wss://');\n var regex = /\\.ngrok\\.io:\\d+/;\n url = url.replace(regex, '.ngrok.io');\n }\n else if ((url.indexOf('localhost') !== -1) || (url.indexOf('127.0.0.1') !== -1)) {\n // OpenVidu server URL referes to localhost IP\n }\n return url;\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 = 1000;\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(sessionId, 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 this.sessionId = this.openvidu.getUrlWithoutSecret(sessionId);\n this.openvidu.processOpenViduUrl(sessionId);\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 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('/room')[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 && !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 /* 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 // 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 = {\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.connections.push(connection);\n if (!!connection.stream) {\n _this.remoteStreamsCreated[connection.stream.streamId] = true;\n events.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.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.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 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 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 + 'testSession?secret=' + secret);\n }))\n .catch(error => {\n console.error(error);\n });\n } else {\n this.connectToSession(this.openviduPublicUrl + 'testSession?secret=' + secret);\n }\n }\n });\n }\n\n connectToSession(mySessionId: string) {\n this.msgChain = [];\n\n const OV = new OpenVidu();\n this.session = OV.initSession(mySessionId);\n\n this.testStatus = 'CONNECTING';\n this.testButton = 'Testing...';\n\n this.session.connect(null).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 }).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('wss://' + location.hostname + ':4443/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;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj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WRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+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+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29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MCAwIDEtODYuNi01MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwIDEwMCkiLz48cGF0aCBzdHJva2U9InVybCgjZCkiIGQ9Ik0tODYuNiA1MGExMDAgMTAwIDAgMCAxIDAtMTAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDAgMTAwKSIvPjxwYXRoIHN0cm9rZT0idXJsKCNlKSIgZD0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+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: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IgMS4yNSA0LjUgMjMgMjMgMjMgMjNsMTI3IDUzYzM3IDM1IDIzIDEzNSAyMyAxMzVMMCA0NjRzLTMtOTYuNzUgMTQtMTIwYzUuMjUtNi4yNSAyMS43NS0xOS43NSA2NS0zNnoiLz48L3N2Zz4=);\\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+PHBhdGggZD0iTTkuNzU3IDQw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ni4zOTEtNS4yMzctMi4zMTgtNi4wMzQtNi4wN3ptNjguODM0IDBjLjgwNC0zLjc4Mi0uNTY4LTcuMzM1LTMuMTMzLTcuOTIxLTIuNjM2LS42MDMtNS40ODUgMi4xNS02LjI4OSA2LjEzMi0uNzk3IDMuOTQ4Ljc1MiA3LjQ1NyAzLjM4OSA3Ljg1OSAyLjU2NS4zOTEgNS4yMzctMi4zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+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++uzZ8rZApM81TJ8xM5me0Z/UF7PuBmdVdkGEb5gYDeQmyZNW3SJLIP9Kj64lGyMpmxRN6sOfIbkoAhKOdnv2/PmB1kB88eLFo+olyyrps3rSINIAzLonnqlqK8R9w+L86vtrt5L2nhug3Vc3ULu/Liz8AOuXESlZZONH6kmr7gtLIA9lRNeRzVukAvj3BslLnJNKgfScO69K+/Lly0ZbQW7e8tNK+pwBjqaSIjDrXgJkW1ci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1S+T12lRwxUvrZlVPp8jE1PikeO7C/nyEqBDCB1t7+kUx4kKUWclea0yZC5BIGpiJSNSD9QgFR0RQKkL6KxHSWdsiARHJNYewoGrzG1/bk4dTPSunL2EyDjcbb7MQ+lQfZmkKiN7SjpFAM5CWAyGcwyY84YsZ1lUcbRNNtQMAdtQWGvQ0DyVjzYAKQfQFodeAeC1C8vzymXIZqD+ZEh/2OyLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/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,iVBORw0KGgoAAAANSUhEUgAAAFIAAAAoCAYAAABtla08AAAGMElEQVR4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CHlveu/GV169z65E+T6koexCh6c+EEiky3lnxQKFjUeVyOeI5AOBzIiayRhJryd7YYnkIHgvB0qk9Tdql6N3XH4bRUIOIIIKJSiRb0hkSEpZKRd1CpEq8GxtIyCVmDSgFl94GacTgaJw1rUlYhYng0c4ewaUsmKRIJjpiqMSOCh9QeI+UYECmtQIsxEu6OorEcv6Rl0gu0woh8MhFkmSCTXVI4pC704WCFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+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 const fullSessionId = 'wss://' + location.hostname + ':4443/' + this.sessionId + '?secret=' + this.secret + '&recorder=true';\n\n this.session = OV.initSession(fullSessionId);\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 this.session.connect(null)\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":["/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;AAC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;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;AAC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ACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;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O,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 (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_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;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAcCAMAAAC02HQrAAAA1VBMVEUAAAD3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pn3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj3+Pj39/j3+Pj3+Pn4+Pk/JRMlAAAAQ3RSTlMABAUHCQoLDhAQERwdHiAjLjAxOD9ASFBRVl1mbnZ6fH2LjI+QkaWqrrC1uLzAwcXJycrL1NXj5Ofo6u3w9fr7/P3+d4M3+QAAAQBJREFUGBlVwYdCglAABdCLlr5Unijm3hMUtBzlBLSr//9JgUToOQgVJgceJgU8aHgMeA38K50ZOpcQmTPwcyXn+JM8M3JJIqQypiIkeXelTyIkGZPwKS1NMia1lgKTVkaE3oQQGYsmHNqSMWnTgUFbMiZtGlD2dpaxrL1XgM0i4ZK8MeAmFhsAs29MGZniawagS63oMOQUNXYB5D0D1RMDpyoMLw/fiE2og/V+PVDR5AiBl0/2Uwik+vx4xV3a5G5Ye68Nd1czjUjZckm6VhmPciRzeCZICjwTJAViQq+3e+St167rAoHK8sLYZVkBYPCZAZ/eGa+2R5LH7Wrc0YFf/O9J3yBDFaoAAAAASUVORK5CYII=);\\n background-position: 9px 5px;\\n}\\n\\n.OT_publisher .OT_mute.OT_active {\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAADcElEQVRIiaWVXWhcRRTHf7NNd2aDtUKMIjTpg4ufFIuiUOmDEWm0Vi3VYhXRqIggQh4sWJFSig9+oOhTKSpIRUWMIBIr2kptoTbgU6ooxCiIjR+14kcJmf9sNceHnd3ebnc3Uv9wuXfOzPzmnDMz5zozGwdWAbc65w5RUJQ8cC2wDJgFJioh/MJCMrNxq2vOzK4HmIvRRemxKP0RJWt53o7S+d2Yzsx6gQ+AIUDAnUqpBLzXZd4RYFUlhB/bdZacc3PAOmAcCMC7wfvFwLNdoAPAyx09bXyYWRl4E7gDmAdGlNKFwLYu8GolhO9O87RJd64GbMrgEvB68P4osMWdXLtVV7czlooNpVRWSs8DO7NpR/B+3rBHsvetCgtCMTxwQCm9BbyQrc8F7/uBex3uRCeXO0PrUZ4NfKyUPgWeyj3bg/crDNsIRGwBaJQGorQ3Svdn2wHgc2BUKb0DPJHtjwfvbwRucc7tz+N+i9LFUdoXpfVN36I0CVwBTFI/q9e1LPxT8P4qYEdu70q12mYzWw1MYQzjeJF6zq+shHC4B7jklOBPP/TzSunh4P0DwKvAfb5c9krpe+CcwsEoZdbhEvBM9wxRAl5RShcA9wAngE3B+8tLpdLuwrhp4MNmK0pfRWkySr7NXS8+L5nZbWZWy/Vin1IaitJnUTqvwevJ71lgSSWEFKUfHG7Q2m/xqFJaGry/GXgfGPLl8mJgrXPur2JoUC8Qy3OpG+sAbGhEKT0ErAWOA6uBPWbW1wr9BOgFbgKezot0kAPYqJQA1gC/A9cA+82svzksSn1R+jNKX0SpnM/e1x3yqig92JhrZivM7FjO8bSZLSuCR/Ok16K0KMNHojQWpYko7Y7S1igN5PE3ROl4lNaZ2UVmNpPBU01orvZvZPCeKFXbBR+lEKVtUapFaSZKg9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+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+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjEiIHgyPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjA4Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIxIiB4Mj0iMCIgeTE9IjEiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMDgiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjE2Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgyPSIwIiB5MT0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4xNiIvPjxzdG9wIG9mZnNldD0iMSIgc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0iTS04Ni42LTUwQTEwMCAxMDAgMCAwIDEgMC0xMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMCAxMDApIi8+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+PHN0b3Agb2Zmc2V0PSI2Ni42NiUiIHN0b3AtY29sb3I9IiNm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it: 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+PHBhdGggZD0iTTkuNzU3IDQwLjkyNGMzLjczOC01LjE5MSAxMi43MTEtNC4zMDggMTIuNzExLTQuMzA4IDIuMjIzIDMuMDE0IDUuMTI2IDI0LjU4NiAzLjYyNCAyOC43MTgtMS40MDEgMS4zMDEtMTEuNjExIDEuNjI5LTEzLjM4LTEuNDM2LTEuMjI2LTguODA0LTIuOTU1LTIyLjk3NS0yLjk1NS0yMi45NzV6bTU4Ljc4NS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zMTggNi4wMzQtNi4wN3ptLTIuMDM4IDguMjg4Yy0uOTI2IDE5LjY1OS0xNS4xMTIgMjQuNzU5LTI1Ljg1OSAyMC40NzUtNS40MDUtLjYwNi0zLjAzNCAxLjI2Mi0zLjAzNCAxLjI2MiAxMy42NjEgMy41NjIgMjYuMTY4IDMuNDk3IDMxLjI3My0yMC41NDktLjU4NS00LjUxMS0yLjM3OS0xLjE4Ny0yLjM3OS0xLjE4N3oiLz48cGF0aCBkPSJNNDEuNjYyIDc4LjQyMmw3LjU1My41NWMxLjE5Mi4xMDcgMi4xMiAxLjE1MyAyLjA3MiAyLjMzNWwtLjEwOSAyLjczOGMtLjA0NyAxLjE4Mi0xLjA1MSAyLjA1NC0yLjI0MyAxLjk0NmwtNy41NTMtLjU1Yy0xLjE5MS0uMTA3LTIuMTE5LTEuMTUzLTIuMDcyLTIuMzM1bC4xMDktMi43MzdjLjA0Ny0xLjE4MiAxLjA1Mi0yLjA1NCAyLjI0My0xLjk0N3oiLz48L2c+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;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yLSalS/3VbnJZ+VqDXGjMrTCFuK4s66vVZUNfqaDolcbjOcb899sLpEE+I20GifywXe2QR3KElu99PzqjGufhREqB1pjCnG3IL3fY1v733r2FMsiGhutn0LAoJWWIGbPxjKwgjUbF0m52mPhigrpdXOecEq9pR6MkHbu2LOtrcZ9y3d0ODTb15y9MePz48aF79+8fvXnr9sljx2u2I7KNxDuaMPGVECoRs7mC4eT7SIruFNfNHK15MKuM2evwNq+4qjxvGnd5CHwNNynawW4cOlUZdG8b55IIJHmkItwrZHH6QxB3OSL9kTtAGpIvZiQB3Z4SKBfXQtEE9sashWAW87Bt3sYZNR6zn4uzJwWDKUKXfaKCdqUoBpLxSjYe9nqGiwWRBGipuGZ3Qm76itYLbbJI/PEhUApfw73uOIy9xfse3M9F9BuFJHcYrseSouGkHtCVtkuGTTikI8XgZzhg9SeF4VqcvSWiaSvNHQ8JwkNjIfEHemCmNLD1RaEfLs18mlgNuN6PFALHo7CyU5W2g00gFAQF4ozvibH04muwDbWraSFAyt/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/tLe3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CFRJvSRNJSzrMMEZO2iKZTCHAZYnmvXCny7ed5vfZK3viHSBdIFCKEFj2+nt+73nw8m2uedcLJlktA++VNMEPaR45aYukcKnnCfY3/DFbZS8t7eHxNgsPM0N1hXhJJwwM1QbpoQFlog2R13a/zBxEYHAQEUYUM6qiVwEyBYoM6JFNF2kFLelI5KQf+fVI4dJFCguDS7oAyx2R6SFQJKRedSDj/cMg/RXQ6ZE05GSIDAaXdCi1I3L021SQWNJ1RLY5OiIdL4/yvuw8ADfWPFrSciaMyH8tEQPwf1uGG54g5+KlJGTmsrxsQdl5PKidnPFe2QS///7Hu+VS6WX/HYnf0sevGL7lXydwod2/9DykZq0s5yff0sgSWCigNOH7TPHL7ufj+/TH8P/+qYpL4HkBDiRYpEXeM8/89/9zzjn7EtY64dfd1nqccM7Bs8+9MKy8555/8TnKS+5MufH6EZVASkgPzf+mJXroet17JirU0ALST3nT0y5ONyLpeo1y64ih+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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC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KSIvPjwvZz48cGF0aCBkPSJNMTA2LjUgMTMuNUw0NC45OTggNzUuMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+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-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java b/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java index aee68c29..2e0a14e1 100644 --- a/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java +++ b/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java @@ -385,26 +385,20 @@ public class OpenViduTestAppE2eTest { OpenVidu OV = new OpenVidu(OPENVIDU_URL, OPENVIDU_SECRET); Session session = OV.createSession(); - String sessionId = session.getSessionId(); List l1 = user.getDriver().findElements(By.className("secure-session-checkbox")); for (WebElement el : l1) { el.click(); } - List l2 = user.getDriver().findElements(By.className("sessionIdInput")); + List l2 = user.getDriver().findElements(By.className("tokenInput")); for (WebElement el : l2) { - el.sendKeys(sessionId); - } - - List l3 = user.getDriver().findElements(By.className("tokenInput")); - for (WebElement el : l3) { String token = session.generateToken(); el.sendKeys(token); } - List l4 = user.getDriver().findElements(By.className("join-btn")); - for (WebElement el : l4) { + List l3 = user.getDriver().findElements(By.className("join-btn")); + for (WebElement el : l3) { el.sendKeys(Keys.ENTER); } diff --git a/openvidu-test/src/main/java/io/openvidu/test/RoomClientFakeTest.java b/openvidu-test/src/main/java/io/openvidu/test/RoomClientFakeTest.java index e996601f..d7006e6f 100644 --- a/openvidu-test/src/main/java/io/openvidu/test/RoomClientFakeTest.java +++ b/openvidu-test/src/main/java/io/openvidu/test/RoomClientFakeTest.java @@ -71,7 +71,7 @@ public abstract class RoomClientFakeTest extends OpenViduClie TEST_PROTOCOL_DEFAULT).toUpperCase()); // might get overwritten by custom room apps - public static String appWsPath = "/room"; + public static String appWsPath = "/openvidu"; public long JOIN_ROOM_TOTAL_TIMEOUT_IN_SECONDS = 30; public long ACTIVE_LIVE_TOTAL_TIMEOUT_IN_SECONDS = 180; diff --git a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.css b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.css index d1a7956b..cb2a9269 100644 --- a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.css +++ b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.css @@ -135,8 +135,4 @@ mat-expansion-panel-header { .secure-div mat-checkbox { padding-right: 10px; -} - -.secure-div mat-form-field { - max-width: 80px; } \ No newline at end of file diff --git a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.html b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.html index ecc2a392..5340afe7 100644 --- a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.html +++ b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.html @@ -8,9 +8,6 @@
      SECURE - - - diff --git a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts index c5aeb6ea..dbb54feb 100644 --- a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts +++ b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts @@ -50,7 +50,6 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { secureSession = false; clientData: string; sessionName: string; - sessionIdInput: string; tokenInput: string; // Session options @@ -172,27 +171,24 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy { this.leaveSession(); } - let sessionId; let token; if (this.secureSession) { - sessionId = this.sessionIdInput; token = this.tokenInput; } else { - sessionId = 'wss://' - + this.removeHttps(this.openviduUrl) - + this.sessionName + '?secret=' - + this.openviduSecret; - token = null; + token = 'wss://' + + this.removeHttps(this.openviduUrl) + + '?sessionId=' + this.sessionName + + '&secret=' + this.openviduSecret; } - this.joinSessionShared(sessionId, token); + this.joinSessionShared(token); } - private joinSessionShared(sId, token): void { + private joinSessionShared(token): void { this.OV = new OpenVidu(); - this.session = this.OV.initSession(sId); + this.session = this.OV.initSession(); this.addSessionEvents(this.session); diff --git a/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.html b/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.html index 5e7eabad..9a214c2d 100644 --- a/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.html +++ b/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.html @@ -19,6 +19,7 @@ Default Recording Layout Default Custom Layout Media Mode + Custom sessionId @@ -47,6 +48,11 @@ + + + + +
      diff --git a/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.ts b/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.ts index 76e7f841..7c52e199 100644 --- a/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.ts +++ b/openvidu-testapp/src/app/components/test-apirest/test-apirest.component.ts @@ -36,6 +36,7 @@ export class TestApirestComponent implements OnInit, OnDestroy { selectedMediaMode = 'ROUTED'; customLayout = ''; + customSessionId = ''; // API REST data collected @@ -76,7 +77,8 @@ export class TestApirestComponent implements OnInit, OnDestroy { recordingMode: RecordingMode[this.selectedRecordingMode], defaultRecordingLayout: RecordingLayout[this.selectedDefaultRecordingLayout], defaultCustomLayout: this.customLayout, - mediaMode: MediaMode[this.selectedMediaMode] + mediaMode: MediaMode[this.selectedMediaMode], + customSessionId: this.customSessionId }) .then((sessionId) => { this.updateData();