Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes issue with the download logs button.
hristoterezov15db9ca7e458
diff --git a/index.html b/index.htmlindex 2e7840783f..31ce882074 100644--- a/index.html+++ b/index.html@@ -19,7 +19,7 @@<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --><script src="libs/toastr.js?v=1"></script><!-- notifications lib --><script src="interface_config.js?v=5"></script>- <script src="libs/app.bundle.js?v=83"></script>+ <script src="libs/app.bundle.js?v=84"></script><script src="analytics.js?v=1"></script><!-- google analytics plugin --><link rel="stylesheet" href="css/font.css?v=7"/><link rel="stylesheet" href="css/toastr.css?v=1">diff --git a/libs/app.bundle.js b/libs/app.bundle.jsindex 176c77c918..54ed471463 100644--- a/libs/app.bundle.js+++ b/libs/app.bundle.js@@ -1,4 +1,4 @@-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.APP = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.APP=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){/* jshint -W117 *//* application specific logic */@@ -290,7 +290,7 @@ var API = {};module.exports = API;-},{"../../service/xmpp/XMPPEvents":112}],3:[function(require,module,exports){+},{"../../service/xmpp/XMPPEvents":110}],3:[function(require,module,exports){/* global APP *//**@@ -557,7 +557,7 @@ function onPinnedEndpointChanged(userResource)module.exports = DataChannels;-},{"../../service/RTC/RTCEvents":103}],5:[function(require,module,exports){+},{"../../service/RTC/RTCEvents":101}],5:[function(require,module,exports){var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js");@@ -665,7 +665,7 @@ LocalStream.prototype.getId = function () {module.exports = LocalStream;-},{"../../service/RTC/StreamEventTypes.js":105}],6:[function(require,module,exports){+},{"../../service/RTC/StreamEventTypes.js":103}],6:[function(require,module,exports){////These lines should be uncommented when require works in app.jsvar MediaStreamType = require("../../service/RTC/MediaStreamTypes");var StreamEventType = require("../../service/RTC/StreamEventTypes");@@ -727,7 +727,7 @@ MediaStream.prototype.setVideoType = function (value) {module.exports = MediaStream;-},{"../../service/RTC/MediaStreamTypes":101,"../../service/RTC/StreamEventTypes":105}],7:[function(require,module,exports){+},{"../../service/RTC/MediaStreamTypes":99,"../../service/RTC/StreamEventTypes":103}],7:[function(require,module,exports){var EventEmitter = require("events");var RTCUtils = require("./RTCUtils.js");var LocalStream = require("./LocalStream.js");@@ -1013,7 +1013,7 @@ var RTC = {module.exports = RTC;-},{"../../service/RTC/MediaStreamTypes":101,"../../service/RTC/RTCEvents.js":103,"../../service/RTC/StreamEventTypes.js":105,"../../service/UI/UIEvents":106,"../../service/desktopsharing/DesktopSharingEventTypes":109,"../../service/xmpp/XMPPEvents":112,"./DataChannels":4,"./LocalStream.js":5,"./MediaStream.js":6,"./RTCUtils.js":8,"events":62}],8:[function(require,module,exports){+},{"../../service/RTC/MediaStreamTypes":99,"../../service/RTC/RTCEvents.js":101,"../../service/RTC/StreamEventTypes.js":103,"../../service/UI/UIEvents":104,"../../service/desktopsharing/DesktopSharingEventTypes":107,"../../service/xmpp/XMPPEvents":110,"./DataChannels":4,"./LocalStream.js":5,"./MediaStream.js":6,"./RTCUtils.js":8,"events":111}],8:[function(require,module,exports){var RTCBrowserType = require("../../service/RTC/RTCBrowserType.js");var Resolutions = require("../../service/RTC/Resolutions");@@ -1487,7 +1487,7 @@ RTCUtils.prototype.createStream = function(stream, isVideo)module.exports = RTCUtils;-},{"../../service/RTC/RTCBrowserType.js":102,"../../service/RTC/Resolutions":104}],9:[function(require,module,exports){+},{"../../service/RTC/RTCBrowserType.js":100,"../../service/RTC/Resolutions":102}],9:[function(require,module,exports){var UI = {};var VideoLayout = require("./videolayout/VideoLayout.js");@@ -2304,7 +2304,7 @@ UI.setVideoMute = setVideoMute;module.exports = UI;-},{"../../service/RTC/RTCEvents":103,"../../service/RTC/StreamEventTypes":105,"../../service/connectionquality/CQEvents":108,"../../service/desktopsharing/DesktopSharingEventTypes":109,"../../service/members/Events":110,"../../service/xmpp/XMPPEvents":112,"./../settings/Settings":41,"./audio_levels/AudioLevels.js":10,"./authentication/Authentication":12,"./avatar/Avatar":14,"./etherpad/Etherpad.js":15,"./prezi/Prezi.js":16,"./side_pannels/SidePanelToggler":18,"./side_pannels/chat/Chat.js":19,"./side_pannels/contactlist/ContactList":23,"./side_pannels/settings/SettingsMenu":24,"./toolbars/BottomToolbar":25,"./toolbars/Toolbar":26,"./toolbars/ToolbarToggler":27,"./util/MessageHandler":29,"./util/NicknameHandler":30,"./util/UIUtil":31,"./videolayout/VideoLayout.js":33,"./welcome_page/RoomnameGenerator":34,"./welcome_page/WelcomePage":35,"events":62}],10:[function(require,module,exports){+},{"../../service/RTC/RTCEvents":101,"../../service/RTC/StreamEventTypes":103,"../../service/connectionquality/CQEvents":106,"../../service/desktopsharing/DesktopSharingEventTypes":107,"../../service/members/Events":108,"../../service/xmpp/XMPPEvents":110,"./../settings/Settings":41,"./audio_levels/AudioLevels.js":10,"./authentication/Authentication":12,"./avatar/Avatar":14,"./etherpad/Etherpad.js":15,"./prezi/Prezi.js":16,"./side_pannels/SidePanelToggler":18,"./side_pannels/chat/Chat.js":19,"./side_pannels/contactlist/ContactList":23,"./side_pannels/settings/SettingsMenu":24,"./toolbars/BottomToolbar":25,"./toolbars/Toolbar":26,"./toolbars/ToolbarToggler":27,"./util/MessageHandler":29,"./util/NicknameHandler":30,"./util/UIUtil":31,"./videolayout/VideoLayout.js":33,"./welcome_page/RoomnameGenerator":34,"./welcome_page/WelcomePage":35,"events":111}],10:[function(require,module,exports){var CanvasUtil = require("./CanvasUtils");var ASDrawContext = $('#activeSpeakerAudioLevel')[0].getContext('2d');@@ -3199,7 +3199,7 @@ var Avatar = {module.exports = Avatar;-},{"../../../service/RTC/MediaStreamTypes":101,"../../settings/Settings":41,"../videolayout/VideoLayout":33}],15:[function(require,module,exports){+},{"../../../service/RTC/MediaStreamTypes":99,"../../settings/Settings":41,"../videolayout/VideoLayout":33}],15:[function(require,module,exports){/* global $, config,setLargeVideoVisible, Util */@@ -4682,7 +4682,7 @@ var Chat = (function (my) {return my;}(Chat || {}));module.exports = Chat;-},{"../../../../service/UI/UIEvents":106,"../../toolbars/ToolbarToggler":27,"../../util/NicknameHandler":30,"../../util/UIUtil":31,"../SidePanelToggler":18,"./Commands":20,"./Replacement":21,"./smileys.json":22}],20:[function(require,module,exports){+},{"../../../../service/UI/UIEvents":104,"../../toolbars/ToolbarToggler":27,"../../util/NicknameHandler":30,"../../util/UIUtil":31,"../SidePanelToggler":18,"./Commands":20,"./Replacement":21,"./smileys.json":22}],20:[function(require,module,exports){var UIUtil = require("../../util/UIUtil");/**@@ -5194,7 +5194,7 @@ var SettingsMenu = {module.exports = SettingsMenu;-},{"../../../../service/translation/languages":111,"../../avatar/Avatar":14,"../../util/UIUtil":31,"./../../../settings/Settings":41}],25:[function(require,module,exports){+},{"../../../../service/translation/languages":109,"../../avatar/Avatar":14,"../../util/UIUtil":31,"./../../../settings/Settings":41}],25:[function(require,module,exports){var PanelToggler = require("../side_pannels/SidePanelToggler");var buttonHandlers = {@@ -5888,7 +5888,7 @@ var Toolbar = (function (my) {}(Toolbar || {}));module.exports = Toolbar;-},{"../../../service/authentication/AuthenticationEvents":107,"../authentication/Authentication":12,"../etherpad/Etherpad":15,"../prezi/Prezi":16,"../side_pannels/SidePanelToggler":18,"../util/MessageHandler":29,"../util/UIUtil":31,"./BottomToolbar":25}],27:[function(require,module,exports){+},{"../../../service/authentication/AuthenticationEvents":105,"../authentication/Authentication":12,"../etherpad/Etherpad":15,"../prezi/Prezi":16,"../side_pannels/SidePanelToggler":18,"../util/MessageHandler":29,"../util/UIUtil":31,"./BottomToolbar":25}],27:[function(require,module,exports){/* global $, interfaceConfig, Moderator, DesktopStreaming.showDesktopSharingButton */var toolbarTimeoutObject,@@ -6369,7 +6369,7 @@ var NickanameHandler = {};module.exports = NickanameHandler;-},{"../../../service/UI/UIEvents":106}],31:[function(require,module,exports){+},{"../../../service/UI/UIEvents":104}],31:[function(require,module,exports){/*** Created by hristo on 12/22/14.*/@@ -8998,7 +8998,7 @@ var VideoLayout = (function (my) {}(VideoLayout || {}));module.exports = VideoLayout;-},{"../../../service/RTC/MediaStreamTypes":101,"../../../service/UI/UIEvents":106,"../audio_levels/AudioLevels":10,"../avatar/Avatar":14,"../etherpad/Etherpad":15,"../prezi/Prezi":16,"../side_pannels/chat/Chat":19,"../side_pannels/contactlist/ContactList":23,"../util/NicknameHandler":30,"../util/UIUtil":31,"./ConnectionIndicator":32}],34:[function(require,module,exports){+},{"../../../service/RTC/MediaStreamTypes":99,"../../../service/UI/UIEvents":104,"../audio_levels/AudioLevels":10,"../avatar/Avatar":14,"../etherpad/Etherpad":15,"../prezi/Prezi":16,"../side_pannels/chat/Chat":19,"../side_pannels/contactlist/ContactList":23,"../util/NicknameHandler":30,"../util/UIUtil":31,"./ConnectionIndicator":32}],34:[function(require,module,exports){//var nouns = [//];var pluralNouns = [@@ -9457,7 +9457,7 @@ var ConnectionQuality = {};module.exports = ConnectionQuality;-},{"../../service/connectionquality/CQEvents":108,"../../service/xmpp/XMPPEvents":112,"events":62}],38:[function(require,module,exports){+},{"../../service/connectionquality/CQEvents":106,"../../service/xmpp/XMPPEvents":110,"events":111}],38:[function(require,module,exports){/* global $, alert, APP, changeLocalVideo, chrome, config, getConferenceHandler,getUserMediaWithConstraints *//**@@ -9825,7 +9825,7 @@ module.exports = {};-},{"../../service/desktopsharing/DesktopSharingEventTypes":109,"events":62}],39:[function(require,module,exports){+},{"../../service/desktopsharing/DesktopSharingEventTypes":107,"events":111}],39:[function(require,module,exports){//maps keycode to character, id of popover for given function and functionvar shortcuts = {67: {@@ -10049,7 +10049,7 @@ var Members = {module.exports = Members;-},{"../../service/members/Events":110,"../../service/xmpp/XMPPEvents":112,"events":62}],41:[function(require,module,exports){+},{"../../service/members/Events":108,"../../service/xmpp/XMPPEvents":110,"events":111}],41:[function(require,module,exports){var email = '';var displayName = '';var userId;@@ -10989,7 +10989,7 @@ StatsCollector.prototype.processAudioLevelReport = function ()};-},{"../../service/RTC/RTCBrowserType":102}],44:[function(require,module,exports){+},{"../../service/RTC/RTCBrowserType":100}],44:[function(require,module,exports){/*** Created by hristo on 8/4/14.*/@@ -11122,7 +11122,7 @@ var statistics =module.exports = statistics;-},{"../../service/RTC/StreamEventTypes.js":105,"../../service/xmpp/XMPPEvents":112,"./LocalStatsCollector.js":42,"./RTPStatsCollector.js":43,"events":62}],45:[function(require,module,exports){+},{"../../service/RTC/StreamEventTypes.js":103,"../../service/xmpp/XMPPEvents":110,"./LocalStatsCollector.js":42,"./RTPStatsCollector.js":43,"events":111}],45:[function(require,module,exports){var i18n = require("i18next-client");var languages = require("../../service/translation/languages");var Settings = require("../settings/Settings");@@ -11261,7 +11261,7 @@ module.exports = {}};-},{"../../service/translation/languages":111,"../settings/Settings":41,"i18next-client":63}],46:[function(require,module,exports){+},{"../../service/translation/languages":109,"../settings/Settings":41,"i18next-client":61}],46:[function(require,module,exports){/* jshint -W117 */var TraceablePeerConnection = require("./TraceablePeerConnection");var SDPDiffer = require("./SDPDiffer");@@ -12655,7 +12655,7 @@ JingleSession.prototype.remoteStreamAdded = function (data, times) {module.exports = JingleSession;-},{"../../service/RTC/RTCBrowserType":102,"./SDP":47,"./SDPDiffer":48,"./SDPUtil":49,"./TraceablePeerConnection":50,"async":60,"sdp-transform":98}],47:[function(require,module,exports){+},{"../../service/RTC/RTCBrowserType":100,"./SDP":47,"./SDPDiffer":48,"./SDPUtil":49,"./TraceablePeerConnection":50,"async":60,"sdp-transform":96}],47:[function(require,module,exports){/* jshint -W117 */var SDPUtil = require("./SDPUtil");@@ -14120,7 +14120,7 @@ TraceablePeerConnection.prototype.getStats = function(callback, errback) {module.exports = TraceablePeerConnection;-},{"sdp-interop":84,"sdp-simulcast":91}],51:[function(require,module,exports){+},{"sdp-interop":82,"sdp-simulcast":89}],51:[function(require,module,exports){/* global $, $iq, APP, config, connection, UI, messageHandler,roomName, sessionTerminated, Strophe, Util */var XMPPEvents = require("../../service/xmpp/XMPPEvents");@@ -14556,7 +14556,7 @@ module.exports = Moderator;-},{"../../service/authentication/AuthenticationEvents":107,"../../service/xmpp/XMPPEvents":112,"../settings/Settings":41}],52:[function(require,module,exports){+},{"../../service/authentication/AuthenticationEvents":105,"../../service/xmpp/XMPPEvents":110,"../settings/Settings":41}],52:[function(require,module,exports){/* global $, $iq, config, connection, focusMucJid, messageHandler, Moderator,Toolbar, Util */var Moderator = require("./moderator");@@ -15405,7 +15405,7 @@ module.exports = function(XMPP, eventEmitter) {};-},{"../../service/xmpp/XMPPEvents":112,"./JingleSession":46,"./moderator":51}],54:[function(require,module,exports){+},{"../../service/xmpp/XMPPEvents":110,"./JingleSession":46,"./moderator":51}],54:[function(require,module,exports){/* jshint -W117 */var JingleSession = require("./JingleSession");@@ -15736,8 +15736,9 @@ module.exports = function(XMPP, eventEmitter)*/populateData: function () {var data = {};+ var self = this;Object.keys(this.sessions).forEach(function (sid) {- var session = this.sessions[sid];+ var session = self.sessions[sid];if (session.peerconnection && session.peerconnection.updateLog) {// FIXME: should probably be a .dump calldata["jingle_" + session.sid] = {@@ -15753,7 +15754,7 @@ module.exports = function(XMPP, eventEmitter)};-},{"../../service/xmpp/XMPPEvents":112,"./JingleSession":46}],55:[function(require,module,exports){+},{"../../service/xmpp/XMPPEvents":110,"./JingleSession":46}],55:[function(require,module,exports){/* global Strophe */module.exports = function () {@@ -16590,7 +16591,7 @@ var XMPP = {module.exports = XMPP;-},{"../../service/RTC/RTCEvents":103,"../../service/RTC/StreamEventTypes":105,"../../service/UI/UIEvents":106,"../../service/xmpp/XMPPEvents":112,"../settings/Settings":41,"./SDP":47,"./moderator":51,"./recording":52,"./strophe.emuc":53,"./strophe.jingle":54,"./strophe.logger":55,"./strophe.moderate":56,"./strophe.rayo":57,"./strophe.util":58,"events":62,"pako":64,"retry":80}],60:[function(require,module,exports){+},{"../../service/RTC/RTCEvents":101,"../../service/RTC/StreamEventTypes":103,"../../service/UI/UIEvents":104,"../../service/xmpp/XMPPEvents":110,"../settings/Settings":41,"./SDP":47,"./moderator":51,"./recording":52,"./strophe.emuc":53,"./strophe.jingle":54,"./strophe.logger":55,"./strophe.moderate":56,"./strophe.rayo":57,"./strophe.util":58,"events":111,"pako":62,"retry":78}],60:[function(require,module,exports){(function (process){/*!* async@@ -17717,457 +17718,94 @@ module.exports = XMPP;}());}).call(this,require('_process'))-},{"_process":61}],61:[function(require,module,exports){-// shim for using process in browser--var process = module.exports = {};-var queue = [];-var draining = false;+},{"_process":112}],61:[function(require,module,exports){+// i18next, v1.7.7+// Copyright (c)2014 Jan Mühlemann (jamuhl).+// Distributed under MIT license+// http://i18next.com+(function() {-function drainQueue() {- if (draining) {- return;- }- draining = true;- var currentQueue;- var len = queue.length;- while(len) {- currentQueue = queue;- queue = [];- var i = -1;- while (++i < len) {- currentQueue[i]();+ // add indexOf to non ECMA-262 standard compliant browsers+ if (!Array.prototype.indexOf) {+ Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {+ "use strict";+ if (this == null) {+ throw new TypeError();+ }+ var t = Object(this);+ var len = t.length >>> 0;+ if (len === 0) {+ return -1;+ }+ var n = 0;+ if (arguments.length > 0) {+ n = Number(arguments[1]);+ if (n != n) { // shortcut for verifying if it's NaN+ n = 0;+ } else if (n != 0 && n != Infinity && n != -Infinity) {+ n = (n > 0 || -1) * Math.floor(Math.abs(n));+ }+ }+ if (n >= len) {+ return -1;+ }+ var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);+ for (; k < len; k++) {+ if (k in t && t[k] === searchElement) {+ return k;+ }+ }+ return -1;}- len = queue.length;}- draining = false;-}-process.nextTick = function (fun) {- queue.push(fun);- if (!draining) {- setTimeout(drainQueue, 0);- }-};--process.title = 'browser';-process.browser = true;-process.env = {};-process.argv = [];-process.version = ''; // empty string to avoid regexp issues-process.versions = {};--function noop() {}--process.on = noop;-process.addListener = noop;-process.once = noop;-process.off = noop;-process.removeListener = noop;-process.removeAllListeners = noop;-process.emit = noop;--process.binding = function (name) {- throw new Error('process.binding is not supported');-};--// TODO(shtylman)-process.cwd = function () { return '/' };-process.chdir = function (dir) {- throw new Error('process.chdir is not supported');-};-process.umask = function() { return 0; };--},{}],62:[function(require,module,exports){-// Copyright Joyent, Inc. and other Node contributors.-//-// Permission is hereby granted, free of charge, to any person obtaining a-// copy of this software and associated documentation files (the-// "Software"), to deal in the Software without restriction, including-// without limitation the rights to use, copy, modify, merge, publish,-// distribute, sublicense, and/or sell copies of the Software, and to permit-// persons to whom the Software is furnished to do so, subject to the-// following conditions:-//-// The above copyright notice and this permission notice shall be included-// in all copies or substantial portions of the Software.-//-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE-// USE OR OTHER DEALINGS IN THE SOFTWARE.--function EventEmitter() {- this._events = this._events || {};- this._maxListeners = this._maxListeners || undefined;-}-module.exports = EventEmitter;--// Backwards-compat with node 0.10.x-EventEmitter.EventEmitter = EventEmitter;--EventEmitter.prototype._events = undefined;-EventEmitter.prototype._maxListeners = undefined;--// By default EventEmitters will print a warning if more than 10 listeners are-// added to it. This is a useful default which helps finding memory leaks.-EventEmitter.defaultMaxListeners = 10;--// Obviously not all Emitters should be limited to 10. This function allows-// that to be increased. Set to zero for unlimited.-EventEmitter.prototype.setMaxListeners = function(n) {- if (!isNumber(n) || n < 0 || isNaN(n))- throw TypeError('n must be a positive number');- this._maxListeners = n;- return this;-};--EventEmitter.prototype.emit = function(type) {- var er, handler, len, args, i, listeners;-- if (!this._events)- this._events = {};-- // If there is no 'error' event listener then throw.- if (type === 'error') {- if (!this._events.error ||- (isObject(this._events.error) && !this._events.error.length)) {- er = arguments[1];- if (er instanceof Error) {- throw er; // Unhandled 'error' event- }- throw TypeError('Uncaught, unspecified "error" event.');++ // add lastIndexOf to non ECMA-262 standard compliant browsers+ if (!Array.prototype.lastIndexOf) {+ Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {+ "use strict";+ if (this == null) {+ throw new TypeError();+ }+ var t = Object(this);+ var len = t.length >>> 0;+ if (len === 0) {+ return -1;+ }+ var n = len;+ if (arguments.length > 1) {+ n = Number(arguments[1]);+ if (n != n) {+ n = 0;+ } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {+ n = (n > 0 || -1) * Math.floor(Math.abs(n));+ }+ }+ var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);+ for (; k >= 0; k--) {+ if (k in t && t[k] === searchElement) {+ return k;+ }+ }+ return -1;+ };}- }-- handler = this._events[type];-- if (isUndefined(handler))- return false;-- if (isFunction(handler)) {- switch (arguments.length) {- // fast cases- case 1:- handler.call(this);- break;- case 2:- handler.call(this, arguments[1]);- break;- case 3:- handler.call(this, arguments[1], arguments[2]);- break;- // slower- default:- len = arguments.length;- args = new Array(len - 1);- for (i = 1; i < len; i++)- args[i - 1] = arguments[i];- handler.apply(this, args);++ // Add string trim for IE8.+ if (typeof String.prototype.trim !== 'function') {+ String.prototype.trim = function() {+ return this.replace(/^\s+|\s+$/g, '');+ }}- } else if (isObject(handler)) {- len = arguments.length;- args = new Array(len - 1);- for (i = 1; i < len; i++)- args[i - 1] = arguments[i];-- listeners = handler.slice();- len = listeners.length;- for (i = 0; i < len; i++)- listeners[i].apply(this, args);- }-- return true;-};--EventEmitter.prototype.addListener = function(type, listener) {- var m;- if (!isFunction(listener))- throw TypeError('listener must be a function');-- if (!this._events)- this._events = {};-- // To avoid recursion in the case that type === "newListener"! Before- // adding it to the listeners, first emit "newListener".- if (this._events.newListener)- this.emit('newListener', type,- isFunction(listener.listener) ?- listener.listener : listener);-- if (!this._events[type])- // Optimize the case of one listener. Don't need the extra array object.- this._events[type] = listener;- else if (isObject(this._events[type]))- // If we've already got an array, just append.- this._events[type].push(listener);- else- // Adding the second element, need to change to array.- this._events[type] = [this._events[type], listener];-- // Check for listener leak- if (isObject(this._events[type]) && !this._events[type].warned) {- var m;- if (!isUndefined(this._maxListeners)) {- m = this._maxListeners;- } else {- m = EventEmitter.defaultMaxListeners;- }-- if (m && m > 0 && this._events[type].length > m) {- this._events[type].warned = true;- console.error('(node) warning: possible EventEmitter memory ' +- 'leak detected. %d listeners added. ' +- 'Use emitter.setMaxListeners() to increase limit.',- this._events[type].length);- if (typeof console.trace === 'function') {- // not supported in IE 10- console.trace();- }- }- }-- return this;-};--EventEmitter.prototype.on = EventEmitter.prototype.addListener;--EventEmitter.prototype.once = function(type, listener) {- if (!isFunction(listener))- throw TypeError('listener must be a function');-- var fired = false;-- function g() {- this.removeListener(type, g);-- if (!fired) {- fired = true;- listener.apply(this, arguments);- }- }-- g.listener = listener;- this.on(type, g);-- return this;-};--// emits a 'removeListener' event iff the listener was removed-EventEmitter.prototype.removeListener = function(type, listener) {- var list, position, length, i;-- if (!isFunction(listener))- throw TypeError('listener must be a function');-- if (!this._events || !this._events[type])- return this;-- list = this._events[type];- length = list.length;- position = -1;-- if (list === listener ||- (isFunction(list.listener) && list.listener === listener)) {- delete this._events[type];- if (this._events.removeListener)- this.emit('removeListener', type, listener);-- } else if (isObject(list)) {- for (i = length; i-- > 0;) {- if (list[i] === listener ||- (list[i].listener && list[i].listener === listener)) {- position = i;- break;- }- }-- if (position < 0)- return this;-- if (list.length === 1) {- list.length = 0;- delete this._events[type];- } else {- list.splice(position, 1);- }-- if (this._events.removeListener)- this.emit('removeListener', type, listener);- }-- return this;-};--EventEmitter.prototype.removeAllListeners = function(type) {- var key, listeners;-- if (!this._events)- return this;-- // not listening for removeListener, no need to emit- if (!this._events.removeListener) {- if (arguments.length === 0)- this._events = {};- else if (this._events[type])- delete this._events[type];- return this;- }-- // emit removeListener for all listeners on all events- if (arguments.length === 0) {- for (key in this._events) {- if (key === 'removeListener') continue;- this.removeAllListeners(key);- }- this.removeAllListeners('removeListener');- this._events = {};- return this;- }-- listeners = this._events[type];-- if (isFunction(listeners)) {- this.removeListener(type, listeners);- } else {- // LIFO order- while (listeners.length)- this.removeListener(type, listeners[listeners.length - 1]);- }- delete this._events[type];-- return this;-};--EventEmitter.prototype.listeners = function(type) {- var ret;- if (!this._events || !this._events[type])- ret = [];- else if (isFunction(this._events[type]))- ret = [this._events[type]];- else- ret = this._events[type].slice();- return ret;-};--EventEmitter.listenerCount = function(emitter, type) {- var ret;- if (!emitter._events || !emitter._events[type])- ret = 0;- else if (isFunction(emitter._events[type]))- ret = 1;- else- ret = emitter._events[type].length;- return ret;-};--function isFunction(arg) {- return typeof arg === 'function';-}--function isNumber(arg) {- return typeof arg === 'number';-}--function isObject(arg) {- return typeof arg === 'object' && arg !== null;-}--function isUndefined(arg) {- return arg === void 0;-}--},{}],63:[function(require,module,exports){-// i18next, v1.7.7-// Copyright (c)2014 Jan Mühlemann (jamuhl).-// Distributed under MIT license-// http://i18next.com-(function() {-- // add indexOf to non ECMA-262 standard compliant browsers- if (!Array.prototype.indexOf) {- Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {- "use strict";- if (this == null) {- throw new TypeError();- }- var t = Object(this);- var len = t.length >>> 0;- if (len === 0) {- return -1;- }- var n = 0;- if (arguments.length > 0) {- n = Number(arguments[1]);- if (n != n) { // shortcut for verifying if it's NaN- n = 0;- } else if (n != 0 && n != Infinity && n != -Infinity) {- n = (n > 0 || -1) * Math.floor(Math.abs(n));- }- }- if (n >= len) {- return -1;- }- var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);- for (; k < len; k++) {- if (k in t && t[k] === searchElement) {- return k;- }- }- return -1;- }- }-- // add lastIndexOf to non ECMA-262 standard compliant browsers- if (!Array.prototype.lastIndexOf) {- Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {- "use strict";- if (this == null) {- throw new TypeError();- }- var t = Object(this);- var len = t.length >>> 0;- if (len === 0) {- return -1;- }- var n = len;- if (arguments.length > 1) {- n = Number(arguments[1]);- if (n != n) {- n = 0;- } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {- n = (n > 0 || -1) * Math.floor(Math.abs(n));- }- }- var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);- for (; k >= 0; k--) {- if (k in t && t[k] === searchElement) {- return k;- }- }- return -1;- };- }-- // Add string trim for IE8.- if (typeof String.prototype.trim !== 'function') {- String.prototype.trim = function() {- return this.replace(/^\s+|\s+$/g, '');- }- }-- var root = this- , $ = root.jQuery || root.Zepto- , i18n = {}- , resStore = {}- , currentLng- , replacementCounter = 0- , languages = []- , initialized = false- , sync = {};+ var root = this+ , $ = root.jQuery || root.Zepto+ , i18n = {}+ , resStore = {}+ , currentLng+ , replacementCounter = 0+ , languages = []+ , initialized = false+ , sync = {};@@ -20203,7 +19841,7 @@ function isUndefined(arg) {i18n.options = o;})();-},{"jquery":"jquery"}],64:[function(require,module,exports){+},{"jquery":"jquery"}],62:[function(require,module,exports){// Top level file is just a mixin of submodules & constants'use strict';@@ -20218,7 +19856,8 @@ var pako = {};assign(pako, deflate, inflate, constants);module.exports = pako;-},{"./lib/deflate":65,"./lib/inflate":66,"./lib/utils/common":67,"./lib/zlib/constants":70}],65:[function(require,module,exports){++},{"./lib/deflate":63,"./lib/inflate":64,"./lib/utils/common":65,"./lib/zlib/constants":68}],63:[function(require,module,exports){'use strict';@@ -20238,6 +19877,7 @@ var Z_FINISH = 4;var Z_OK = 0;var Z_STREAM_END = 1;+var Z_SYNC_FLUSH = 2;var Z_DEFAULT_COMPRESSION = -1;@@ -20267,7 +19907,9 @@ var Z_DEFLATED = 8;** Compressed result, generated by default [[Deflate#onData]]* and [[Deflate#onEnd]] handlers. Filled after you push last chunk- * (call [[Deflate#push]] with `Z_FINISH` / `true` param).+ * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you+ * push a chunk with explicit flush (call [[Deflate#push]] with+ * `Z_SYNC_FLUSH` param).**//**@@ -20391,8 +20033,9 @@ var Deflate = function(options) {** Sends input data to deflate pipe, generating [[Deflate#onData]] calls with* new compressed chunks. Returns `true` on success. The last data block must have- * mode Z_FINISH (or `true`). That flush internal pending buffers and call- * [[Deflate#onEnd]].+ * mode Z_FINISH (or `true`). That will flush internal pending buffers and call+ * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you+ * can use mode Z_SYNC_FLUSH, keeping the compression context.** On fail call [[Deflate#onEnd]] with error code and return false.*@@ -20445,7 +20088,7 @@ Deflate.prototype.push = function(data, mode) {this.ended = true;return false;}- if (strm.avail_out === 0 || (strm.avail_in === 0 && _mode === Z_FINISH)) {+ if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {if (this.options.to === 'string') {this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));} else {@@ -20462,6 +20105,13 @@ Deflate.prototype.push = function(data, mode) {return status === Z_OK;}+ // callback interim results if Z_SYNC_FLUSH.+ if (_mode === Z_SYNC_FLUSH) {+ this.onEnd(Z_OK);+ strm.avail_out = 0;+ return true;+ }+return true;};@@ -20485,8 +20135,9 @@ Deflate.prototype.onData = function(chunk) {* - status (Number): deflate status. 0 (Z_OK) on success,* other if not.*- * Called once after you tell deflate that input stream complete- * or error happenned. By default - join collected chunks,+ * Called once after you tell deflate that the input stream is+ * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)+ * or if an error happened. By default - join collected chunks,* free memory and fill `results` / `err` properties.**/Deflate.prototype.onEnd = function(status) {@@ -20583,7 +20234,8 @@ exports.Deflate = Deflate;exports.deflate = deflate;exports.deflateRaw = deflateRaw;exports.gzip = gzip;-},{"./utils/common":67,"./utils/strings":68,"./zlib/deflate.js":72,"./zlib/messages":77,"./zlib/zstream":79}],66:[function(require,module,exports){++},{"./utils/common":65,"./utils/strings":66,"./zlib/deflate.js":70,"./zlib/messages":75,"./zlib/zstream":77}],64:[function(require,module,exports){'use strict';@@ -20616,7 +20268,9 @@ var toString = Object.prototype.toString;** Uncompressed result, generated by default [[Inflate#onData]]* and [[Inflate#onEnd]] handlers. Filled after you push last chunk- * (call [[Inflate#push]] with `Z_FINISH` / `true` param).+ * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you+ * push a chunk with explicit flush (call [[Inflate#push]] with+ * `Z_SYNC_FLUSH` param).**//**@@ -20736,8 +20390,9 @@ var Inflate = function(options) {** Sends input data to inflate pipe, generating [[Inflate#onData]] calls with* new output chunks. Returns `true` on success. The last data block must have- * mode Z_FINISH (or `true`). That flush internal pending buffers and call- * [[Inflate#onEnd]].+ * mode Z_FINISH (or `true`). That will flush internal pending buffers and call+ * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you+ * can use mode Z_SYNC_FLUSH, keeping the decompression context.** On fail call [[Inflate#onEnd]] with error code and return false.*@@ -20793,7 +20448,7 @@ Inflate.prototype.push = function(data, mode) {}if (strm.next_out) {- if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && _mode === c.Z_FINISH)) {+ if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {if (this.options.to === 'string') {@@ -20819,6 +20474,7 @@ Inflate.prototype.push = function(data, mode) {if (status === c.Z_STREAM_END) {_mode = c.Z_FINISH;}+// Finalize on the last chunk.if (_mode === c.Z_FINISH) {status = zlib_inflate.inflateEnd(this.strm);@@ -20827,6 +20483,13 @@ Inflate.prototype.push = function(data, mode) {return status === c.Z_OK;}+ // callback interim results if Z_SYNC_FLUSH.+ if (_mode === c.Z_SYNC_FLUSH) {+ this.onEnd(c.Z_OK);+ strm.avail_out = 0;+ return true;+ }+return true;};@@ -20850,8 +20513,9 @@ Inflate.prototype.onData = function(chunk) {* - status (Number): inflate status. 0 (Z_OK) on success,* other if not.*- * Called once after you tell inflate that input stream complete- * or error happenned. By default - join collected chunks,+ * Called either after you tell inflate that the input stream is+ * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)+ * or if an error happened. By default - join collected chunks,* free memory and fill `results` / `err` properties.**/Inflate.prototype.onEnd = function(status) {@@ -20952,7 +20616,7 @@ exports.inflate = inflate;exports.inflateRaw = inflateRaw;exports.ungzip = inflate;-},{"./utils/common":67,"./utils/strings":68,"./zlib/constants":70,"./zlib/gzheader":73,"./zlib/inflate.js":75,"./zlib/messages":77,"./zlib/zstream":79}],67:[function(require,module,exports){+},{"./utils/common":65,"./utils/strings":66,"./zlib/constants":68,"./zlib/gzheader":71,"./zlib/inflate.js":73,"./zlib/messages":75,"./zlib/zstream":77}],65:[function(require,module,exports){'use strict';@@ -20967,7 +20631,7 @@ exports.assign = function (obj /*from1, from2, from3, ...*/) {var source = sources.shift();if (!source) { continue; }- if (typeof(source) !== 'object') {+ if (typeof source !== 'object') {throw new TypeError(source + 'must be non-object');}@@ -20998,7 +20662,7 @@ var fnTyped = {return;}// Fallback to ordinary array- for(var i=0; i<len; i++) {+ for (var i=0; i<len; i++) {dest[dest_offs + i] = src[src_offs + i];}},@@ -21027,7 +20691,7 @@ var fnTyped = {var fnUntyped = {arraySet: function (dest, src, src_offs, len, dest_offs) {- for(var i=0; i<len; i++) {+ for (var i=0; i<len; i++) {dest[dest_offs + i] = src[src_offs + i];}},@@ -21055,7 +20719,8 @@ exports.setTyped = function (on) {};exports.setTyped(TYPED_OK);-},{}],68:[function(require,module,exports){++},{}],66:[function(require,module,exports){// String encode/decode helpers'use strict';@@ -21079,8 +20744,8 @@ try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch(__) { STR_APPL// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,// because max possible codepoint is 0x10ffffvar _utf8len = new utils.Buf8(256);-for (var i=0; i<256; i++) {- _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);+for (var q=0; q<256; q++) {+ _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);}_utf8len[254]=_utf8len[254]=1; // Invalid sequence start@@ -21149,7 +20814,7 @@ function buf2binstring(buf, len) {}var result = '';- for(var i=0; i < len; i++) {+ for (var i=0; i < len; i++) {result += String.fromCharCode(buf[i]);}return result;@@ -21165,7 +20830,7 @@ exports.buf2binstring = function(buf) {// Convert binary string (typed, when possible)exports.binstring2buf = function(str) {var buf = new utils.Buf8(str.length);- for(var i=0, len=buf.length; i < len; i++) {+ for (var i=0, len=buf.length; i < len; i++) {buf[i] = str.charCodeAt(i);}return buf;@@ -21242,7 +20907,7 @@ exports.utf8border = function(buf, max) {return (pos + _utf8len[buf[pos]] > max) ? pos : max;};-},{"./common":67}],69:[function(require,module,exports){+},{"./common":65}],67:[function(require,module,exports){'use strict';// Note: adler32 takes 12% for level 0 and 2% for level 6.@@ -21250,9 +20915,9 @@ exports.utf8border = function(buf, max) {// Small size is preferable.function adler32(adler, buf, len, pos) {- var s1 = (adler & 0xffff) |0- , s2 = ((adler >>> 16) & 0xffff) |0- , n = 0;+ var s1 = (adler & 0xffff) |0,+ s2 = ((adler >>> 16) & 0xffff) |0,+ n = 0;while (len !== 0) {// Set limit ~ twice less than 5552, to keep@@ -21275,7 +20940,8 @@ function adler32(adler, buf, len, pos) {module.exports = adler32;-},{}],70:[function(require,module,exports){++},{}],68:[function(require,module,exports){module.exports = {/* Allowed flush values; see deflate() and inflate() below for details */@@ -21323,7 +20989,8 @@ module.exports = {Z_DEFLATED: 8//Z_NULL: null // Use -1 or null inline, depending on var type};-},{}],71:[function(require,module,exports){++},{}],69:[function(require,module,exports){'use strict';// Note: we can't get significant speed boost here.@@ -21335,9 +21002,9 @@ module.exports = {function makeTable() {var c, table = [];- for(var n =0; n < 256; n++){+ for (var n =0; n < 256; n++) {c = n;- for(var k =0; k < 8; k++){+ for (var k =0; k < 8; k++) {c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));}table[n] = c;@@ -21351,12 +21018,12 @@ var crcTable = makeTable();function crc32(crc, buf, len, pos) {- var t = crcTable- , end = pos + len;+ var t = crcTable,+ end = pos + len;crc = crc ^ (-1);- for (var i = pos; i < end; i++ ) {+ for (var i = pos; i < end; i++) {crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];}@@ -21365,7 +21032,8 @@ function crc32(crc, buf, len, pos) {module.exports = crc32;-},{}],72:[function(require,module,exports){++},{}],70:[function(require,module,exports){'use strict';var utils = require('../utils/common');@@ -22902,7 +22570,7 @@ function deflate(strm, flush) {put_byte(s, val);} while (val !== 0);- if (s.gzhead.hcrc && s.pending > beg){+ if (s.gzhead.hcrc && s.pending > beg) {strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);}if (val === 0) {@@ -23131,7 +22799,8 @@ exports.deflatePending = deflatePending;exports.deflatePrime = deflatePrime;exports.deflateTune = deflateTune;*/-},{"../utils/common":67,"./adler32":69,"./crc32":71,"./messages":77,"./trees":78}],73:[function(require,module,exports){++},{"../utils/common":65,"./adler32":67,"./crc32":69,"./messages":75,"./trees":76}],71:[function(require,module,exports){'use strict';@@ -23151,7 +22820,7 @@ function GZheader() {// but leave for few code modifications//- // Setup limits is not necessary because in js we should not preallocate memory+ // Setup limits is not necessary because in js we should not preallocate memory// for inflate use constant limit in 65536 bytes//@@ -23172,7 +22841,8 @@ function GZheader() {}module.exports = GZheader;-},{}],74:[function(require,module,exports){++},{}],72:[function(require,module,exports){'use strict';// See state defs from inflate.js@@ -23499,7 +23169,7 @@ module.exports = function inflate_fast(strm, start) {return;};-},{}],75:[function(require,module,exports){+},{}],73:[function(require,module,exports){'use strict';@@ -25003,7 +24673,8 @@ exports.inflateSync = inflateSync;exports.inflateSyncPoint = inflateSyncPoint;exports.inflateUndermine = inflateUndermine;*/-},{"../utils/common":67,"./adler32":69,"./crc32":71,"./inffast":74,"./inftrees":76}],76:[function(require,module,exports){++},{"../utils/common":65,"./adler32":67,"./crc32":69,"./inffast":72,"./inftrees":74}],74:[function(require,module,exports){'use strict';@@ -25200,18 +24871,20 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta// poor man optimization - use if-else instead of switch,// to avoid deopts in old v8if (type === CODES) {- base = extra = work; /* dummy value--not used */- end = 19;+ base = extra = work; /* dummy value--not used */+ end = 19;+} else if (type === LENS) {- base = lbase;- base_index -= 257;- extra = lext;- extra_index -= 257;- end = 256;+ base = lbase;+ base_index -= 257;+ extra = lext;+ extra_index -= 257;+ end = 256;+} else { /* DISTS */- base = dbase;- extra = dext;- end = -1;+ base = dbase;+ extra = dext;+ end = -1;}/* initialize opts for loop */@@ -25330,7 +25003,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, tareturn 0;};-},{"../utils/common":67}],77:[function(require,module,exports){+},{"../utils/common":65}],75:[function(require,module,exports){'use strict';module.exports = {@@ -25344,7 +25017,8 @@ module.exports = {'-5': 'buffer error', /* Z_BUF_ERROR (-5) */'-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */};-},{}],78:[function(require,module,exports){++},{}],76:[function(require,module,exports){'use strict';@@ -25778,7 +25452,7 @@ function tr_static_init() {}//Assert (dist == 256, "tr_static_init: dist != 256");dist >>= 7; /* from now on, all distances are divided by 128 */- for ( ; code < D_CODES; code++) {+ for (; code < D_CODES; code++) {base_dist[code] = dist << 7;for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {_dist_code[256 + dist++] = code;@@ -26544,7 +26218,8 @@ exports._tr_stored_block = _tr_stored_block;exports._tr_flush_block = _tr_flush_block;exports._tr_tally = _tr_tally;exports._tr_align = _tr_align;-},{"../utils/common":67}],79:[function(require,module,exports){++},{"../utils/common":65}],77:[function(require,module,exports){'use strict';@@ -26574,9 +26249,10 @@ function ZStream() {}module.exports = ZStream;-},{}],80:[function(require,module,exports){++},{}],78:[function(require,module,exports){module.exports = require('./lib/retry');-},{"./lib/retry":81}],81:[function(require,module,exports){+},{"./lib/retry":79}],79:[function(require,module,exports){var RetryOperation = require('./retry_operation');exports.operation = function(options) {@@ -26627,7 +26303,7 @@ exports._createTimeout = function(attempt, opts) {return timeout;};-},{"./retry_operation":82}],82:[function(require,module,exports){+},{"./retry_operation":80}],80:[function(require,module,exports){function RetryOperation(timeouts) {this._timeouts = timeouts;this._fn = null;@@ -26737,7 +26413,7 @@ RetryOperation.prototype.mainError = function() {return mainError;};-},{}],83:[function(require,module,exports){+},{}],81:[function(require,module,exports){module.exports = function arrayEquals(array) {// if the other array is a falsy value, returnif (!array)@@ -26763,10 +26439,10 @@ module.exports = function arrayEquals(array) {}-},{}],84:[function(require,module,exports){+},{}],82:[function(require,module,exports){exports.Interop = require('./interop');-},{"./interop":85}],85:[function(require,module,exports){+},{"./interop":83}],83:[function(require,module,exports){"use strict";var transform = require('./transform');@@ -27348,7 +27024,7 @@ Interop.prototype.toUnifiedPlan = function(desc) {//#endregion};-},{"./array-equals":83,"./transform":86}],86:[function(require,module,exports){+},{"./array-equals":81,"./transform":84}],84:[function(require,module,exports){var transform = require('sdp-transform');exports.write = function(session, opts) {@@ -27447,7 +27123,7 @@ exports.parse = function(sdp) {};-},{"sdp-transform":88}],87:[function(require,module,exports){+},{"sdp-transform":86}],85:[function(require,module,exports){var grammar = module.exports = {v: [{name: 'version',@@ -27696,7 +27372,7 @@ Object.keys(grammar).forEach(function (key) {});});-},{}],88:[function(require,module,exports){+},{}],86:[function(require,module,exports){var parser = require('./parser');var writer = require('./writer');@@ -27706,7 +27382,7 @@ exports.parseFmtpConfig = parser.parseFmtpConfig;exports.parsePayloads = parser.parsePayloads;exports.parseRemoteCandidates = parser.parseRemoteCandidates;-},{"./parser":89,"./writer":90}],89:[function(require,module,exports){+},{"./parser":87,"./writer":88}],87:[function(require,module,exports){var toIntIfInt = function (v) {return String(Number(v)) === v ? Number(v) : v;};@@ -27801,7 +27477,7 @@ exports.parseRemoteCandidates = function (str) {return candidates;};-},{"./grammar":87}],90:[function(require,module,exports){+},{"./grammar":85}],88:[function(require,module,exports){var grammar = require('./grammar');// customized util.format - discards excess arguments and can void middle ones@@ -27917,7 +27593,7 @@ module.exports = function (session, opts) {return sdp.join('\r\n') + '\r\n';};-},{"./grammar":87}],91:[function(require,module,exports){+},{"./grammar":85}],89:[function(require,module,exports){var transform = require('sdp-transform');var transformUtils = require('./transform-utils');var parseSsrcs = transformUtils.parseSsrcs;@@ -28319,7 +27995,7 @@ Simulcast.prototype.mungeLocalDescription = function (desc) {module.exports = Simulcast;-},{"./transform-utils":92,"sdp-transform":94}],92:[function(require,module,exports){+},{"./transform-utils":90,"sdp-transform":92}],90:[function(require,module,exports){exports.writeSsrcs = function(sources, order) {var ssrcs = [];@@ -28370,457 +28046,576 @@ exports.parseSsrcs = function (mLine) {};-},{}],93:[function(require,module,exports){+},{}],91:[function(require,module,exports){+arguments[4][85][0].apply(exports,arguments)+},{"dup":85}],92:[function(require,module,exports){+arguments[4][86][0].apply(exports,arguments)+},{"./parser":93,"./writer":94,"dup":86}],93:[function(require,module,exports){arguments[4][87][0].apply(exports,arguments)-},{"dup":87}],94:[function(require,module,exports){+},{"./grammar":91,"dup":87}],94:[function(require,module,exports){arguments[4][88][0].apply(exports,arguments)-},{"./parser":95,"./writer":96,"dup":88}],95:[function(require,module,exports){-arguments[4][89][0].apply(exports,arguments)-},{"./grammar":93,"dup":89}],96:[function(require,module,exports){-arguments[4][90][0].apply(exports,arguments)-},{"./grammar":93,"dup":90}],97:[function(require,module,exports){-var grammar = module.exports = {- v: [{- name: 'version',- reg: /^(\d*)$/- }],- o: [{ //o=- 20518 0 IN IP4 203.0.113.1- // NB: sessionId will be a String in most cases because it is huge- name: 'origin',- reg: /^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,- names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],- format: "%s %s %d %s IP%d %s"- }],- // default parsing of these only (though some of these feel outdated)- s: [{ name: 'name' }],- i: [{ name: 'description' }],- u: [{ name: 'uri' }],- e: [{ name: 'email' }],- p: [{ name: 'phone' }],- z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly..- r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly- //k: [{}], // outdated thing ignored- t: [{ //t=0 0- name: 'timing',- reg: /^(\d*) (\d*)/,- names: ['start', 'stop'],- format: "%d %d"- }],- c: [{ //c=IN IP4 10.47.197.26- name: 'connection',- reg: /^IN IP(\d) (\S*)/,- names: ['version', 'ip'],- format: "IN IP%d %s"- }],- b: [{ //b=AS:4000- push: 'bandwidth',- reg: /^(TIAS|AS|CT|RR|RS):(\d*)/,- names: ['type', 'limit'],- format: "%s:%s"- }],- m: [{ //m=video 51744 RTP/AVP 126 97 98 34 31- // NB: special - pushes to session- // TODO: rtp/fmtp should be filtered by the payloads found here?- reg: /^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,- names: ['type', 'port', 'protocol', 'payloads'],- format: "%s %d %s %s"- }],- a: [- { //a=rtpmap:110 opus/48000/2- push: 'rtp',- reg: /^rtpmap:(\d*) ([\w\-]*)\/(\d*)(?:\s*\/(\S*))?/,- names: ['payload', 'codec', 'rate', 'encoding'],- format: function (o) {- return (o.encoding) ?- "rtpmap:%d %s/%s/%s":- "rtpmap:%d %s/%s";- }- },- { //a=fmtp:108 profile-level-id=24;object=23;bitrate=64000- push: 'fmtp',- reg: /^fmtp:(\d*) (\S*)/,- names: ['payload', 'config'],- format: "fmtp:%d %s"- },- { //a=control:streamid=0- name: 'control',- reg: /^control:(.*)/,- format: "control:%s"- },- { //a=rtcp:65179 IN IP4 193.84.77.194- name: 'rtcp',- reg: /^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,- names: ['port', 'netType', 'ipVer', 'address'],- format: function (o) {- return (o.address != null) ?- "rtcp:%d %s IP%d %s":- "rtcp:%d";- }- },- { //a=rtcp-fb:98 trr-int 100- push: 'rtcpFbTrrInt',- reg: /^rtcp-fb:(\*|\d*) trr-int (\d*)/,- names: ['payload', 'value'],- format: "rtcp-fb:%d trr-int %d"- },- { //a=rtcp-fb:98 nack rpsi- push: 'rtcpFb',- reg: /^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,- names: ['payload', 'type', 'subtype'],- format: function (o) {- return (o.subtype != null) ?- "rtcp-fb:%s %s %s":- "rtcp-fb:%s %s";- }- },- { //a=extmap:2 urn:ietf:params:rtp-hdrext:toffset- //a=extmap:1/recvonly URI-gps-string- push: 'ext',- reg: /^extmap:([\w_\/]*) (\S*)(?: (\S*))?/,- names: ['value', 'uri', 'config'], // value may include "/direction" suffix- format: function (o) {- return (o.config != null) ?- "extmap:%s %s %s":- "extmap:%s %s";- }- },- {- //a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32- push: 'crypto',- reg: /^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,- names: ['id', 'suite', 'config', 'sessionConfig'],- format: function (o) {- return (o.sessionConfig != null) ?- "crypto:%d %s %s %s":- "crypto:%d %s %s";- }- },- { //a=setup:actpass- name: 'setup',- reg: /^setup:(\w*)/,- format: "setup:%s"- },- { //a=mid:1- name: 'mid',- reg: /^mid:([^\s]*)/,- format: "mid:%s"+},{"./grammar":91,"dup":88}],95:[function(require,module,exports){+arguments[4][85][0].apply(exports,arguments)+},{"dup":85}],96:[function(require,module,exports){+arguments[4][86][0].apply(exports,arguments)+},{"./parser":97,"./writer":98,"dup":86}],97:[function(require,module,exports){+arguments[4][87][0].apply(exports,arguments)+},{"./grammar":95,"dup":87}],98:[function(require,module,exports){+arguments[4][88][0].apply(exports,arguments)+},{"./grammar":95,"dup":88}],99:[function(require,module,exports){+var MediaStreamType = {+ VIDEO_TYPE: "Video",++ AUDIO_TYPE: "Audio"+};+module.exports = MediaStreamType;+},{}],100:[function(require,module,exports){+var RTCBrowserType = {+ RTC_BROWSER_CHROME: "rtc_browser.chrome",++ RTC_BROWSER_FIREFOX: "rtc_browser.firefox"+};++module.exports = RTCBrowserType;+},{}],101:[function(require,module,exports){+var RTCEvents = {+ LASTN_CHANGED: "rtc.lastn_changed",+ DOMINANTSPEAKER_CHANGED: "rtc.dominantspeaker_changed",+ LASTN_ENDPOINT_CHANGED: "rtc.lastn_endpoint_changed",+ AVAILABLE_DEVICES_CHANGED: "rtc.available_devices_changed"+};++module.exports = RTCEvents;+},{}],102:[function(require,module,exports){+var Resolutions = {+ "1080": {+ width: 1920,+ height: 1080,+ order: 7},- { //a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a- name: 'msid',- reg: /^msid:(.*)/,- format: "msid:%s"+ "fullhd": {+ width: 1920,+ height: 1080,+ order: 7},- { //a=ptime:20- name: 'ptime',- reg: /^ptime:(\d*)/,- format: "ptime:%d"+ "720": {+ width: 1280,+ height: 720,+ order: 6},- { //a=maxptime:60- name: 'maxptime',- reg: /^maxptime:(\d*)/,- format: "maxptime:%d"+ "hd": {+ width: 1280,+ height: 720,+ order: 6},- { //a=sendrecv- name: 'direction',- reg: /^(sendrecv|recvonly|sendonly|inactive)/+ "960": {+ width: 960,+ height: 720,+ order: 5},- { //a=ice-lite- name: 'icelite',- reg: /^(ice-lite)/+ "640": {+ width: 640,+ height: 480,+ order: 4},- { //a=ice-ufrag:F7gI- name: 'iceUfrag',- reg: /^ice-ufrag:(\S*)/,- format: "ice-ufrag:%s"+ "vga": {+ width: 640,+ height: 480,+ order: 4},- { //a=ice-pwd:x9cml/YzichV2+XlhiMu8g- name: 'icePwd',- reg: /^ice-pwd:(\S*)/,- format: "ice-pwd:%s"+ "360": {+ width: 640,+ height: 360,+ order: 3},- { //a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33- name: 'fingerprint',- reg: /^fingerprint:(\S*) (\S*)/,- names: ['type', 'hash'],- format: "fingerprint:%s %s"+ "320": {+ width: 320,+ height: 240,+ order: 2},- {- //a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host- //a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0- //a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0- push:'candidates',- reg: /^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: generation (\d*))?/,- names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'generation'],- format: function (o) {- var str = "candidate:%s %d %s %d %s %d typ %s";- // NB: candidate has two optional chunks, so %void middle one if it's missing- str += (o.raddr != null) ? " raddr %s rport %d" : "%v%v";- if (o.generation != null) {- str += " generation %d";+ "180": {+ width: 320,+ height: 180,+ order: 1+ }+};+module.exports = Resolutions;+},{}],103:[function(require,module,exports){+var StreamEventTypes = {+ EVENT_TYPE_LOCAL_CREATED: "stream.local_created",++ EVENT_TYPE_LOCAL_CHANGED: "stream.local_changed",++ EVENT_TYPE_LOCAL_ENDED: "stream.local_ended",++ EVENT_TYPE_REMOTE_CREATED: "stream.remote_created",++ EVENT_TYPE_REMOTE_ENDED: "stream.remote_ended",++ EVENT_TYPE_REMOTE_CHANGED: "stream.changed"+};++module.exports = StreamEventTypes;+},{}],104:[function(require,module,exports){+var UIEvents = {+ NICKNAME_CHANGED: "UI.nickname_changed",+ SELECTED_ENDPOINT: "UI.selected_endpoint",+ PINNED_ENDPOINT: "UI.pinned_endpoint"+};+module.exports = UIEvents;+},{}],105:[function(require,module,exports){+var AuthenticationEvents = {+ /**+ * Event callback arguments:+ * function(authenticationEnabled, userIdentity)+ * authenticationEnabled - indicates whether authentication has been enabled+ * in this session+ * userIdentity - if user has been logged in then it contains user name. If+ * contains 'null' or 'undefined' then user is not logged in.+ */+ IDENTITY_UPDATED: "authentication.identity_updated"+};+module.exports = AuthenticationEvents;++},{}],106:[function(require,module,exports){+var CQEvents = {+ LOCALSTATS_UPDATED: "cq.localstats_updated",+ REMOTESTATS_UPDATED: "cq.remotestats_updated",+ STOP: "cq.stop"+};++module.exports = CQEvents;+},{}],107:[function(require,module,exports){+var DesktopSharingEventTypes = {+ INIT: "ds.init",++ SWITCHING_DONE: "ds.switching_done",++ NEW_STREAM_CREATED: "ds.new_stream_created"+};++module.exports = DesktopSharingEventTypes;+},{}],108:[function(require,module,exports){+var Events = {+ DTMF_SUPPORT_CHANGED: "members.dtmf_support_changed"+};++module.exports = Events;++},{}],109:[function(require,module,exports){+module.exports = {+ getLanguages : function () {+ var languages = [];+ for(var lang in this)+ {+ if(typeof this[lang] === "string")+ languages.push(this[lang]);}- return str;+ return languages;+ },+ EN: "en",+ BG: "bg",+ DE: "de",+ TR: "tr",+ FR: "fr"+}+},{}],110:[function(require,module,exports){+var XMPPEvents = {+ CONNECTION_FAILED: "xmpp.connection.failed",+ CONFERENCE_CREATED: "xmpp.conferenceCreated.jingle",+ CALL_TERMINATED: "xmpp.callterminated.jingle",+ CALL_INCOMING: "xmpp.callincoming.jingle",+ DISPOSE_CONFERENCE: "xmpp.dispose_conference",+ GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",+ KICKED: "xmpp.kicked",+ BRIDGE_DOWN: "xmpp.bridge_down",+ USER_ID_CHANGED: "xmpp.user_id_changed",+ STREAMS_CHANGED: "xmpp.streams_changed",+ // We joined the MUC+ MUC_JOINED: "xmpp.muc_joined",+ // A member joined the MUC+ MUC_MEMBER_JOINED: "xmpp.muc_member_joined",+ // A member left the MUC+ MUC_MEMBER_LEFT: "xmpp.muc_member_left",+ MUC_ROLE_CHANGED: "xmpp.muc_role_changed",+ MUC_DESTROYED: "xmpp.muc_destroyed",+ DISPLAY_NAME_CHANGED: "xmpp.display_name_changed",+ REMOTE_STATS: "xmpp.remote_stats",+ LOCAL_ROLE_CHANGED: "xmpp.localrole_changed",+ PRESENCE_STATUS: "xmpp.presence_status",+ RESERVATION_ERROR: "xmpp.room_reservation_error",+ SUBJECT_CHANGED: "xmpp.subject_changed",+ MESSAGE_RECEIVED: "xmpp.message_received",+ SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message",+ PASSWORD_REQUIRED: "xmpp.password_required",+ AUTHENTICATION_REQUIRED: "xmpp.authentication_required",+ CHAT_ERROR_RECEIVED: "xmpp.chat_error_received",+ ETHERPAD: "xmpp.etherpad",+ DEVICE_AVAILABLE: "xmpp.device_available",+ START_MUTED: "xmpp.start_muted"+};+module.exports = XMPPEvents;+},{}],111:[function(require,module,exports){+// Copyright Joyent, Inc. and other Node contributors.+//+// Permission is hereby granted, free of charge, to any person obtaining a+// copy of this software and associated documentation files (the+// "Software"), to deal in the Software without restriction, including+// without limitation the rights to use, copy, modify, merge, publish,+// distribute, sublicense, and/or sell copies of the Software, and to permit+// persons to whom the Software is furnished to do so, subject to the+// following conditions:+//+// The above copyright notice and this permission notice shall be included+// in all copies or substantial portions of the Software.+//+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE+// USE OR OTHER DEALINGS IN THE SOFTWARE.++function EventEmitter() {+ this._events = this._events || {};+ this._maxListeners = this._maxListeners || undefined;+}+module.exports = EventEmitter;++// Backwards-compat with node 0.10.x+EventEmitter.EventEmitter = EventEmitter;++EventEmitter.prototype._events = undefined;+EventEmitter.prototype._maxListeners = undefined;++// By default EventEmitters will print a warning if more than 10 listeners are+// added to it. This is a useful default which helps finding memory leaks.+EventEmitter.defaultMaxListeners = 10;++// Obviously not all Emitters should be limited to 10. This function allows+// that to be increased. Set to zero for unlimited.+EventEmitter.prototype.setMaxListeners = function(n) {+ if (!isNumber(n) || n < 0 || isNaN(n))+ throw TypeError('n must be a positive number');+ this._maxListeners = n;+ return this;+};++EventEmitter.prototype.emit = function(type) {+ var er, handler, len, args, i, listeners;++ if (!this._events)+ this._events = {};++ // If there is no 'error' event listener then throw.+ if (type === 'error') {+ if (!this._events.error ||+ (isObject(this._events.error) && !this._events.error.length)) {+ er = arguments[1];+ if (er instanceof Error) {+ throw er; // Unhandled 'error' event}- },- { //a=end-of-candidates (keep after the candidates line for readability)- name: 'endOfCandidates',- reg: /^(end-of-candidates)/- },- { //a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...- name: 'remoteCandidates',- reg: /^remote-candidates:(.*)/,- format: "remote-candidates:%s"- },- { //a=ice-options:google-ice- name: 'iceOptions',- reg: /^ice-options:(\S*)/,- format: "ice-options:%s"- },- { //a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1- push: "ssrcs",- reg: /^ssrc:(\d*) ([\w_]*):(.*)/,- names: ['id', 'attribute', 'value'],- format: "ssrc:%d %s:%s"- },- { //a=ssrc-group:FEC 1 2- push: "ssrcGroups",- reg: /^ssrc-group:(\w*) (.*)/,- names: ['semantics', 'ssrcs'],- format: "ssrc-group:%s %s"- },- { //a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV- name: "msidSemantic",- reg: /^msid-semantic:\s?(\w*) (\S*)/,- names: ['semantic', 'token'],- format: "msid-semantic: %s %s" // space after ":" is not accidental- },- { //a=group:BUNDLE audio video- push: 'groups',- reg: /^group:(\w*) (.*)/,- names: ['type', 'mids'],- format: "group:%s %s"- },- { //a=rtcp-mux- name: 'rtcpMux',- reg: /^(rtcp-mux)/- },- { // any a= that we don't understand is kepts verbatim on media.invalid- push: 'invalid',- names: ["value"]+ throw TypeError('Uncaught, unspecified "error" event.');}- ]+ }++ handler = this._events[type];++ if (isUndefined(handler))+ return false;++ if (isFunction(handler)) {+ switch (arguments.length) {+ // fast cases+ case 1:+ handler.call(this);+ break;+ case 2:+ handler.call(this, arguments[1]);+ break;+ case 3:+ handler.call(this, arguments[1], arguments[2]);+ break;+ // slower+ default:+ len = arguments.length;+ args = new Array(len - 1);+ for (i = 1; i < len; i++)+ args[i - 1] = arguments[i];+ handler.apply(this, args);+ }+ } else if (isObject(handler)) {+ len = arguments.length;+ args = new Array(len - 1);+ for (i = 1; i < len; i++)+ args[i - 1] = arguments[i];++ listeners = handler.slice();+ len = listeners.length;+ for (i = 0; i < len; i++)+ listeners[i].apply(this, args);+ }++ return true;};-// set sensible defaults to avoid polluting the grammar with boring details-Object.keys(grammar).forEach(function (key) {- var objs = grammar[key];- objs.forEach(function (obj) {- if (!obj.reg) {- obj.reg = /(.*)/;+EventEmitter.prototype.addListener = function(type, listener) {+ var m;++ if (!isFunction(listener))+ throw TypeError('listener must be a function');++ if (!this._events)+ this._events = {};++ // To avoid recursion in the case that type === "newListener"! Before+ // adding it to the listeners, first emit "newListener".+ if (this._events.newListener)+ this.emit('newListener', type,+ isFunction(listener.listener) ?+ listener.listener : listener);++ if (!this._events[type])+ // Optimize the case of one listener. Don't need the extra array object.+ this._events[type] = listener;+ else if (isObject(this._events[type]))+ // If we've already got an array, just append.+ this._events[type].push(listener);+ else+ // Adding the second element, need to change to array.+ this._events[type] = [this._events[type], listener];++ // Check for listener leak+ if (isObject(this._events[type]) && !this._events[type].warned) {+ var m;+ if (!isUndefined(this._maxListeners)) {+ m = this._maxListeners;+ } else {+ m = EventEmitter.defaultMaxListeners;}- if (!obj.format) {- obj.format = "%s";++ if (m && m > 0 && this._events[type].length > m) {+ this._events[type].warned = true;+ console.error('(node) warning: possible EventEmitter memory ' ++ 'leak detected. %d listeners added. ' ++ 'Use emitter.setMaxListeners() to increase limit.',+ this._events[type].length);+ if (typeof console.trace === 'function') {+ // not supported in IE 10+ console.trace();+ }}- });-});+ }-},{}],98:[function(require,module,exports){-arguments[4][88][0].apply(exports,arguments)-},{"./parser":99,"./writer":100,"dup":88}],99:[function(require,module,exports){-arguments[4][89][0].apply(exports,arguments)-},{"./grammar":97,"dup":89}],100:[function(require,module,exports){-arguments[4][90][0].apply(exports,arguments)-},{"./grammar":97,"dup":90}],101:[function(require,module,exports){-var MediaStreamType = {- VIDEO_TYPE: "Video",+ return this;+};++EventEmitter.prototype.on = EventEmitter.prototype.addListener;++EventEmitter.prototype.once = function(type, listener) {+ if (!isFunction(listener))+ throw TypeError('listener must be a function');++ var fired = false;++ function g() {+ this.removeListener(type, g);++ if (!fired) {+ fired = true;+ listener.apply(this, arguments);+ }+ }++ g.listener = listener;+ this.on(type, g);++ return this;+};++// emits a 'removeListener' event iff the listener was removed+EventEmitter.prototype.removeListener = function(type, listener) {+ var list, position, length, i;++ if (!isFunction(listener))+ throw TypeError('listener must be a function');++ if (!this._events || !this._events[type])+ return this;++ list = this._events[type];+ length = list.length;+ position = -1;++ if (list === listener ||+ (isFunction(list.listener) && list.listener === listener)) {+ delete this._events[type];+ if (this._events.removeListener)+ this.emit('removeListener', type, listener);++ } else if (isObject(list)) {+ for (i = length; i-- > 0;) {+ if (list[i] === listener ||+ (list[i].listener && list[i].listener === listener)) {+ position = i;+ break;+ }+ }++ if (position < 0)+ return this;++ if (list.length === 1) {+ list.length = 0;+ delete this._events[type];+ } else {+ list.splice(position, 1);+ }++ if (this._events.removeListener)+ this.emit('removeListener', type, listener);+ }++ return this;+};++EventEmitter.prototype.removeAllListeners = function(type) {+ var key, listeners;++ if (!this._events)+ return this;++ // not listening for removeListener, no need to emit+ if (!this._events.removeListener) {+ if (arguments.length === 0)+ this._events = {};+ else if (this._events[type])+ delete this._events[type];+ return this;+ }++ // emit removeListener for all listeners on all events+ if (arguments.length === 0) {+ for (key in this._events) {+ if (key === 'removeListener') continue;+ this.removeAllListeners(key);+ }+ this.removeAllListeners('removeListener');+ this._events = {};+ return this;+ }++ listeners = this._events[type];- AUDIO_TYPE: "Audio"-};-module.exports = MediaStreamType;-},{}],102:[function(require,module,exports){-var RTCBrowserType = {- RTC_BROWSER_CHROME: "rtc_browser.chrome",+ if (isFunction(listeners)) {+ this.removeListener(type, listeners);+ } else {+ // LIFO order+ while (listeners.length)+ this.removeListener(type, listeners[listeners.length - 1]);+ }+ delete this._events[type];- RTC_BROWSER_FIREFOX: "rtc_browser.firefox"+ return this;};-module.exports = RTCBrowserType;-},{}],103:[function(require,module,exports){-var RTCEvents = {- LASTN_CHANGED: "rtc.lastn_changed",- DOMINANTSPEAKER_CHANGED: "rtc.dominantspeaker_changed",- LASTN_ENDPOINT_CHANGED: "rtc.lastn_endpoint_changed",- AVAILABLE_DEVICES_CHANGED: "rtc.available_devices_changed"+EventEmitter.prototype.listeners = function(type) {+ var ret;+ if (!this._events || !this._events[type])+ ret = [];+ else if (isFunction(this._events[type]))+ ret = [this._events[type]];+ else+ ret = this._events[type].slice();+ return ret;};-module.exports = RTCEvents;-},{}],104:[function(require,module,exports){-var Resolutions = {- "1080": {- width: 1920,- height: 1080,- order: 7- },- "fullhd": {- width: 1920,- height: 1080,- order: 7- },- "720": {- width: 1280,- height: 720,- order: 6- },- "hd": {- width: 1280,- height: 720,- order: 6- },- "960": {- width: 960,- height: 720,- order: 5- },- "640": {- width: 640,- height: 480,- order: 4- },- "vga": {- width: 640,- height: 480,- order: 4- },- "360": {- width: 640,- height: 360,- order: 3- },- "320": {- width: 320,- height: 240,- order: 2- },- "180": {- width: 320,- height: 180,- order: 1- }+EventEmitter.listenerCount = function(emitter, type) {+ var ret;+ if (!emitter._events || !emitter._events[type])+ ret = 0;+ else if (isFunction(emitter._events[type]))+ ret = 1;+ else+ ret = emitter._events[type].length;+ return ret;};-module.exports = Resolutions;-},{}],105:[function(require,module,exports){-var StreamEventTypes = {- EVENT_TYPE_LOCAL_CREATED: "stream.local_created",- EVENT_TYPE_LOCAL_CHANGED: "stream.local_changed",+function isFunction(arg) {+ return typeof arg === 'function';+}- EVENT_TYPE_LOCAL_ENDED: "stream.local_ended",+function isNumber(arg) {+ return typeof arg === 'number';+}- EVENT_TYPE_REMOTE_CREATED: "stream.remote_created",+function isObject(arg) {+ return typeof arg === 'object' && arg !== null;+}- EVENT_TYPE_REMOTE_ENDED: "stream.remote_ended",+function isUndefined(arg) {+ return arg === void 0;+}- EVENT_TYPE_REMOTE_CHANGED: "stream.changed"-};+},{}],112:[function(require,module,exports){+// shim for using process in browser-module.exports = StreamEventTypes;-},{}],106:[function(require,module,exports){-var UIEvents = {- NICKNAME_CHANGED: "UI.nickname_changed",- SELECTED_ENDPOINT: "UI.selected_endpoint",- PINNED_ENDPOINT: "UI.pinned_endpoint"-};-module.exports = UIEvents;-},{}],107:[function(require,module,exports){-var AuthenticationEvents = {- /**- * Event callback arguments:- * function(authenticationEnabled, userIdentity)- * authenticationEnabled - indicates whether authentication has been enabled- * in this session- * userIdentity - if user has been logged in then it contains user name. If- * contains 'null' or 'undefined' then user is not logged in.- */- IDENTITY_UPDATED: "authentication.identity_updated"-};-module.exports = AuthenticationEvents;+var process = module.exports = {};+var queue = [];+var draining = false;-},{}],108:[function(require,module,exports){-var CQEvents = {- LOCALSTATS_UPDATED: "cq.localstats_updated",- REMOTESTATS_UPDATED: "cq.remotestats_updated",- STOP: "cq.stop"+function drainQueue() {+ if (draining) {+ return;+ }+ draining = true;+ var currentQueue;+ var len = queue.length;+ while(len) {+ currentQueue = queue;+ queue = [];+ var i = -1;+ while (++i < len) {+ currentQueue[i]();+ }+ len = queue.length;+ }+ draining = false;+}+process.nextTick = function (fun) {+ queue.push(fun);+ if (!draining) {+ setTimeout(drainQueue, 0);+ }};-module.exports = CQEvents;-},{}],109:[function(require,module,exports){-var DesktopSharingEventTypes = {- INIT: "ds.init",+process.title = 'browser';+process.browser = true;+process.env = {};+process.argv = [];+process.version = ''; // empty string to avoid regexp issues- SWITCHING_DONE: "ds.switching_done",+function noop() {}- NEW_STREAM_CREATED: "ds.new_stream_created"-};+process.on = noop;+process.addListener = noop;+process.once = noop;+process.off = noop;+process.removeListener = noop;+process.removeAllListeners = noop;+process.emit = noop;-module.exports = DesktopSharingEventTypes;-},{}],110:[function(require,module,exports){-var Events = {- DTMF_SUPPORT_CHANGED: "members.dtmf_support_changed"+process.binding = function (name) {+ throw new Error('process.binding is not supported');};-module.exports = Events;--},{}],111:[function(require,module,exports){-module.exports = {- getLanguages : function () {- var languages = [];- for(var lang in this)- {- if(typeof this[lang] === "string")- languages.push(this[lang]);- }- return languages;- },- EN: "en",- BG: "bg",- DE: "de",- TR: "tr",- FR: "fr"-}-},{}],112:[function(require,module,exports){-var XMPPEvents = {- CONNECTION_FAILED: "xmpp.connection.failed",- CONFERENCE_CREATED: "xmpp.conferenceCreated.jingle",- CALL_TERMINATED: "xmpp.callterminated.jingle",- CALL_INCOMING: "xmpp.callincoming.jingle",- DISPOSE_CONFERENCE: "xmpp.dispose_conference",- GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",- KICKED: "xmpp.kicked",- BRIDGE_DOWN: "xmpp.bridge_down",- USER_ID_CHANGED: "xmpp.user_id_changed",- STREAMS_CHANGED: "xmpp.streams_changed",- // We joined the MUC- MUC_JOINED: "xmpp.muc_joined",- // A member joined the MUC- MUC_MEMBER_JOINED: "xmpp.muc_member_joined",- // A member left the MUC- MUC_MEMBER_LEFT: "xmpp.muc_member_left",- MUC_ROLE_CHANGED: "xmpp.muc_role_changed",- MUC_DESTROYED: "xmpp.muc_destroyed",- DISPLAY_NAME_CHANGED: "xmpp.display_name_changed",- REMOTE_STATS: "xmpp.remote_stats",- LOCAL_ROLE_CHANGED: "xmpp.localrole_changed",- PRESENCE_STATUS: "xmpp.presence_status",- RESERVATION_ERROR: "xmpp.room_reservation_error",- SUBJECT_CHANGED: "xmpp.subject_changed",- MESSAGE_RECEIVED: "xmpp.message_received",- SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message",- PASSWORD_REQUIRED: "xmpp.password_required",- AUTHENTICATION_REQUIRED: "xmpp.authentication_required",- CHAT_ERROR_RECEIVED: "xmpp.chat_error_received",- ETHERPAD: "xmpp.etherpad",- DEVICE_AVAILABLE: "xmpp.device_available",- START_MUTED: "xmpp.start_muted"+// TODO(shtylman)+process.cwd = function () { return '/' };+process.chdir = function (dir) {+ throw new Error('process.chdir is not supported');};-module.exports = XMPPEvents;+process.umask = function() { return 0; };+},{}]},{},[1])(1)});\ No newline at end of filediff --git a/modules/xmpp/strophe.jingle.js b/modules/xmpp/strophe.jingle.jsindex 1191e27760..491c54c196 100644--- a/modules/xmpp/strophe.jingle.js+++ b/modules/xmpp/strophe.jingle.js@@ -328,8 +328,9 @@ module.exports = function(XMPP, eventEmitter)*/populateData: function () {var data = {};+ var self = this;Object.keys(this.sessions).forEach(function (sid) {- var session = this.sessions[sid];+ var session = self.sessions[sid];if (session.peerconnection && session.peerconnection.updateLog) {// FIXME: should probably be a .dump calldata["jingle_" + session.sid] = {